function_name
stringlengths
1
87
binary_name
stringlengths
64
64
author_name
stringlengths
2
36
project_name
stringlengths
1
48
opt
stringclasses
1 value
src
stringlengths
11
425k
dbg
stringclasses
1 value
codeart
stringlengths
257
560k
lmpa
stringlengths
619
152k
jump
d12fd0653cd5950263c6e58977af19a8cbad572d8569a8764f29651b2db27ced
gpakosz
peg
NA
static void jump(int n) { fprintf(output, " goto l%d;", n); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405D90", "function_addr": 4218256, "binary_name": "d12fd0653cd5950263c6e58977af19a8cbad572d8569a8764f29651b2db27ced.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], edi"], [4, "mov rax, cs:s"], [5, "mov edx, [rbp+var_4]"], [6, "mov esi, offset aGotoLD"], [7, "mov rdi, rax"], [8, "mov eax, 0"], [9, "call _fprintf"], [10, "nop"], [11, "leave"], [12, "retn"]], "data_dep": [[5, 3], [7, 4], [12, 9]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d12fd0653cd5950263c6e58977af19a8cbad572d8569a8764f29651b2db27ced_d12fd0653cd5950263c6e58977af19a8cbad572d8569a8764f29651b2db27ced.jsonl.gz", "strip_func_name": "sub_405D90", "query": "\n\n\nint __fastcall sub_405D90(unsigned int a1)\n{\nreturn fprintf(s, \" goto l%d;\", a1);\n}\n\n\n\nQ:[a1,sub_405D90,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'n', 'sub_405D90': 'jump'}"}
print_results_cache
9c4eb45616cf68f899f481bb462a5f7bc8353e57fe3d33fddecbe769a3efc9eb
RadeonOpenCompute
ROCK-Kernel-Driver
NA
static int print_results_cache(char *filename, int bm_pid, unsigned long llc_value) { FILE *fp; if (strcmp(filename, "stdio") == 0 || strcmp(filename, "stderr") == 0) { printf("Pid: %d \t LLC_value: %lu\n", bm_pid, llc_value); } else { fp = fopen(filename, "a"); if (!fp) { perror("Cannot open results file"); return errno; } fprintf(fp, "Pid: %d \t llc_value: %lu\n", bm_pid, llc_value); fclose(fp); } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407102", "function_addr": 4223234, "binary_name": "9c4eb45616cf68f899f481bb462a5f7bc8353e57fe3d33fddecbe769a3efc9eb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+s1], rdi"], [4, "mov [rbp+var_1C], esi"], [5, "mov [rbp+var_28], rdx"], [6, "mov rax, [rbp+s1]"], [7, "mov esi, offset aStdio_0"], [8, "mov rdi, rax"], [9, "call _strcmp"], [10, "test eax, eax"], [11, "jz short loc_40713F"], [12, "mov rax, [rbp+s1]"], [13, "mov esi, offset aStderr_1"], [14, "mov rdi, rax"], [15, "call _strcmp"], [16, "test eax, eax"], [17, "jnz short loc_407159"], [18, "mov rdx, [rbp+var_28]"], [19, "mov eax, [rbp+var_1C]"], [20, "mov esi, eax"], [21, "mov edi, offset aPidDLlcValueLu"], [22, "mov eax, 0"], [23, "call _printf"], [24, "jmp short loc_4071B1"], [25, "mov rax, [rbp+s1]"], [26, "mov esi, offset aA_0"], [27, "mov rdi, rax"], [28, "call _fopen"], [29, "mov [rbp+stream], rax"], [30, "cmp [rbp+stream], 0"], [31, "jnz short loc_407188"], [32, "mov edi, offset aCannotOpenResu_0"], [33, "call _perror"], [34, "call ___errno_location"], [35, "mov eax, [rax]"], [36, "jmp short locret_4071B6"], [37, "mov rcx, [rbp+var_28]"], [38, "mov edx, [rbp+var_1C]"], [39, "mov rax, [rbp+stream]"], [40, "mov esi, offset aPidDLlcValueLu_0"], [41, "mov rdi, rax"], [42, "mov eax, 0"], [43, "call _fprintf"], [44, "mov rax, [rbp+stream]"], [45, "mov rdi, rax"], [46, "call _fclose"], [47, "mov eax, 0"], [48, "leave"], [49, "retn"]], "data_dep": [[6, 3], [8, 6], [10, 9], [11, 10], [12, 3], [14, 12], [16, 15], [17, 16], [18, 5], [19, 4], [20, 19], [25, 3], [27, 25], [29, 28], [30, 29], [31, 30], [35, 34], [37, 5], [38, 4], [39, 29], [41, 39], [44, 29], [45, 44], [49, 35], [49, 47]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/9c4eb45616cf68f899f481bb462a5f7bc8353e57fe3d33fddecbe769a3efc9eb_9c4eb45616cf68f899f481bb462a5f7bc8353e57fe3d33fddecbe769a3efc9eb.jsonl.gz", "strip_func_name": "sub_407102", "query": "\n\n\n__int64 __fastcall sub_407102(const char *a1, unsigned int a2, __int64 a3)\n{\nFILE *stream; // [rsp+28h] [rbp-8h]\n\nif ( !strcmp(a1, \"stdio\") || !strcmp(a1, \"stderr\") )\n{\nprintf(\"Pid: %d \\t LLC_value: %lu\\n\", a2, a3);\n}\nelse\n{\nstream = fopen(a1, \"a\");\nif ( !stream )\n{\nperror(\"Cannot open results file\");\nreturn (unsigned int)*__errno_location();\n}\nfprintf(stream, \"Pid: %d \\t llc_value: %lu\\n\", a2, a3);\nfclose(stream);\n}\nreturn 0LL;\n}\n\n\n\nQ:[a3,a1,a2,stream,sub_407102,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'llc_value', 'a1': 'filename', 'a2': 'bm_pid', 'stream': 'fp', 'sub_407102': 'print_results_cache'}"}
punchLocObject
6a49a9b89f975ebee97d9a82e1683bf07859889fa81dd70ae87409d162aba7fa
open-simh
simtools
NA
void punchLocObject( WORD32 loc, WORD32 val ) { if( rim_mode ) { punchOrigin( loc ); } punchObject(( val >> 6 ) & 0077 ); punchObject( val & 0077 ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404586", "function_addr": 4212102, "binary_name": "6a49a9b89f975ebee97d9a82e1683bf07859889fa81dd70ae87409d162aba7fa.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], edi"], [4, "mov [rbp+var_8], esi"], [5, "movzx eax, cs:byte_411960"], [6, "test al, al"], [7, "jz short loc_4045A9"], [8, "mov eax, [rbp+var_4]"], [9, "mov edi, eax"], [10, "call sub_4044CE"], [11, "mov eax, [rbp+var_8]"], [12, "sar eax, 6"], [13, "and eax, 3Fh"], [14, "mov edi, eax"], [15, "call sub_4044FC"], [16, "mov eax, [rbp+var_8]"], [17, "and eax, 3Fh"], [18, "mov edi, eax"], [19, "call sub_4044FC"], [20, "nop"], [21, "leave"], [22, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 3], [9, 8], [11, 4], [12, 11], [13, 12], [14, 13], [16, 4], [17, 16], [18, 17], [22, 19]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/6a49a9b89f975ebee97d9a82e1683bf07859889fa81dd70ae87409d162aba7fa_6a49a9b89f975ebee97d9a82e1683bf07859889fa81dd70ae87409d162aba7fa.jsonl.gz", "strip_func_name": "sub_404586", "query": "\n\n\nFILE *__fastcall sub_404586(int a1, int a2)\n{\nif ( byte_411960 )\nsub_4044CE(a1);\nsub_4044FC((a2 >> 6) & 0x3F);\nreturn sub_4044FC(a2 & 0x3F);\n}\n\n\n\nQ:[a1,a2,sub_404586,sub_4044CE,sub_4044FC,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'loc', 'a2': 'val', 'sub_404586': 'punchLocObject', 'sub_4044CE': 'punchOrigin', 'sub_4044FC': 'punchObject'}"}
zpl_adt_set_str
3bb554e88bb681816e90ee0d657494139a71492a49fba76751bbf7e7de29b83c
zpl-c
zpl
NA
zpl_b8 zpl_adt_set_str(zpl_adt_node *obj, char const *name, char const *value) { zpl_adt_make_leaf(obj, name, ZPL_ADT_TYPE_STRING); obj->string = value; return true; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40D12D", "function_addr": 4247853, "binary_name": "3bb554e88bb681816e90ee0d657494139a71492a49fba76751bbf7e7de29b83c.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 rcx, [rbp+var_10]"], [7, "mov rax, [rbp+var_8]"], [8, "mov edx, 3"], [9, "mov rsi, rcx"], [10, "mov rdi, rax"], [11, "call sub_40C6E0"], [12, "mov rax, [rbp+var_8]"], [13, "mov rdx, [rbp+var_18]"], [14, "mov [rax+18h], rdx"], [15, "mov eax, 1"], [16, "leave"], [17, "retn"]], "data_dep": [[6, 4], [7, 3], [9, 6], [10, 7], [12, 3], [13, 5], [14, 13], [14, 12], [17, 15]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3bb554e88bb681816e90ee0d657494139a71492a49fba76751bbf7e7de29b83c_3bb554e88bb681816e90ee0d657494139a71492a49fba76751bbf7e7de29b83c.jsonl.gz", "strip_func_name": "sub_40D12D", "query": "\n\n\n__int64 __fastcall sub_40D12D(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\nsub_40C6E0(a1, a2, 3, a2, a5, a6);\n*(_QWORD *)(a1 + 24) = a3;\nreturn 1LL;\n}\n\n\n\nQ:[a3,a1,a2,sub_40D12D,sub_40C6E0,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'value', 'a1': 'obj', 'a2': 'name', 'sub_40D12D': 'zpl_adt_set_str', 'sub_40C6E0': 'zpl_adt_make_leaf'}"}
x509_str_strip_whitespace
892109def3973fcbf2ff18d6b91afb36d045fe72303d34be34e9b18fd685ad3d
vanhoefm
hostap-wpa3
NA
static void x509_str_strip_whitespace(char *a) { char *ipos, *opos; int remove_whitespace = 1; ipos = opos = a; while (*ipos) { if (remove_whitespace && x509_whitespace(*ipos)) ipos++; else { remove_whitespace = x509_whitespace(*ipos); *opos++ = *ipos++; } } *opos-- = '\0'; if (opos > a && x509_whitespace(*opos)) *opos = '\0'; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_416833", "function_addr": 4286515, "binary_name": "892109def3973fcbf2ff18d6b91afb36d045fe72303d34be34e9b18fd685ad3d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 28h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_14], 1"], [5, "mov rax, [rbp+var_28]"], [6, "mov [rbp+var_10], rax"], [7, "mov rax, [rbp+var_10]"], [8, "mov [rbp+var_8], rax"], [9, "jmp short loc_4168AB"], [10, "cmp [rbp+var_14], 0"], [11, "jz short loc_41687A"], [12, "mov rax, [rbp+var_8]"], [13, "movzx eax, byte ptr [rax]"], [14, "movsx eax, al"], [15, "mov edi, eax"], [16, "call sub_416810"], [17, "test eax, eax"], [18, "jz short loc_41687A"], [19, "add [rbp+var_8], 1"], [20, "jmp short loc_4168AB"], [21, "mov rax, [rbp+var_8]"], [22, "movzx eax, byte ptr [rax]"], [23, "movsx eax, al"], [24, "mov edi, eax"], [25, "call sub_416810"], [26, "mov [rbp+var_14], eax"], [27, "mov rdx, [rbp+var_8]"], [28, "lea rax, [rdx+1]"], [29, "mov [rbp+var_8], rax"], [30, "mov rax, [rbp+var_10]"], [31, "lea rcx, [rax+1]"], [32, "mov [rbp+var_10], rcx"], [33, "movzx edx, byte ptr [rdx]"], [34, "mov [rax], dl"], [35, "mov rax, [rbp+var_8]"], [36, "movzx eax, byte ptr [rax]"], [37, "test al, al"], [38, "jnz short loc_416858"], [39, "mov rax, [rbp+var_10]"], [40, "lea rdx, [rax-1]"], [41, "mov [rbp+var_10], rdx"], [42, "mov byte ptr [rax], 0"], [43, "mov rax, [rbp+var_10]"], [44, "cmp rax, [rbp+var_28]"], [45, "jbe short loc_4168EB"], [46, "mov rax, [rbp+var_10]"], [47, "movzx eax, byte ptr [rax]"], [48, "movsx eax, al"], [49, "mov edi, eax"], [50, "call sub_416810"], [51, "test eax, eax"], [52, "jz short loc_4168EB"], [53, "mov rax, [rbp+var_10]"], [54, "mov byte ptr [rax], 0"], [55, "nop"], [56, "leave"], [57, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [10, 26], [10, 4], [11, 10], [12, 19], [12, 8], [12, 29], [13, 34], [13, 12], [14, 13], [15, 14], [17, 16], [18, 17], [19, 8], [19, 29], [19, 19], [21, 19], [21, 8], [21, 29], [22, 34], [22, 21], [23, 22], [24, 23], [26, 25], [27, 19], [27, 8], [27, 29], [28, 27], [28, 25], [28, 34], [29, 28], [30, 6], [30, 32], [31, 31], [31, 34], [31, 30], [32, 31], [33, 34], [33, 27], [34, 30], [34, 33], [35, 8], [35, 29], [35, 19], [36, 34], [36, 35], [37, 36], [38, 37], [39, 32], [39, 6], [40, 34], [40, 33], [40, 39], [40, 42], [41, 40], [42, 39], [43, 41], [44, 43], [44, 3], [45, 44], [46, 41], [47, 46], [47, 34], [47, 42], [48, 47], [49, 48], [51, 50], [52, 51], [53, 41], [54, 53], [57, 51], [57, 53], [57, 43]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/892109def3973fcbf2ff18d6b91afb36d045fe72303d34be34e9b18fd685ad3d_892109def3973fcbf2ff18d6b91afb36d045fe72303d34be34e9b18fd685ad3d.jsonl.gz", "strip_func_name": "sub_416833", "query": "\n\n\n_BOOL8 __fastcall sub_416833(char *a1)\n{\nchar *v1; // rdx\nchar *v2; // rax\nchar *v3; // rax\n_BOOL8 result; // rax\n_BOOL4 v5; // [rsp+14h] [rbp-14h]\nchar *v6; // [rsp+18h] [rbp-10h]\nchar *v7; // [rsp+18h] [rbp-10h]\nchar *v8; // [rsp+20h] [rbp-8h]\n\nv5 = 1;\nv6 = a1;\nv8 = a1;\nwhile ( *v8 )\n{\nif ( v5 && sub_416810(*v8) )\n{\n++v8;\n}\nelse\n{\nv5 = sub_416810(*v8);\nv1 = v8++;\nv2 = v6++;\n*v2 = *v1;\n}\n}\nv3 = v6;\nv7 = v6 - 1;\n*v3 = 0;\nresult = (_BOOL8)v7;\nif ( v7 > a1 )\n{\nresult = sub_416810(*v7);\nif ( result )\n{\nresult = (_BOOL8)v7;\n*v7 = 0;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,v5,v7,v8,sub_416833,sub_416810,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'a', 'v5': 'remove_whitespace', 'v7': 'opos', 'v8': 'ipos', 'sub_416833': 'x509_str_strip_whitespace', 'sub_416810': 'x509_whitespace'}"}
dump_end
a8e21af148bb4437719fa430ee023b545708c7c9e3e025c5dca999dae8d732fe
e-n-f
datamaps
NA
void dump_end(int dump) { if (dump == 2) { printf("]\n}\n"); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4038AC", "function_addr": 4208812, "binary_name": "a8e21af148bb4437719fa430ee023b545708c7c9e3e025c5dca999dae8d732fe.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], edi"], [4, "cmp [rbp+var_4], 2"], [5, "jnz short loc_4038C7"], [6, "mov edi, offset asc_40431D"], [7, "call _puts"], [8, "nop"], [9, "leave"], [10, "retn"]], "data_dep": [[4, 3], [5, 4], [10, 7]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/a8e21af148bb4437719fa430ee023b545708c7c9e3e025c5dca999dae8d732fe_a8e21af148bb4437719fa430ee023b545708c7c9e3e025c5dca999dae8d732fe.jsonl.gz", "strip_func_name": "sub_4038AC", "query": "\n\n\nint __fastcall sub_4038AC(int a1)\n{\nint result; // eax\n\nif ( a1 == 2 )\nresult = puts(\"]\\n}\");\nreturn result;\n}\n\n\n\nQ:[a1,sub_4038AC,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'dump', 'sub_4038AC': 'dump_end'}"}
btrimws
f80fce60a1c6c5d72197f6716ad274285d5f735ea4a56e8230f0a67845b1a087
zedshaw
liblcthw
NA
int btrimws (bstring b) { int i, j; if (b == NULL || b->data == NULL || b->mlen < b->slen || b->slen < 0 || b->mlen <= 0) return BSTR_ERR; for (i = b->slen - 1; i >= 0; i--) { if (!wspace (b->data[i])) { if (b->mlen > i) b->data[i+1] = (unsigned char) '\0'; b->slen = i + 1; for (j = 0; wspace (b->data[j]); j++) {} return bdelete (b, 0, j); } } b->data[0] = (unsigned char) '\0'; b->slen = 0; return BSTR_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "btrimws", "function_addr": 4219383, "binary_name": "f80fce60a1c6c5d72197f6716ad274285d5f735ea4a56e8230f0a67845b1a087.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, "jz short loc_40623D"], [6, "mov rax, [rbp+var_18]"], [7, "mov rax, [rax+8]"], [8, "test rax, rax"], [9, "jz short loc_40623D"], [10, "mov rax, [rbp+var_18]"], [11, "mov edx, [rax]"], [12, "mov rax, [rbp+var_18]"], [13, "mov eax, [rax+4]"], [14, "cmp edx, eax"], [15, "jl short loc_40623D"], [16, "mov rax, [rbp+var_18]"], [17, "mov eax, [rax+4]"], [18, "test eax, eax"], [19, "js short loc_40623D"], [20, "mov rax, [rbp+var_18]"], [21, "mov eax, [rax]"], [22, "test eax, eax"], [23, "jg short loc_406247"], [24, "mov eax, 0FFFFFFFFh"], [25, "jmp locret_40633E"], [26, "mov rax, [rbp+var_18]"], [27, "mov eax, [rax+4]"], [28, "sub eax, 1"], [29, "mov [rbp+var_4], eax"], [30, "jmp loc_406319"], [31, "call ___ctype_b_loc"], [32, "mov rdx, [rax]"], [33, "mov rax, [rbp+var_18]"], [34, "mov rcx, [rax+8]"], [35, "mov eax, [rbp+var_4]"], [36, "cdqe"], [37, "add rax, rcx"], [38, "movzx eax, byte ptr [rax]"], [39, "movzx eax, al"], [40, "add rax, rax"], [41, "add rax, rdx"], [42, "movzx eax, word ptr [rax]"], [43, "movzx eax, ax"], [44, "and eax, 2000h"], [45, "test eax, eax"], [46, "jnz loc_406315"], [47, "mov rax, [rbp+var_18]"], [48, "mov eax, [rax]"], [49, "cmp [rbp+var_4], eax"], [50, "jge short loc_4062B2"], [51, "mov rax, [rbp+var_18]"], [52, "mov rdx, [rax+8]"], [53, "mov eax, [rbp+var_4]"], [54, "cdqe"], [55, "add rax, 1"], [56, "add rax, rdx"], [57, "mov byte ptr [rax], 0"], [58, "mov eax, [rbp+var_4]"], [59, "lea edx, [rax+1]"], [60, "mov rax, [rbp+var_18]"], [61, "mov [rax+4], edx"], [62, "mov [rbp+var_8], 0"], [63, "jmp short loc_4062CC"], [64, "add [rbp+var_8], 1"], [65, "call ___ctype_b_loc"], [66, "mov rdx, [rax]"], [67, "mov rax, [rbp+var_18]"], [68, "mov rcx, [rax+8]"], [69, "mov eax, [rbp+var_8]"], [70, "cdqe"], [71, "add rax, rcx"], [72, "movzx eax, byte ptr [rax]"], [73, "movzx eax, al"], [74, "add rax, rax"], [75, "add rax, rdx"], [76, "movzx eax, word ptr [rax]"], [77, "movzx eax, ax"], [78, "and eax, 2000h"], [79, "test eax, eax"], [80, "jnz short loc_4062C8"], [81, "mov edx, [rbp+var_8]"], [82, "mov rax, [rbp+var_18]"], [83, "mov esi, 0"], [84, "mov rdi, rax"], [85, "call bdelete"], [86, "jmp short locret_40633E"], [87, "sub [rbp+var_4], 1"], [88, "cmp [rbp+var_4], 0"], [89, "jns loc_406259"], [90, "mov rax, [rbp+var_18]"], [91, "mov rax, [rax+8]"], [92, "mov byte ptr [rax], 0"], [93, "mov rax, [rbp+var_18]"], [94, "mov dword ptr [rax+4], 0"], [95, "mov eax, 0"], [96, "leave"], [97, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 6], [8, 7], [9, 8], [10, 3], [11, 10], [12, 3], [13, 12], [14, 13], [14, 11], [15, 14], [16, 3], [17, 16], [18, 17], [19, 18], [20, 3], [21, 20], [22, 21], [23, 22], [26, 3], [27, 26], [28, 27], [29, 28], [32, 31], [33, 3], [34, 33], [35, 87], [35, 29], [37, 35], [37, 34], [38, 37], [39, 38], [40, 39], [41, 40], [41, 32], [42, 41], [43, 42], [44, 43], [45, 44], [46, 45], [47, 3], [48, 47], [49, 87], [49, 48], [49, 29], [50, 49], [51, 3], [52, 51], [53, 87], [53, 29], [55, 53], [56, 55], [56, 52], [57, 56], [58, 87], [58, 29], [59, 57], [59, 32], [59, 52], [59, 61], [59, 58], [60, 3], [61, 60], [61, 59], [64, 62], [64, 64], [66, 57], [66, 61], [66, 65], [67, 3], [68, 57], [68, 61], [68, 67], [69, 62], [69, 64], [71, 69], [71, 68], [72, 57], [72, 61], [72, 71], [73, 72], [74, 73], [75, 74], [75, 66], [76, 61], [76, 57], [76, 75], [77, 76], [78, 77], [79, 78], [80, 79], [81, 62], [81, 64], [82, 3], [84, 82], [87, 29], [87, 87], [88, 29], [88, 87], [89, 88], [90, 3], [91, 90], [92, 91], [93, 3], [94, 93], [97, 95], [97, 24], [97, 85]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f80fce60a1c6c5d72197f6716ad274285d5f735ea4a56e8230f0a67845b1a087_f80fce60a1c6c5d72197f6716ad274285d5f735ea4a56e8230f0a67845b1a087.jsonl.gz", "strip_func_name": "btrimws", "query": "\n\n\n__int64 __fastcall btrimws(__int64 a1)\n{\nunsigned int j; // [rsp+18h] [rbp-8h]\nint i; // [rsp+1Ch] [rbp-4h]\n\nif ( !a1 || !*(_QWORD *)(a1 + 8) || *(_DWORD *)a1 < *(_DWORD *)(a1 + 4) || *(int *)(a1 + 4) < 0 || *(int *)a1 <= 0 )\nreturn 0xFFFFFFFFLL;\nfor ( i = *(_DWORD *)(a1 + 4) - 1; ; --i )\n{\nif ( i < 0 )\n{\n**(_BYTE **)(a1 + 8) = 0;\n*(_DWORD *)(a1 + 4) = 0;\nreturn 0LL;\n}\nif ( ((*__ctype_b_loc())[*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + i)] & 0x2000) == 0 )\nbreak;\n}\nif ( i < *(_DWORD *)a1 )\n*(_BYTE *)(*(_QWORD *)(a1 + 8) + i + 1LL) = 0;\n*(_DWORD *)(a1 + 4) = i + 1;\nfor ( j = 0; ((*__ctype_b_loc())[*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + (int)j)] & 0x2000) != 0; ++j )\n;\nreturn bdelete(a1, 0LL, j);\n}\n\n\n\nQ:[a1,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'b'}"}
copyalleparams
6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17
RTimothyEdwards
XCircuit
NA
void copyalleparams(genericptr destinst, genericptr sourceinst) { eparamptr cepp, newepp; for (cepp = sourceinst->passed; cepp != NULL; cepp = cepp->next) { newepp = copyeparam(cepp, sourceinst); newepp->next = destinst->passed; destinst->passed = newepp; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_463DE4", "function_addr": 4603364, "binary_name": "6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov rax, [rbp+var_20]"], [6, "mov rax, [rax+8]"], [7, "mov [rbp+var_8], rax"], [8, "jmp short loc_463E41"], [9, "mov rdx, [rbp+var_20]"], [10, "mov rax, [rbp+var_8]"], [11, "mov rsi, rdx"], [12, "mov rdi, rax"], [13, "call sub_463D62"], [14, "mov [rbp+var_10], rax"], [15, "mov rax, [rbp+var_18]"], [16, "mov rdx, [rax+8]"], [17, "mov rax, [rbp+var_10]"], [18, "mov [rax+18h], rdx"], [19, "mov rax, [rbp+var_18]"], [20, "mov rdx, [rbp+var_10]"], [21, "mov [rax+8], rdx"], [22, "mov rax, [rbp+var_8]"], [23, "mov rax, [rax+18h]"], [24, "mov [rbp+var_8], rax"], [25, "cmp [rbp+var_8], 0"], [26, "jnz short loc_463E02"], [27, "nop"], [28, "nop"], [29, "leave"], [30, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [9, 4], [10, 24], [10, 7], [11, 9], [12, 10], [14, 13], [15, 3], [16, 15], [16, 21], [16, 18], [17, 14], [18, 17], [18, 16], [19, 3], [20, 14], [21, 19], [21, 20], [22, 7], [22, 24], [23, 22], [23, 18], [23, 21], [24, 23], [25, 7], [25, 24], [26, 25], [30, 6], [30, 23]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17_6e348e984bd63ac982d83dafa4e61fb9925c759b418264e141a667eb3a0dba17.jsonl.gz", "strip_func_name": "sub_463DE4", "query": "\n\n\n__int64 __fastcall sub_463DE4(__int64 a1, __int64 a2)\n{\n__int64 result; // rax\n_QWORD *v3; // [rsp+10h] [rbp-10h]\n__int64 i; // [rsp+18h] [rbp-8h]\n\nresult = *(_QWORD *)(a2 + 8);\nfor ( i = result; i; i = result )\n{\nv3 = sub_463D62(i);\nv3[3] = *(_QWORD *)(a1 + 8);\n*(_QWORD *)(a1 + 8) = v3;\nresult = *(_QWORD *)(i + 24);\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,i,sub_463DE4,sub_463D62,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'destinst', 'a2': 'sourceinst', 'v3': 'newepp', 'i': 'cepp', 'sub_463DE4': 'copyalleparams', 'sub_463D62': 'copyeparam'}"}
sha1_hmac
4b6879214768d5629dffdb5907a53a98ff471e93ed4708d9e41908572afb8641
ovh
overthebox-openwrt
NA
void sha1_hmac( unsigned char *key, int keylen, unsigned char *input, int ilen, unsigned char output[20] ) { sha1_context ctx; sha1_hmac_starts( &ctx, key, keylen ); sha1_hmac_update( &ctx, input, ilen ); sha1_hmac_finish( &ctx, output ); memset( &ctx, 0, sizeof( sha1_context ) ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407D1A", "function_addr": 4226330, "binary_name": "4b6879214768d5629dffdb5907a53a98ff471e93ed4708d9e41908572afb8641.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 120h"], [3, "mov [rbp+var_108], rdi"], [4, "mov [rbp+var_10C], esi"], [5, "mov [rbp+var_118], rdx"], [6, "mov [rbp+var_110], ecx"], [7, "mov [rbp+var_120], r8"], [8, "mov edx, [rbp+var_10C]"], [9, "mov rcx, [rbp+var_108]"], [10, "lea rax, [rbp+s]"], [11, "mov rsi, rcx"], [12, "mov rdi, rax"], [13, "call sub_407B2F"], [14, "mov edx, [rbp+var_110]"], [15, "mov rcx, [rbp+var_118]"], [16, "lea rax, [rbp+s]"], [17, "mov rsi, rcx"], [18, "mov rdi, rax"], [19, "call sub_407C5C"], [20, "mov rdx, [rbp+var_120]"], [21, "lea rax, [rbp+s]"], [22, "mov rsi, rdx"], [23, "mov rdi, rax"], [24, "call sub_407C88"], [25, "lea rax, [rbp+s]"], [26, "mov edx, 0F8h"], [27, "mov esi, 0"], [28, "mov rdi, rax"], [29, "call _memset"], [30, "nop"], [31, "leave"], [32, "retn"]], "data_dep": [[8, 4], [9, 3], [11, 9], [12, 10], [14, 6], [15, 5], [16, 13], [17, 15], [18, 16], [20, 7], [21, 19], [22, 20], [23, 21], [25, 24], [28, 25], [32, 29]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4b6879214768d5629dffdb5907a53a98ff471e93ed4708d9e41908572afb8641_4b6879214768d5629dffdb5907a53a98ff471e93ed4708d9e41908572afb8641.jsonl.gz", "strip_func_name": "sub_407D1A", "query": "\n\n\nvoid *__fastcall sub_407D1A(unsigned __int8 *a1, int a2, unsigned __int8 *a3, int a4, _BYTE *a5)\n{\n_QWORD s[32]; // [rsp+20h] [rbp-100h] BYREF\n\nsub_407B2F(s, a1, a2);\nsub_407C5C((unsigned __int8 *)s, a3, a4);\nsub_407C88((__int64)s, a5);\nreturn memset(s, 0, 0xF8uLL);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,s,sub_407D1A,sub_407B2F,sub_407C5C,sub_407C88,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'input', 'a4': 'ilen', 'a1': 'key', 'a2': 'keylen', 'a5': 'output', 's': 'ctx', 'sub_407D1A': 'sha1_hmac', 'sub_407B2F': 'sha1_hmac_starts', 'sub_407C5C': 'sha1_hmac_update', 'sub_407C88': 'sha1_hmac_finish'}"}
p2p_set_timeout
8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f
sonic-net
sonic-buildimage
NA
void p2p_set_timeout(struct p2p_data *p2p, unsigned int sec, unsigned int usec) { p2p_dbg(p2p, "Set timeout (state=%s): %u.%06u sec", p2p_state_txt(p2p->state), sec, usec); eloop_cancel_timeout(p2p_state_timeout, p2p, NULL); eloop_register_timeout(sec, usec, p2p_state_timeout, p2p, NULL); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_409409", "function_addr": 4232201, "binary_name": "8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f.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 [rbp+var_10], edx"], [6, "mov rax, [rbp+var_8]"], [7, "mov eax, [rax+8]"], [8, "mov edi, eax"], [9, "call sub_409199"], [10, "mov rsi, rax"], [11, "mov ecx, [rbp+var_10]"], [12, "mov edx, [rbp+var_C]"], [13, "mov rax, [rbp+var_8]"], [14, "mov r8d, ecx"], [15, "mov ecx, edx"], [16, "mov rdx, rsi"], [17, "mov esi, offset aSetTimeoutStat"], [18, "mov rdi, rax"], [19, "mov eax, 0"], [20, "call sub_416984"], [21, "mov rax, [rbp+var_8]"], [22, "mov edx, 0"], [23, "mov rsi, rax"], [24, "mov edi, offset sub_413B4E"], [25, "call sub_405A06"], [26, "mov rdx, [rbp+var_8]"], [27, "mov esi, [rbp+var_10]"], [28, "mov eax, [rbp+var_C]"], [29, "mov r8d, 0"], [30, "mov rcx, rdx"], [31, "mov edx, offset sub_413B4E"], [32, "mov edi, eax"], [33, "call sub_405813"], [34, "nop"], [35, "leave"], [36, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [10, 9], [11, 5], [12, 4], [13, 3], [14, 11], [15, 12], [16, 10], [18, 13], [21, 3], [23, 21], [26, 3], [27, 5], [28, 4], [30, 26], [32, 28], [36, 33]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f_8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f.jsonl.gz", "strip_func_name": "sub_409409", "query": "\n\n\n__int64 __fastcall sub_409409(__int64 a1, unsigned int a2, unsigned int a3)\n{\nunsigned int v3; // eax\nint v4; // er9\n\nv3 = (unsigned int)sub_409199(*(_DWORD *)(a1 + 8));\nsub_416984(a1, (unsigned int)\"Set timeout (state=%s): %u.%06u sec\", v3, a2, a3, v4);\nsub_405A06((__int64)sub_413B4E, a1, 0LL);\nreturn sub_405813(a2, a3, (__time_t)sub_413B4E, a1, 0LL);\n}\n\n\n\nQ:[a3,a1,a2,sub_409409,sub_409199,sub_416984,sub_405A06,sub_413B4E,sub_405813,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'usec', 'a1': 'p2p', 'a2': 'sec', 'sub_409409': 'p2p_set_timeout', 'sub_409199': 'p2p_state_txt', 'sub_416984': 'p2p_dbg', 'sub_405A06': 'eloop_cancel_timeout', 'sub_413B4E': 'p2p_state_timeout', 'sub_405813': 'eloop_register_timeout'}"}
defineVariables
d12fd0653cd5950263c6e58977af19a8cbad572d8569a8764f29651b2db27ced
gpakosz
peg
NA
static void defineVariables(Node *node) { int count= 0; while (node) { fprintf(output, "#define %s yy->__val[%d]\n", node->variable.name, --count); node->variable.offset= count; node= node->variable.next; } fprintf(output, "#define __ yy->__\n"); fprintf(output, "#define yypos yy->__pos\n"); fprintf(output, "#define yythunkpos yy->__thunkpos\n"); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4065F0", "function_addr": 4220400, "binary_name": "d12fd0653cd5950263c6e58977af19a8cbad572d8569a8764f29651b2db27ced.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_4], 0"], [5, "jmp short loc_406643"], [6, "sub [rbp+var_4], 1"], [7, "mov rax, [rbp+var_18]"], [8, "mov rdx, [rax+10h]"], [9, "mov rax, cs:s"], [10, "mov ecx, [rbp+var_4]"], [11, "mov esi, offset aDefineSYyValD"], [12, "mov rdi, rax"], [13, "mov eax, 0"], [14, "call _fprintf"], [15, "mov rax, [rbp+var_18]"], [16, "mov edx, [rbp+var_4]"], [17, "mov [rax+20h], edx"], [18, "mov rax, [rbp+var_18]"], [19, "mov rax, [rax+8]"], [20, "mov [rbp+var_18], rax"], [21, "cmp [rbp+var_18], 0"], [22, "jnz short loc_406605"], [23, "mov rax, cs:s"], [24, "mov rcx, rax"], [25, "mov edx, 12h"], [26, "mov esi, 1"], [27, "mov edi, offset aDefineYy"], [28, "call _fwrite"], [29, "mov rax, cs:s"], [30, "mov rcx, rax"], [31, "mov edx, 18h"], [32, "mov esi, 1"], [33, "mov edi, offset aDefineYyposYyP"], [34, "call _fwrite"], [35, "mov rax, cs:s"], [36, "mov rcx, rax"], [37, "mov edx, 22h "], [38, "mov esi, 1"], [39, "mov edi, offset aDefineYythunkp"], [40, "call _fwrite"], [41, "nop"], [42, "leave"], [43, "retn"]], "data_dep": [[6, 4], [6, 6], [7, 20], [7, 3], [8, 17], [8, 7], [10, 6], [12, 9], [15, 20], [15, 3], [16, 6], [17, 15], [17, 16], [18, 20], [18, 3], [19, 18], [19, 17], [20, 19], [21, 3], [21, 20], [22, 21], [24, 23], [30, 29], [36, 35], [43, 40]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d12fd0653cd5950263c6e58977af19a8cbad572d8569a8764f29651b2db27ced_d12fd0653cd5950263c6e58977af19a8cbad572d8569a8764f29651b2db27ced.jsonl.gz", "strip_func_name": "sub_4065F0", "query": "\n\n\nsize_t __fastcall sub_4065F0(__int64 a1)\n{\nint v3; // [rsp+1Ch] [rbp-4h]\n\nv3 = 0;\nwhile ( a1 )\n{\nfprintf(s, \"#define %s yy->__val[%d]\\n\", *(const char **)(a1 + 16), (unsigned int)--v3);\n*(_DWORD *)(a1 + 32) = v3;\na1 = *(_QWORD *)(a1 + 8);\n}\nfwrite(\"#define __ yy->__\\n\", 1uLL, 0x12uLL, s);\nfwrite(\"#define yypos yy->__pos\\n\", 1uLL, 0x18uLL, s);\nreturn fwrite(\"#define yythunkpos yy->__thunkpos\\n\", 1uLL, 0x22uLL, s);\n}\n\n\n\nQ:[a1,v3,sub_4065F0,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'node', 'v3': 'count', 'sub_4065F0': 'defineVariables'}"}
zbd_init_files
da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b
axboe
fio
NA
int zbd_init_files(struct thread_data *td) { struct fio_file *f; int i; for_each_file(td, f, i) { if (zbd_init_zone_info(td, f)) return 1; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "zbd_init_files", "function_addr": 4812575, "binary_name": "da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rax, [rbp+var_18]"], [5, "mov eax, [rax+2DE0Ch]"], [6, "test eax, eax"], [7, "jz short loc_496FAC"], [8, "mov [rbp+var_4], 0"], [9, "mov rax, [rbp+var_18]"], [10, "mov rax, [rax+2DDF8h]"], [11, "mov rax, [rax]"], [12, "mov [rbp+var_10], rax"], [13, "jmp short loc_496F76"], [14, "mov rdx, [rbp+var_10]"], [15, "mov rax, [rbp+var_18]"], [16, "mov rsi, rdx"], [17, "mov rdi, rax"], [18, "call sub_496CB6"], [19, "test eax, eax"], [20, "jz short loc_496F72"], [21, "mov eax, 1"], [22, "jmp short locret_496FB1"], [23, "add [rbp+var_4], 1"], [24, "mov rax, [rbp+var_18]"], [25, "mov edx, [rax+1F0h]"], [26, "mov eax, [rbp+var_4]"], [27, "cmp edx, eax"], [28, "jbe short loc_496FAC"], [29, "mov rax, [rbp+var_18]"], [30, "mov rdx, [rax+2DDF8h]"], [31, "mov eax, [rbp+var_4]"], [32, "cdqe"], [33, "shl rax, 3"], [34, "add rax, rdx"], [35, "mov rax, [rax]"], [36, "mov [rbp+var_10], rax"], [37, "cmp [rbp+var_10], 0"], [38, "jnz short loc_496F54"], [39, "mov eax, 0"], [40, "leave"], [41, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [9, 3], [10, 9], [11, 10], [12, 11], [14, 36], [15, 3], [16, 14], [17, 15], [19, 18], [20, 19], [23, 8], [23, 23], [24, 3], [25, 24], [26, 8], [26, 23], [27, 25], [27, 26], [28, 27], [29, 3], [30, 29], [31, 8], [31, 23], [33, 31], [34, 30], [34, 33], [35, 34], [36, 35], [37, 36], [38, 37], [41, 21], [41, 39]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b_da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b.jsonl.gz", "strip_func_name": "zbd_init_files", "query": "\n\n\n__int64 __fastcall zbd_init_files(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 v7; // [rsp+10h] [rbp-10h]\nunsigned int i; // [rsp+1Ch] [rbp-4h]\n\nif ( *(_DWORD *)(a1 + 187916) )\n{\nfor ( i = 0; *(_DWORD *)(a1 + 496) > i; ++i )\n{\nv7 = *(_QWORD *)(*(_QWORD *)(a1 + 187896) + 8LL * (int)i);\nif ( !v7 )\nbreak;\nif ( (unsigned int)sub_496CB6(a1, v7, v7, a4, a5, a6) )\nreturn 1LL;\n}\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,v7,sub_496CB6,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'td', 'v7': 'f', 'sub_496CB6': 'zbd_init_zone_info'}"}
rtnl_add_nl_group
866119e843c576da0d5be4aee49bcdefb830f4174c180740ed9987c1f137b153
multipath-tcp
iproute-mptcp
NA
int rtnl_add_nl_group(struct rtnl_handle *rth, unsigned int group) { return setsockopt(rth->fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &group, sizeof(group)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_415EAD", "function_addr": 4284077, "binary_name": "866119e843c576da0d5be4aee49bcdefb830f4174c180740ed9987c1f137b153.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+optval], esi"], [5, "mov rax, [rbp+var_8]"], [6, "mov eax, [rax]"], [7, "lea rdx, [rbp+optval]"], [8, "mov r8d, 4"], [9, "mov rcx, rdx"], [10, "mov edx, 1"], [11, "mov esi, 10Eh"], [12, "mov edi, eax"], [13, "call _setsockopt"], [14, "leave"], [15, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 4], [9, 7], [12, 6], [15, 13]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/866119e843c576da0d5be4aee49bcdefb830f4174c180740ed9987c1f137b153_866119e843c576da0d5be4aee49bcdefb830f4174c180740ed9987c1f137b153.jsonl.gz", "strip_func_name": "sub_415EAD", "query": "\n\n\nint __fastcall sub_415EAD(int *a1, int a2)\n{\nint optval; // [rsp+4h] [rbp-Ch] BYREF\nint *v4; // [rsp+8h] [rbp-8h]\n\nv4 = a1;\noptval = a2;\nreturn setsockopt(*a1, 270, 1, &optval, 4u);\n}\n\n\n\nQ:[a1,a2,optval,v4,sub_415EAD,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'rth', 'a2': 'group', 'optval': 'groupa', 'v4': 'rtha', 'sub_415EAD': 'rtnl_add_nl_group'}"}
usage
5d411ade7b6e345380cc958fccdcf5e7fb17ed104841c36bd09c2718669e5cbf
meme
hotwax
NA
static void usage(u8* argv0) { show_banner(); SAYF("\n%s [ options ] -- /path/to/target_app [ ... ]\n\n" "Required parameters:\n\n" " -o file - file to write the trace data to\n\n" "Execution control settings:\n\n" " -t msec - timeout for each run (none)\n" " -m megs - memory limit for child process (%u MB)\n" " -Q - use binary-only instrumentation (QEMU mode)\n\n" "Other settings:\n\n" " -q - sink program's output and don't show messages\n" " -e - show edge coverage only, ignore hit counts\n" " -c - allow core dumps\n\n" "This tool displays raw tuple data captured by AFL instrumentation.\n" "For additional help, consult %s/README.\n\n" cRST, argv0, MEM_LIMIT, doc_path); exit(1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403ADD", "function_addr": 4209373, "binary_name": "5d411ade7b6e345380cc958fccdcf5e7fb17ed104841c36bd09c2718669e5cbf.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "call sub_403AB8"], [5, "mov rcx, cs:qword_408218"], [6, "mov rax, cs:stderr"], [7, "mov rdx, [rbp+var_8]"], [8, "mov r8, rcx"], [9, "mov ecx, 32h "], [10, "mov esi, offset aSOptionsPathTo"], [11, "mov rdi, rax"], [12, "mov eax, 0"], [13, "call _fprintf"], [14, "mov edi, 1"], [15, "call _exit"]], "data_dep": [[7, 3], [8, 5], [11, 6]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5d411ade7b6e345380cc958fccdcf5e7fb17ed104841c36bd09c2718669e5cbf_5d411ade7b6e345380cc958fccdcf5e7fb17ed104841c36bd09c2718669e5cbf.jsonl.gz", "strip_func_name": "sub_403ADD", "query": "\n\n\nvoid __fastcall __noreturn sub_403ADD(const char *a1)\n{\nsub_403AB8();\nfprintf(\nstderr,\n\"\\n\"\n\"%s [ options ] -- /path/to/target_app [ ... ]\\n\"\n\"\\n\"\n\"Required parameters:\\n\"\n\"\\n\"\n\" -o file - file to write the trace data to\\n\"\n\"\\n\"\n\"Execution control settings:\\n\"\n\"\\n\"\n\" -t msec - timeout for each run (none)\\n\"\n\" -m megs - memory limit for child process (%u MB)\\n\"\n\" -Q - use binary-only instrumentation (QEMU mode)\\n\"\n\"\\n\"\n\"Other settings:\\n\"\n\"\\n\"\n\" -q - sink program's output and don't show messages\\n\"\n\" -e - show edge coverage only, ignore hit counts\\n\"\n\" -c - allow core dumps\\n\"\n\"\\n\"\n\"This tool displays raw tuple data captured by AFL instrumentation.\\n\"\n\"For additional help, consult %s/README.\\n\"\n\"\\n\"\n\"\\x1B[0m\",\na1,\n50LL,\n(const char *)qword_408218);\nexit(1);\n}\n\n\n\nQ:[a1,sub_403ADD,sub_403AB8,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'argv0', 'sub_403ADD': 'usage', 'sub_403AB8': 'show_banner'}"}
set_environment
2ccf4a36144b806753b4d8b0bd5104a745650a2cbe28986470f69c09b2181958
frida
tinycc
NA
static void set_environment(TCCState *s) { char * path; path = getenv("C_INCLUDE_PATH"); if(path != NULL) { tcc_add_sysinclude_path(s, path); } path = getenv("CPATH"); if(path != NULL) { tcc_add_include_path(s, path); } path = getenv("LIBRARY_PATH"); if(path != NULL) { tcc_add_library_path(s, path); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_435FA0", "function_addr": 4415392, "binary_name": "2ccf4a36144b806753b4d8b0bd5104a745650a2cbe28986470f69c09b2181958.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov edi, offset aCIncludePath"], [5, "call _getenv"], [6, "mov [rbp+var_8], rax"], [7, "cmp [rbp+var_8], 0"], [8, "jz short loc_435FD4"], [9, "mov rdx, [rbp+var_8]"], [10, "mov rax, [rbp+var_18]"], [11, "mov rsi, rdx"], [12, "mov rdi, rax"], [13, "call sub_432F7E"], [14, "mov edi, offset aCpath"], [15, "call _getenv"], [16, "mov [rbp+var_8], rax"], [17, "cmp [rbp+var_8], 0"], [18, "jz short loc_435FFC"], [19, "mov rdx, [rbp+var_8]"], [20, "mov rax, [rbp+var_18]"], [21, "mov rsi, rdx"], [22, "mov rdi, rax"], [23, "call sub_432F3B"], [24, "mov edi, offset aLibraryPath"], [25, "call _getenv"], [26, "mov [rbp+var_8], rax"], [27, "cmp [rbp+var_8], 0"], [28, "jz short loc_436024"], [29, "mov rdx, [rbp+var_8]"], [30, "mov rax, [rbp+var_18]"], [31, "mov rsi, rdx"], [32, "mov rdi, rax"], [33, "call sub_4332CF"], [34, "nop"], [35, "leave"], [36, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 7], [9, 6], [10, 3], [11, 9], [12, 10], [16, 15], [17, 16], [18, 17], [19, 16], [20, 3], [21, 19], [22, 20], [26, 25], [27, 26], [28, 27], [29, 26], [30, 3], [31, 29], [32, 30], [36, 25], [36, 33]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2ccf4a36144b806753b4d8b0bd5104a745650a2cbe28986470f69c09b2181958_2ccf4a36144b806753b4d8b0bd5104a745650a2cbe28986470f69c09b2181958.jsonl.gz", "strip_func_name": "sub_435FA0", "query": "\n\n\nchar *__fastcall sub_435FA0(__int64 a1)\n{\nchar *result; // rax\nchar *v2; // [rsp+18h] [rbp-8h]\nchar *v3; // [rsp+18h] [rbp-8h]\n\nv2 = getenv(\"C_INCLUDE_PATH\");\nif ( v2 )\nsub_432F7E(a1, v2);\nv3 = getenv(\"CPATH\");\nif ( v3 )\nsub_432F3B(a1, v3);\nresult = getenv(\"LIBRARY_PATH\");\nif ( result )\nresult = (char *)sub_4332CF(a1, result);\nreturn result;\n}\n\n\n\nQ:[a1,v2,sub_435FA0,sub_432F7E,sub_432F3B,sub_4332CF,]\nAssistant: ", "hints": "[]", "response": "{'a1': 's', 'v2': 'path', 'sub_435FA0': 'set_environment', 'sub_432F7E': 'tcc_add_sysinclude_path', 'sub_432F3B': 'tcc_add_include_path', 'sub_4332CF': 'tcc_add_library_path'}"}
cast_uint8_t
0511078c936c19812cbd063131c8fc4bf53b68db755f45db14e314be4aa05414
oriansj
stage0-posix
NA
uint8_t cast_uint8_t(uint32_t v) { uint8_t r = v & 0xff; return r; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401741", "function_addr": 4200257, "binary_name": "0511078c936c19812cbd063131c8fc4bf53b68db755f45db14e314be4aa05414.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_14], edi"], [3, "mov eax, [rbp+var_14]"], [4, "mov [rbp+var_1], al"], [5, "movzx eax, [rbp+var_1]"], [6, "pop rbp"], [7, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 0], [7, 5]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0511078c936c19812cbd063131c8fc4bf53b68db755f45db14e314be4aa05414_0511078c936c19812cbd063131c8fc4bf53b68db755f45db14e314be4aa05414.jsonl.gz", "strip_func_name": "sub_401741", "query": "\n\n\n__int64 __fastcall sub_401741(unsigned __int8 a1)\n{\nreturn a1;\n}\n\n\n\nQ:[a1,sub_401741,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'v', 'sub_401741': 'cast_uint8_t'}"}
start_srtp
25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0
asterisk
pjproject-archive
NA
static pj_status_t start_srtp(transport_srtp *srtp) { /* Make sure we have the SRTP policies */ if (srtp_crypto_empty(&srtp->tx_policy_neg) || srtp_crypto_empty(&srtp->rx_policy_neg)) { srtp->bypass_srtp = PJ_TRUE; srtp->peer_use = PJMEDIA_SRTP_DISABLED; if (srtp->session_inited) { pjmedia_transport_srtp_stop(&srtp->base); } PJ_LOG(4, (srtp->pool->obj_name, "SRTP not active")); return PJ_SUCCESS; } /* Got policy_local & policy_remote, let's initalize the SRTP */ /* Ticket #1075: media_start() is called whenever media description * gets updated, e.g: call hold, however we should restart SRTP only * when the SRTP policy settings are updated. */ if (srtp_crypto_cmp(&srtp->tx_policy_neg, &srtp->tx_policy) || srtp_crypto_cmp(&srtp->rx_policy_neg, &srtp->rx_policy)) { pj_status_t status; status = pjmedia_transport_srtp_start(&srtp->base, &srtp->tx_policy_neg, &srtp->rx_policy_neg); if (status != PJ_SUCCESS) return status; /* Reset probation counts */ srtp->probation_cnt = PROBATION_CNT_INIT; PJ_LOG(4, (srtp->pool->obj_name, "SRTP started, keying=%s, crypto=%s", ((int)srtp->keying[0]->type==PJMEDIA_SRTP_KEYING_SDES? "SDES":"DTLS-SRTP"), srtp->tx_policy.name.ptr)); } srtp->bypass_srtp = PJ_FALSE; return PJ_SUCCESS; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_442697", "function_addr": 4466327, "binary_name": "25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rax, [rbp+var_18]"], [5, "add rax, 1018h"], [6, "mov rdi, rax"], [7, "call sub_4413AE"], [8, "test eax, eax"], [9, "jnz short loc_4426CF"], [10, "mov rax, [rbp+var_18]"], [11, "add rax, 1040h"], [12, "mov rdi, rax"], [13, "call sub_4413AE"], [14, "test eax, eax"], [15, "jz short loc_442737"], [16, "mov rax, [rbp+var_18]"], [17, "mov dword ptr [rax+0EC0h], 1"], [18, "mov rax, [rbp+var_18]"], [19, "mov dword ptr [rax+10A8h], 0"], [20, "mov rax, [rbp+var_18]"], [21, "mov eax, [rax+0EB8h]"], [22, "test eax, eax"], [23, "jz short loc_442705"], [24, "mov rax, [rbp+var_18]"], [25, "mov rdi, rax"], [26, "call sub_442525"], [27, "call sub_45CD4B"], [28, "cmp eax, 3"], [29, "jle short loc_44272D"], [30, "mov rax, [rbp+var_18]"], [31, "mov rax, [rax+38h]"], [32, "add rax, 10h"], [33, "mov esi, offset aSrtpNotActive"], [34, "mov rdi, rax"], [35, "mov eax, 0"], [36, "call sub_45D6BF"], [37, "mov eax, 0"], [38, "jmp locret_44282B"], [39, "mov rax, [rbp+var_18]"], [40, "lea rdx, [rax+0FC8h]"], [41, "mov rax, [rbp+var_18]"], [42, "add rax, 1018h"], [43, "mov rsi, rdx"], [44, "mov rdi, rax"], [45, "call sub_44133C"], [46, "test eax, eax"], [47, "jnz short loc_442783"], [48, "mov rax, [rbp+var_18]"], [49, "lea rdx, [rax+0FF0h]"], [50, "mov rax, [rbp+var_18]"], [51, "add rax, 1040h"], [52, "mov rsi, rdx"], [53, "mov rdi, rax"], [54, "call sub_44133C"], [55, "test eax, eax"], [56, "jz loc_442818"], [57, "mov rax, [rbp+var_18]"], [58, "lea rdx, [rax+1040h]"], [59, "mov rax, [rbp+var_18]"], [60, "lea rcx, [rax+1018h]"], [61, "mov rax, [rbp+var_18]"], [62, "mov rsi, rcx"], [63, "mov rdi, rax"], [64, "call sub_441AEB"], [65, "mov [rbp+var_4], eax"], [66, "cmp [rbp+var_4], 0"], [67, "jz short loc_4427B6"], [68, "mov eax, [rbp+var_4]"], [69, "jmp short locret_44282B"], [70, "mov rax, [rbp+var_18]"], [71, "mov dword ptr [rax+10ACh], 64h "], [72, "call sub_45CD4B"], [73, "cmp eax, 3"], [74, "jle short loc_442818"], [75, "mov rax, [rbp+var_18]"], [76, "mov rax, [rax+0FD8h]"], [77, "mov rdx, [rbp+var_18]"], [78, "mov rdx, [rdx+10D0h]"], [79, "mov edx, [rdx+20h]"], [80, "test edx, edx"], [81, "jnz short loc_4427F2"], [82, "mov esi, offset aSdes_0"], [83, "jmp short loc_4427F7"], [84, "mov esi, offset aDtlsSrtp"], [85, "mov rdx, [rbp+var_18]"], [86, "mov rdx, [rdx+38h]"], [87, "lea rdi, [rdx+10h]"], [88, "mov rcx, rax"], [89, "mov rdx, rsi"], [90, "mov esi, offset aSrtpStartedKey"], [91, "mov eax, 0"], [92, "call sub_45D6BF"], [93, "mov rax, [rbp+var_18]"], [94, "mov dword ptr [rax+0EC0h], 0"], [95, "mov eax, 0"], [96, "leave"], [97, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [8, 7], [9, 8], [10, 3], [11, 10], [12, 11], [14, 13], [15, 14], [16, 3], [17, 16], [18, 3], [19, 18], [20, 3], [21, 20], [21, 19], [22, 21], [23, 22], [24, 3], [25, 24], [28, 27], [29, 28], [30, 3], [31, 17], [31, 19], [31, 30], [32, 31], [34, 32], [39, 3], [40, 39], [41, 3], [42, 41], [43, 40], [44, 42], [46, 45], [47, 46], [48, 3], [49, 48], [49, 40], [50, 3], [51, 50], [52, 49], [53, 51], [55, 54], [56, 55], [57, 3], [58, 40], [58, 49], [58, 57], [59, 3], [60, 59], [61, 3], [62, 60], [63, 61], [65, 64], [66, 65], [67, 66], [68, 65], [70, 3], [71, 70], [73, 72], [74, 73], [75, 3], [76, 71], [76, 75], [77, 3], [78, 77], [78, 71], [79, 78], [79, 71], [80, 79], [81, 80], [85, 3], [86, 85], [86, 71], [87, 71], [87, 63], [87, 86], [88, 76], [89, 82], [89, 84], [93, 3], [94, 93], [97, 95], [97, 37], [97, 68]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0_25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0.jsonl.gz", "strip_func_name": "sub_442697", "query": "\n\n\n__int64 __fastcall sub_442697(__int64 a1, const char *a2)\n{\n__int64 v2; // rdi\nint v3; // edx\nint v4; // ecx\nint v5; // er8\nint v6; // er9\n__int64 result; // rax\nint v8; // er8\nint v9; // er9\nconst char *v10; // rsi\nunsigned int v12; // [rsp+1Ch] [rbp-4h]\n\nv2 = a1 + 4120;\nif ( sub_4413AE(v2) || (v2 = a1 + 4160, sub_4413AE(a1 + 4160)) )\n{\n*(_DWORD *)(a1 + 3776) = 1;\n*(_DWORD *)(a1 + 4264) = 0;\nif ( *(_DWORD *)(a1 + 3768) )\n{\nv2 = a1;\nsub_442525(a1, a2);\n}\nif ( (int)sub_45CD4B(v2, a2) > 3 )\nsub_45D6BF(*(_DWORD *)(a1 + 56) + 16, (unsigned int)\"SRTP not active\", v3, v4, v5, v6);\nresult = 0LL;\n}\nelse\n{\nif ( (unsigned int)sub_44133C(a1 + 4120, a1 + 4040) || (unsigned int)sub_44133C(a1 + 4160, a1 + 4080) )\n{\nv12 = sub_441AEB(a1, (char **)(a1 + 4120), (char **)(a1 + 4160));\nif ( v12 )\nreturn v12;\n*(_DWORD *)(a1 + 4268) = 100;\nif ( (int)sub_45CD4B(a1, a1 + 4120) > 3 )\n{\nif ( *(_DWORD *)(*(_QWORD *)(a1 + 4304) + 32LL) )\nv10 = \"DTLS-SRTP\";\nelse\nv10 = \"SDES\";\nsub_45D6BF(\n*(_DWORD *)(a1 + 56) + 16,\n(unsigned int)\"SRTP started, keying=%s, crypto=%s\",\n(_DWORD)v10,\n*(_QWORD *)(a1 + 4056),\nv8,\nv9);\n}\n}\n*(_DWORD *)(a1 + 3776) = 0;\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,v2,v12,sub_442697,sub_4413AE,sub_442525,sub_45CD4B,sub_45D6BF,sub_44133C,sub_441AEB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'srtp', 'v2': 'srtp', 'v12': 'status', 'sub_442697': 'start_srtp', 'sub_4413AE': 'srtp_crypto_empty', 'sub_442525': 'pjmedia_transport_srtp_stop', 'sub_45CD4B': 'pj_log_get_level', 'sub_45D6BF': 'pj_log_4', 'sub_44133C': 'srtp_crypto_cmp', 'sub_441AEB': 'pjmedia_transport_srtp_start'}"}
x509_id_wfa_tod_tofu_oid
208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2
vanhoefm
fragattacks
NA
static int x509_id_wfa_tod_tofu_oid(struct asn1_oid *oid) { return oid->len == 10 && x509_id_wfa_tod_oid(oid) && oid->oid[9] == 2; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4A1866", "function_addr": 4855910, "binary_name": "208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 8"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "mov rax, [rax+0A0h]"], [6, "cmp rax, 0Ah"], [7, "jnz short loc_4A18A8"], [8, "mov rax, [rbp+var_8]"], [9, "mov rdi, rax"], [10, "call sub_4A17C6"], [11, "test eax, eax"], [12, "jz short loc_4A18A8"], [13, "mov rax, [rbp+var_8]"], [14, "mov rax, [rax+48h]"], [15, "cmp rax, 2"], [16, "jnz short loc_4A18A8"], [17, "mov eax, 1"], [18, "jmp short locret_4A18AD"], [19, "mov eax, 0"], [20, "leave"], [21, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 3], [9, 8], [11, 10], [12, 11], [13, 3], [14, 13], [15, 14], [16, 15], [21, 19], [21, 17]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2_208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2.jsonl.gz", "strip_func_name": "sub_4A1866", "query": "\n\n\n_BOOL8 __fastcall sub_4A1866(_QWORD *a1)\n{\nreturn a1[20] == 10LL && sub_4A17C6(a1) && a1[9] == 2LL;\n}\n\n\n\nQ:[a1,sub_4A1866,sub_4A17C6,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'oid', 'sub_4A1866': 'x509_id_wfa_tod_tofu_oid', 'sub_4A17C6': 'x509_id_wfa_tod_oid'}"}
ds_unlock
beb4a42d24b9ba4d560525eae3908ec5a3a34668bfa7bc2675aa183ab9394c92
Netflix
dial-reference
NA
static int ds_unlock(DIALServer *ds) { int err = 0; if ((err = pthread_mutex_unlock(&ds->mux)) != 0) { printf("Unable to release DS mutex: [%d]", err); return 0; } return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40396E", "function_addr": 4209006, "binary_name": "beb4a42d24b9ba4d560525eae3908ec5a3a34668bfa7bc2675aa183ab9394c92.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_4], 0"], [5, "mov rax, [rbp+var_18]"], [6, "add rax, 10h"], [7, "mov rdi, rax"], [8, "call _pthread_mutex_unlock"], [9, "mov [rbp+var_4], eax"], [10, "cmp [rbp+var_4], 0"], [11, "jz short loc_4039B7"], [12, "mov eax, [rbp+var_4]"], [13, "mov esi, eax"], [14, "lea rdi, aUnableToReleas"], [15, "mov eax, 0"], [16, "call _printf"], [17, "mov eax, 0"], [18, "jmp short locret_4039BC"], [19, "mov eax, 1"], [20, "leave"], [21, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [9, 8], [10, 9], [11, 10], [12, 9], [13, 12], [14, 7], [21, 19], [21, 17]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/beb4a42d24b9ba4d560525eae3908ec5a3a34668bfa7bc2675aa183ab9394c92_beb4a42d24b9ba4d560525eae3908ec5a3a34668bfa7bc2675aa183ab9394c92.jsonl.gz", "strip_func_name": "sub_40396E", "query": "\n\n\n__int64 __fastcall sub_40396E(__int64 a1)\n{\nunsigned int v2; // [rsp+1Ch] [rbp-4h]\n\nv2 = pthread_mutex_unlock((pthread_mutex_t *)(a1 + 16));\nif ( !v2 )\nreturn 1LL;\nprintf(\"Unable to release DS mutex: [%d]\", v2);\nreturn 0LL;\n}\n\n\n\nQ:[a1,v2,sub_40396E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ds_0', 'v2': 'err', 'sub_40396E': 'ds_unlock'}"}
add_resolve_entry
05a784cbaf63e77696cf61106257fb3d5370a16def412a568e4bf7f4bb9147ce
guidovranken
libfuzzer-js
NA
static int add_resolve_entry(JSContext *ctx, JSResolveState *s, JSModuleDef *m, JSAtom name) { JSResolveEntry *re; if (js_resize_array(ctx, (void **)&s->array, sizeof(JSResolveEntry), &s->size, s->count + 1)) return -1; re = &s->array[s->count++]; re->module = m; re->name = JS_DupAtom(ctx, name); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4547A1", "function_addr": 4540321, "binary_name": "05a784cbaf63e77696cf61106257fb3d5370a16def412a568e4bf7f4bb9147ce.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov [rbp+var_2C], ecx"], [7, "mov rax, [rbp+var_20]"], [8, "mov eax, [rax+0Ch]"], [9, "lea ecx, [rax+1]"], [10, "mov rax, [rbp+var_20]"], [11, "lea rdx, [rax+8]"], [12, "mov rsi, [rbp+var_20]"], [13, "mov rax, [rbp+var_18]"], [14, "mov r8d, ecx"], [15, "mov rcx, rdx"], [16, "mov edx, 10h"], [17, "mov rdi, rax"], [18, "call sub_40B4C9"], [19, "test eax, eax"], [20, "jz short loc_4547F0"], [21, "mov eax, 0FFFFFFFFh"], [22, "jmp short locret_45483D"], [23, "mov rax, [rbp+var_20]"], [24, "mov rsi, [rax]"], [25, "mov rax, [rbp+var_20]"], [26, "mov eax, [rax+0Ch]"], [27, "lea ecx, [rax+1]"], [28, "mov rdx, [rbp+var_20]"], [29, "mov [rdx+0Ch], ecx"], [30, "cdqe"], [31, "shl rax, 4"], [32, "add rax, rsi"], [33, "mov [rbp+var_8], rax"], [34, "mov rax, [rbp+var_8]"], [35, "mov rdx, [rbp+var_28]"], [36, "mov [rax], rdx"], [37, "mov edx, [rbp+var_2C]"], [38, "mov rax, [rbp+var_18]"], [39, "mov esi, edx"], [40, "mov rdi, rax"], [41, "call sub_40D8B3"], [42, "mov rdx, [rbp+var_8]"], [43, "mov [rdx+8], eax"], [44, "mov eax, 0"], [45, "leave"], [46, "retn"]], "data_dep": [[7, 4], [8, 7], [9, 8], [10, 4], [11, 10], [12, 4], [13, 3], [14, 9], [15, 11], [17, 13], [19, 18], [20, 19], [23, 4], [24, 23], [25, 4], [26, 25], [27, 15], [27, 26], [28, 4], [29, 28], [29, 27], [31, 26], [32, 31], [32, 24], [33, 32], [34, 33], [35, 5], [36, 34], [36, 35], [37, 6], [38, 3], [39, 37], [40, 38], [42, 33], [43, 42], [43, 41], [46, 44], [46, 21]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/05a784cbaf63e77696cf61106257fb3d5370a16def412a568e4bf7f4bb9147ce_05a784cbaf63e77696cf61106257fb3d5370a16def412a568e4bf7f4bb9147ce.jsonl.gz", "strip_func_name": "sub_4547A1", "query": "\n\n\n__int64 __fastcall sub_4547A1(__int64 a1, __int64 a2, __int64 a3, unsigned int a4)\n{\n__int64 v5; // rsi\nint v6; // eax\n__int64 v10; // [rsp+28h] [rbp-8h]\n\nif ( (unsigned int)sub_40B4C9(a1, (__int64 *)a2, 16, (signed int *)(a2 + 8), *(_DWORD *)(a2 + 12) + 1) )\nreturn 0xFFFFFFFFLL;\nv5 = *(_QWORD *)a2;\nv6 = *(_DWORD *)(a2 + 12);\n*(_DWORD *)(a2 + 12) = v6 + 1;\nv10 = v5 + 16LL * v6;\n*(_QWORD *)v10 = a3;\n*(_DWORD *)(v10 + 8) = sub_40D8B3(a1, a4);\nreturn 0LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,v10,sub_4547A1,sub_40B4C9,sub_40D8B3,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'm', 'a4': 'name', 'a1': 'ctx', 'a2': 's', 'v10': 're', 'sub_4547A1': 'add_resolve_entry', 'sub_40B4C9': 'js_resize_array', 'sub_40D8B3': 'JS_DupAtom'}"}
sm_run_activate_connection
1cdcd09e088b6ff1db54fa3ae8a0c70f8f219b2e121d0ce2b5639ebfe341cfd3
Matheus-Garbelini
esp32_bluetooth_classic_sniffer
NA
static void sm_run_activate_connection(void){ // Find connections that requires setup context and make active if no other is locked btstack_linked_list_iterator_t it; hci_connections_get_iterator(&it); while((sm_active_connection_handle == HCI_CON_HANDLE_INVALID) && btstack_linked_list_iterator_has_next(&it)){ hci_connection_t * hci_connection = (hci_connection_t *) btstack_linked_list_iterator_next(&it); sm_connection_t * sm_connection = &hci_connection->sm_connection; // - if no connection locked and we're ready/waiting for setup context, fetch it and start bool done = true; int err; UNUSED(err); #ifdef ENABLE_LE_SECURE_CONNECTIONS // assert ec key is ready if ( (sm_connection->sm_engine_state == SM_RESPONDER_PH1_PAIRING_REQUEST_RECEIVED) || (sm_connection->sm_engine_state == SM_INITIATOR_PH1_W2_SEND_PAIRING_REQUEST) || (sm_connection->sm_engine_state == SM_RESPONDER_SEND_SECURITY_REQUEST)){ if (ec_key_generation_state == EC_KEY_GENERATION_IDLE){ sm_ec_generate_new_key(); } if (ec_key_generation_state != EC_KEY_GENERATION_DONE){ continue; } } #endif switch (sm_connection->sm_engine_state) { #ifdef ENABLE_LE_PERIPHERAL case SM_RESPONDER_SEND_SECURITY_REQUEST: case SM_RESPONDER_PH1_PAIRING_REQUEST_RECEIVED: case SM_RESPONDER_PH0_RECEIVED_LTK_REQUEST: #ifdef ENABLE_LE_SECURE_CONNECTIONS case SM_SC_RECEIVED_LTK_REQUEST: #endif #endif #ifdef ENABLE_LE_CENTRAL case SM_INITIATOR_PH4_HAS_LTK: case SM_INITIATOR_PH1_W2_SEND_PAIRING_REQUEST: #endif // just lock context break; default: done = false; break; } if (done){ sm_active_connection_handle = sm_connection->sm_handle; log_info("sm: connection 0x%04x locked setup context as %s, state %u", sm_active_connection_handle, sm_connection->sm_role ? "responder" : "initiator", sm_connection->sm_engine_state); } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_429CE5", "function_addr": 4365541, "binary_name": "1cdcd09e088b6ff1db54fa3ae8a0c70f8f219b2e121d0ce2b5639ebfe341cfd3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "lea rax, [rbp+var_30]"], [4, "mov rdi, rax"], [5, "call sub_40ADD6"], [6, "jmp loc_429E06"], [7, "lea rax, [rbp+var_30]"], [8, "mov rdi, rax"], [9, "call sub_408A65"], [10, "mov [rbp+var_10], rax"], [11, "mov rax, [rbp+var_10]"], [12, "add rax, 77Ch"], [13, "mov [rbp+var_18], rax"], [14, "mov [rbp+var_1], 1"], [15, "mov rax, [rbp+var_18]"], [16, "mov eax, [rax+0Ch]"], [17, "cmp eax, 20h "], [18, "jz short loc_429D44"], [19, "mov rax, [rbp+var_18]"], [20, "mov eax, [rax+0Ch]"], [21, "cmp eax, 2Ah "], [22, "jz short loc_429D44"], [23, "mov rax, [rbp+var_18]"], [24, "mov eax, [rax+0Ch]"], [25, "cmp eax, 1Bh"], [26, "jnz short loc_429D63"], [27, "mov eax, cs:dword_45FA60"], [28, "test eax, eax"], [29, "jnz short loc_429D53"], [30, "call sub_42E0EB"], [31, "mov eax, cs:dword_45FA60"], [32, "cmp eax, 2"], [33, "jz short loc_429D63"], [34, "jmp loc_429E06"], [35, "mov rax, [rbp+var_18]"], [36, "mov eax, [rax+0Ch]"], [37, "cmp eax, 30h "], [38, "setnbe dl"], [39, "test dl, dl"], [40, "jnz short loc_429D95"], [41, "mov edx, 1"], [42, "mov ecx, eax"], [43, "shl rdx, cl"], [44, "mov rax, 1840118000000h"], [45, "and rax, rdx"], [46, "test rax, rax"], [47, "setnz al"], [48, "test al, al"], [49, "jnz short loc_429D9B"], [50, "mov [rbp+var_1], 0"], [51, "jmp short loc_429D9C"], [52, "nop"], [53, "cmp [rbp+var_1], 0"], [54, "jz short loc_429E06"], [55, "mov rax, [rbp+var_18]"], [56, "movzx eax, word ptr [rax]"], [57, "mov cs:word_45E2A8, ax"], [58, "mov rax, [rbp+var_18]"], [59, "mov eax, [rax+0Ch]"], [60, "mov rdx, [rbp+var_18]"], [61, "movzx edx, byte ptr [rdx+2]"], [62, "test dl, dl"], [63, "jz short loc_429DCA"], [64, "mov ecx, offset aResponder"], [65, "jmp short loc_429DCF"], [66, "mov ecx, offset aInitiator"], [67, "movzx edx, cs:word_45E2A8"], [68, "movzx edx, dx"], [69, "sub rsp, 8"], [70, "push rax"], [71, "mov r9, rcx"], [72, "mov r8d, edx"], [73, "mov ecx, 8EDh"], [74, "mov edx, offset aSmC"], [75, "mov esi, offset aSUSmConnection_0"], [76, "mov edi, 1"], [77, "mov eax, 0"], [78, "call sub_417964"], [79, "add rsp, 10h"], [80, "movzx eax, cs:word_45E2A8"], [81, "cmp ax, 0FFFFh"], [82, "jnz short loc_429E27"], [83, "lea rax, [rbp+var_30]"], [84, "mov rdi, rax"], [85, "call sub_408A05"], [86, "test al, al"], [87, "jnz loc_429CFE"], [88, "nop"], [89, "leave"], [90, "retn"]], "data_dep": [[4, 3], [7, 86], [8, 7], [10, 9], [11, 10], [12, 11], [13, 12], [15, 13], [16, 15], [17, 16], [18, 17], [19, 13], [20, 19], [21, 20], [22, 21], [23, 13], [24, 23], [25, 24], [26, 25], [28, 27], [29, 28], [32, 31], [33, 32], [35, 13], [36, 35], [37, 36], [38, 74], [38, 37], [38, 43], [38, 39], [39, 38], [40, 39], [42, 36], [43, 42], [43, 41], [45, 43], [45, 44], [46, 45], [47, 46], [48, 47], [49, 48], [53, 14], [53, 50], [54, 53], [55, 13], [56, 55], [57, 56], [58, 13], [59, 58], [60, 13], [61, 60], [62, 61], [63, 62], [67, 57], [68, 67], [69, 79], [69, 2], [70, 59], [71, 64], [71, 66], [72, 68], [79, 69], [80, 57], [81, 80], [82, 81], [83, 80], [84, 83], [86, 85], [87, 86], [90, 80], [90, 86]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1cdcd09e088b6ff1db54fa3ae8a0c70f8f219b2e121d0ce2b5639ebfe341cfd3_1cdcd09e088b6ff1db54fa3ae8a0c70f8f219b2e121d0ce2b5639ebfe341cfd3.jsonl.gz", "strip_func_name": "sub_429CE5", "query": "\n\n\nchar sub_429CE5()\n{\nunsigned int v0; // eax\nchar result; // al\nchar v2[24]; // [rsp+0h] [rbp-30h] BYREF\n__int64 v3; // [rsp+18h] [rbp-18h]\n__int64 v4; // [rsp+20h] [rbp-10h]\nchar v5; // [rsp+2Fh] [rbp-1h]\n\nsub_40ADD6((__int64)v2);\nwhile ( 1 )\n{\nresult = word_45E2A8;\nif ( word_45E2A8 != -1 )\nbreak;\nresult = sub_408A05((__int64)v2);\nif ( !result )\nbreak;\nv4 = sub_408A65((__int64)v2);\nv3 = v4 + 1916;\nv5 = 1;\nif ( *(_DWORD *)(v4 + 1928) == 32 || *(_DWORD *)(v3 + 12) == 42 || *(_DWORD *)(v3 + 12) == 27 )\n{\nif ( !dword_45FA60 )\nsub_42E0EB();\nif ( dword_45FA60 != 2 )\ncontinue;\n}\nv0 = *(_DWORD *)(v3 + 12);\nif ( v0 > 0x30 || ((1LL << v0) & 0x1840118000000LL) == 0 )\nv5 = 0;\nif ( v5 )\n{\nword_45E2A8 = *(_WORD *)v3;\nif ( *(_BYTE *)(v3 + 2) )\nsub_417964(\n1,\n(__int64)\"%s.%u: sm: connection 0x%04x locked setup context as %s, state %u\",\n(__int64)\"sm.c\",\n2285LL,\n(unsigned __int16)word_45E2A8,\n(__int64)\"responder\",\n*(unsigned int *)(v3 + 12));\nelse\nsub_417964(\n1,\n(__int64)\"%s.%u: sm: connection 0x%04x locked setup context as %s, state %u\",\n(__int64)\"sm.c\",\n2285LL,\n(unsigned __int16)word_45E2A8,\n(__int64)\"initiator\",\n*(unsigned int *)(v3 + 12));\n}\n}\nreturn result;\n}\n\n\n\nQ:[v2,v3,v4,v5,sub_429CE5,sub_40ADD6,sub_408A05,sub_408A65,sub_42E0EB,sub_417964,]\nAssistant: ", "hints": "[]", "response": "{'v2': 'it', 'v3': 'sm_connection', 'v4': 'hci_connection', 'v5': 'done', 'sub_429CE5': 'sm_run_activate_connection', 'sub_40ADD6': 'hci_connections_get_iterator', 'sub_408A05': 'btstack_linked_list_iterator_has_next', 'sub_408A65': 'btstack_linked_list_iterator_next', 'sub_42E0EB': 'sm_ec_generate_new_key', 'sub_417964': 'hci_dump_log'}"}
floppy_eject
4fbb6a74e2ad3f4c585310e151f8d7bcb41c07a46ac1bd2edcece161fa67755f
ESOS-Lab
VSSIM
NA
static int floppy_eject(BlockDriverState *bs, int eject_flag) { BDRVRawState *s = bs->opaque; int fd; if (s->fd >= 0) { close(s->fd); s->fd = -1; } fd = open(bs->filename, s->open_flags | O_NONBLOCK); if (fd >= 0) { if (ioctl(fd, FDEJECT, 0) < 0) perror("FDEJECT"); close(fd); } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4256AB", "function_addr": 4347563, "binary_name": "4fbb6a74e2ad3f4c585310e151f8d7bcb41c07a46ac1bd2edcece161fa67755f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_1C], esi"], [5, "mov rax, [rbp+var_18]"], [6, "mov rax, [rax+38h]"], [7, "mov [rbp+var_8], rax"], [8, "mov rax, [rbp+var_8]"], [9, "mov eax, [rax]"], [10, "test eax, eax"], [11, "js short loc_4256E7"], [12, "mov rax, [rbp+var_8]"], [13, "mov eax, [rax]"], [14, "mov edi, eax"], [15, "call _close"], [16, "mov rax, [rbp+var_8]"], [17, "mov dword ptr [rax], 0FFFFFFFFh"], [18, "mov rax, [rbp+var_8]"], [19, "mov eax, [rax+0Ch]"], [20, "or ah, 8"], [21, "mov edx, eax"], [22, "mov rax, [rbp+var_18]"], [23, "add rax, 40h "], [24, "mov esi, edx"], [25, "mov rdi, rax"], [26, "mov eax, 0"], [27, "call _open64"], [28, "mov [rbp+fd], eax"], [29, "cmp [rbp+fd], 0"], [30, "js short loc_425744"], [31, "mov eax, [rbp+fd]"], [32, "mov edx, 0"], [33, "mov esi, 25Ah"], [34, "mov edi, eax"], [35, "mov eax, 0"], [36, "call _ioctl"], [37, "test eax, eax"], [38, "jns short loc_42573A"], [39, "mov edi, offset aFdeject"], [40, "call _perror"], [41, "mov eax, [rbp+fd]"], [42, "mov edi, eax"], [43, "call _close"], [44, "mov eax, 0"], [45, "leave"], [46, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [12, 7], [13, 12], [14, 13], [16, 7], [17, 16], [18, 7], [19, 18], [19, 17], [20, 19], [21, 20], [22, 3], [23, 22], [24, 21], [25, 23], [28, 27], [29, 28], [30, 29], [31, 28], [34, 31], [37, 36], [38, 37], [41, 28], [42, 41], [46, 44]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4fbb6a74e2ad3f4c585310e151f8d7bcb41c07a46ac1bd2edcece161fa67755f_4fbb6a74e2ad3f4c585310e151f8d7bcb41c07a46ac1bd2edcece161fa67755f.jsonl.gz", "strip_func_name": "sub_4256AB", "query": "\n\n\n__int64 __fastcall sub_4256AB(__int64 a1)\n{\nint v1; // eax\nint fd; // [rsp+14h] [rbp-Ch]\nint *v4; // [rsp+18h] [rbp-8h]\n\nv4 = *(int **)(a1 + 56);\nif ( *v4 >= 0 )\n{\nclose(*v4);\n*v4 = -1;\n}\nv1 = v4[3];\nBYTE1(v1) |= 8u;\nfd = open64((const char *)(a1 + 64), v1);\nif ( fd >= 0 )\n{\nif ( ioctl(fd, 0x25AuLL, 0LL) < 0 )\nperror(\"FDEJECT\");\nclose(fd);\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,v4,sub_4256AB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'bs', 'v4': 's', 'sub_4256AB': 'floppy_eject'}"}
s_secure_log_unique
dd1ff0e4669f93380ed9fd7e06bc6887c7f71c1897119ba61f472370a436c8a8
darwin-on-arm
darwin-sdk
NA
static void s_secure_log_unique( uintptr_t value) { FILE *secure_log_fp; char *log_msg, c; if(s_secure_log_used != FALSE) as_fatal(".secure_log_unique specified multiple times"); if(secure_log_file == FALSE) as_fatal(".secure_log_unique used but AS_SECURE_LOG_FILE " "environment variable unset."); log_msg = input_line_pointer; do{ c = *input_line_pointer++; } while(is_end_of_line(c) == FALSE); *--input_line_pointer = 0; if((secure_log_fp = fopen(secure_log_file, "a+"))){ char *file; unsigned int line; as_file_and_line(&file, &line); fprintf(secure_log_fp, "%s:%d:%s\n", (file != NULL) ? file : "unknown", line, log_msg); fclose(secure_log_fp); } else as_fatal("couldn't write to secure log file: \"%s\"", secure_log_file); s_secure_log_used = TRUE; *input_line_pointer = c; demand_empty_rest_of_line(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_412064", "function_addr": 4268132, "binary_name": "dd1ff0e4669f93380ed9fd7e06bc6887c7f71c1897119ba61f472370a436c8a8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov eax, cs:dword_44EFA0"], [5, "test eax, eax"], [6, "jz short loc_412089"], [7, "mov edi, offset aSecureLogUniqu"], [8, "mov eax, 0"], [9, "call sub_40B673"], [10, "mov rax, cs:filename"], [11, "test rax, rax"], [12, "jnz short loc_4120A4"], [13, "mov edi, offset aSecureLogUniqu_0"], [14, "mov eax, 0"], [15, "call sub_40B673"], [16, "mov rax, cs:s1"], [17, "mov [rbp+var_8], rax"], [18, "mov rax, cs:s1"], [19, "lea rdx, [rax+1]"], [20, "mov cs:s1, rdx"], [21, "movzx eax, byte ptr [rax]"], [22, "mov [rbp+var_9], al"], [23, "movsx eax, [rbp+var_9]"], [24, "mov edi, eax"], [25, "call sub_40BA5C"], [26, "test al, al"], [27, "jz short loc_4120AF"], [28, "mov rax, cs:s1"], [29, "sub rax, 1"], [30, "mov cs:s1, rax"], [31, "mov rax, cs:s1"], [32, "mov byte ptr [rax], 0"], [33, "mov rax, cs:filename"], [34, "mov esi, offset aA"], [35, "mov rdi, rax"], [36, "call _fopen"], [37, "mov [rbp+stream], rax"], [38, "cmp [rbp+stream], 0"], [39, "jz short loc_412168"], [40, "lea rdx, [rbp+var_24]"], [41, "lea rax, [rbp+var_20]"], [42, "mov rsi, rdx"], [43, "mov rdi, rax"], [44, "call sub_408F68"], [45, "mov edx, [rbp+var_24]"], [46, "mov rax, [rbp+var_20]"], [47, "test rax, rax"], [48, "jz short loc_412136"], [49, "mov rax, [rbp+var_20]"], [50, "jmp short loc_41213B"], [51, "mov eax, offset aUnknown"], [52, "mov rcx, [rbp+var_8]"], [53, "mov rdi, [rbp+stream]"], [54, "mov r8, rcx"], [55, "mov ecx, edx"], [56, "mov rdx, rax"], [57, "mov esi, offset aSDS"], [58, "mov eax, 0"], [59, "call _fprintf"], [60, "mov rax, [rbp+stream]"], [61, "mov rdi, rax"], [62, "call _fclose"], [63, "jmp short loc_412181"], [64, "mov rax, cs:filename"], [65, "mov rsi, rax"], [66, "mov edi, offset aCouldnTWriteTo_0"], [67, "mov eax, 0"], [68, "call sub_40B673"], [69, "mov cs:dword_44EFA0, 1"], [70, "mov rax, cs:s1"], [71, "movzx edx, [rbp+var_9]"], [72, "mov [rax], dl"], [73, "call sub_40F1D0"], [74, "nop"], [75, "leave"], [76, "retn"]], "data_dep": [[5, 4], [6, 5], [11, 10], [12, 11], [17, 16], [18, 20], [19, 18], [19, 19], [20, 19], [21, 18], [22, 21], [23, 22], [24, 23], [26, 25], [27, 26], [28, 20], [29, 28], [30, 29], [31, 30], [32, 31], [35, 33], [37, 36], [38, 37], [39, 38], [40, 19], [41, 36], [42, 40], [43, 41], [47, 46], [48, 47], [52, 17], [53, 37], [54, 52], [55, 45], [56, 49], [56, 51], [60, 37], [61, 60], [65, 64], [70, 30], [71, 22], [72, 71], [72, 70], [76, 73]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/dd1ff0e4669f93380ed9fd7e06bc6887c7f71c1897119ba61f472370a436c8a8_dd1ff0e4669f93380ed9fd7e06bc6887c7f71c1897119ba61f472370a436c8a8.jsonl.gz", "strip_func_name": "sub_412064", "query": "\n\n\nchar *__fastcall sub_412064(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\nunsigned __int8 *v6; // rax\n__int64 v7; // rdx\n__int64 v8; // rcx\n__int64 v9; // r8\n__int64 v10; // r9\nconst char *v11; // rax\nunsigned int v13; // [rsp+1Ch] [rbp-24h] BYREF\nconst char *v14; // [rsp+20h] [rbp-20h] BYREF\nFILE *stream; // [rsp+28h] [rbp-18h]\nchar v16; // [rsp+37h] [rbp-9h]\nchar *v17; // [rsp+38h] [rbp-8h]\n\nif ( dword_44EFA0 )\nsub_40B673(\".secure_log_unique specified multiple times\", a2, a3, a4, a5, a6);\nif ( !filename )\nsub_40B673(\".secure_log_unique used but AS_SECURE_LOG_FILE environment variable unset.\", a2, a3, a4, a5, a6);\nv17 = s1;\ndo\n{\nv6 = (unsigned __int8 *)s1++;\nv16 = *v6;\n}\nwhile ( !(unsigned __int8)sub_40BA5C(v16) );\n*--s1 = 0;\nstream = fopen(filename, \"a+\");\nif ( !stream )\nsub_40B673(\"couldn't write to secure log file: \\\"%s\\\"\", (__int64)filename, v7, v8, v9, v10);\nsub_408F68((__int64 *)&v14, &v13);\nif ( v14 )\nv11 = v14;\nelse\nv11 = \"unknown\";\nfprintf(stream, \"%s:%d:%s\\n\", v11, v13, v17);\nfclose(stream);\ndword_44EFA0 = 1;\n*s1 = v16;\nreturn sub_40F1D0();\n}\n\n\n\nQ:[a1,v13,v14,stream,v16,v17,sub_412064,sub_40B673,sub_40BA5C,sub_408F68,sub_40F1D0,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'value', 'v13': 'line', 'v14': 'file', 'stream': 'secure_log_fp', 'v16': 'c', 'v17': 'log_msg', 'sub_412064': 's_secure_log_unique', 'sub_40B673': 'as_fatal', 'sub_40BA5C': 'is_end_of_line', 'sub_408F68': 'as_file_and_line', 'sub_40F1D0': 'demand_empty_rest_of_line'}"}
_sim_activate
5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99
open-simh
simh
NA
t_stat _sim_activate (UNIT *uptr, int32 event_time) { UNIT *cptr, *prvptr; int32 accum; AIO_ACTIVATE (_sim_activate, uptr, event_time); if (sim_is_active (uptr)) /* already active? */ return SCPE_OK; UPDATE_SIM_TIME; /* update sim time */ sim_debug (SIM_DBG_ACTIVATE, &sim_scp_dev, "Activating %s delay=%d\n", sim_uname (uptr), event_time); prvptr = NULL; accum = 0; for (cptr = sim_clock_queue; cptr != QUEUE_LIST_END; cptr = cptr->next) { if (event_time < (accum + cptr->time)) break; accum = accum + cptr->time; prvptr = cptr; } if (prvptr == NULL) { /* insert at head */ cptr = uptr->next = sim_clock_queue; sim_clock_queue = uptr; } else { cptr = uptr->next = prvptr->next; /* insert at prvptr */ prvptr->next = uptr; } uptr->time = event_time - accum; if (cptr != QUEUE_LIST_END) cptr->time = cptr->time - uptr->time; sim_interval = sim_clock_queue->time; return SCPE_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_431727", "function_addr": 4396839, "binary_name": "5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 38h"], [4, "mov [rbp+var_38], rdi"], [5, "mov [rbp+var_3C], esi"], [6, "mov rbx, cs:thread2"], [7, "call _pthread_self"], [8, "mov rsi, rbx"], [9, "mov rdi, rax"], [10, "call _pthread_equal"], [11, "test eax, eax"], [12, "jnz short loc_431770"], [13, "mov edx, [rbp+var_3C]"], [14, "mov rax, [rbp+var_38]"], [15, "mov rsi, rax"], [16, "mov edi, offset sub_431727"], [17, "call sub_413B21"], [18, "mov eax, 0"], [19, "jmp loc_431960"], [20, "mov rax, [rbp+var_38]"], [21, "mov rdi, rax"], [22, "call sub_431FB2"], [23, "test eax, eax"], [24, "jz short loc_43178A"], [25, "mov eax, 0"], [26, "jmp loc_431960"], [27, "mov edi, offset mutex"], [28, "call _pthread_mutex_lock"], [29, "mov rax, cs:qword_4FBF30"], [30, "cmp rax, 1"], [31, "jnz short loc_4317AC"], [32, "mov eax, cs:dword_52AFAC"], [33, "mov [rbp+var_28], eax"], [34, "jmp short loc_4317B9"], [35, "mov rax, cs:qword_4FBF30"], [36, "mov eax, [rax+34h]"], [37, "mov [rbp+var_28], eax"], [38, "mov edx, cs:dword_52A790"], [39, "mov eax, [rbp+var_28]"], [40, "sub eax, edx"], [41, "pxor xmm1, xmm1"], [42, "cvtsi2sd xmm1, eax"], [43, "movsd xmm0, cs:qword_52AFA0"], [44, "addsd xmm0, xmm1"], [45, "movsd cs:qword_52AFA0, xmm0"], [46, "mov edx, cs:dword_52A790"], [47, "mov eax, [rbp+var_28]"], [48, "sub eax, edx"], [49, "mov edx, eax"], [50, "mov eax, cs:dword_52AFA8"], [51, "add eax, edx"], [52, "mov cs:dword_52AFA8, eax"], [53, "mov rax, cs:qword_4FBF30"], [54, "cmp rax, 1"], [55, "jnz short loc_431816"], [56, "mov eax, cs:dword_52A790"], [57, "mov cs:dword_52AFAC, eax"], [58, "jmp short loc_431826"], [59, "mov rax, cs:qword_4FBF30"], [60, "mov edx, cs:dword_52A790"], [61, "mov [rax+34h], edx"], [62, "mov edi, offset mutex"], [63, "call _pthread_mutex_unlock"], [64, "mov rax, cs:qword_52A9E0"], [65, "test rax, rax"], [66, "jz short loc_431879"], [67, "mov eax, cs:dword_4FBED4"], [68, "and eax, 20000000h"], [69, "test eax, eax"], [70, "jz short loc_431879"], [71, "mov rax, [rbp+var_38]"], [72, "mov rdi, rax"], [73, "call sub_42778B"], [74, "mov edx, [rbp+var_3C]"], [75, "mov r8d, edx"], [76, "mov rcx, rax"], [77, "mov edx, offset aActivatingSDel"], [78, "mov esi, offset off_4FBE60"], [79, "mov edi, 20000000h"], [80, "mov eax, 0"], [81, "call sub_438D9A"], [82, "mov [rbp+var_20], 0"], [83, "mov [rbp+var_24], 0"], [84, "mov rax, cs:qword_4FBF30"], [85, "mov [rbp+var_18], rax"], [86, "jmp short loc_4318C3"], [87, "mov rax, [rbp+var_18]"], [88, "mov edx, [rax+34h]"], [89, "mov eax, [rbp+var_24]"], [90, "add eax, edx"], [91, "cmp [rbp+var_3C], eax"], [92, "jl short loc_4318CC"], [93, "mov rax, [rbp+var_18]"], [94, "mov eax, [rax+34h]"], [95, "add [rbp+var_24], eax"], [96, "mov rax, [rbp+var_18]"], [97, "mov [rbp+var_20], rax"], [98, "mov rax, [rbp+var_18]"], [99, "mov rax, [rax]"], [100, "mov [rbp+var_18], rax"], [101, "cmp [rbp+var_18], 1"], [102, "jnz short loc_431895"], [103, "jmp short loc_4318CD"], [104, "nop"], [105, "cmp [rbp+var_20], 0"], [106, "jnz short loc_4318FA"], [107, "mov rdx, cs:qword_4FBF30"], [108, "mov rax, [rbp+var_38]"], [109, "mov [rax], rdx"], [110, "mov rax, [rbp+var_38]"], [111, "mov rax, [rax]"], [112, "mov [rbp+var_18], rax"], [113, "mov rax, [rbp+var_38]"], [114, "mov cs:qword_4FBF30, rax"], [115, "jmp short loc_43191E"], [116, "mov rax, [rbp+var_20]"], [117, "mov rdx, [rax]"], [118, "mov rax, [rbp+var_38]"], [119, "mov [rax], rdx"], [120, "mov rax, [rbp+var_38]"], [121, "mov rax, [rax]"], [122, "mov [rbp+var_18], rax"], [123, "mov rax, [rbp+var_20]"], [124, "mov rdx, [rbp+var_38]"], [125, "mov [rax], rdx"], [126, "mov eax, [rbp+var_3C]"], [127, "sub eax, [rbp+var_24]"], [128, "mov edx, eax"], [129, "mov rax, [rbp+var_38]"], [130, "mov [rax+34h], edx"], [131, "cmp [rbp+var_18], 1"], [132, "jz short loc_43194B"], [133, "mov rax, [rbp+var_18]"], [134, "mov edx, [rax+34h]"], [135, "mov rax, [rbp+var_38]"], [136, "mov eax, [rax+34h]"], [137, "sub edx, eax"], [138, "mov rax, [rbp+var_18]"], [139, "mov [rax+34h], edx"], [140, "mov rax, cs:qword_4FBF30"], [141, "mov eax, [rax+34h]"], [142, "mov cs:dword_52A790, eax"], [143, "mov eax, 0"], [144, "mov rbx, [rbp+var_8]"], [145, "leave"], [146, "retn"]], "data_dep": [[8, 6], [9, 7], [11, 10], [12, 11], [13, 5], [14, 4], [15, 14], [20, 4], [21, 20], [23, 22], [24, 23], [30, 29], [31, 30], [33, 32], [36, 35], [37, 36], [39, 33], [39, 37], [40, 38], [40, 39], [42, 41], [42, 40], [44, 42], [44, 43], [45, 44], [47, 33], [47, 37], [48, 47], [48, 46], [49, 48], [51, 50], [51, 49], [52, 51], [54, 53], [55, 54], [57, 56], [61, 60], [61, 59], [65, 64], [66, 65], [68, 67], [69, 68], [70, 69], [71, 4], [72, 71], [74, 5], [75, 74], [76, 73], [85, 84], [87, 100], [87, 85], [88, 87], [88, 61], [89, 95], [89, 83], [90, 88], [90, 89], [91, 90], [91, 5], [92, 91], [93, 85], [93, 100], [94, 61], [94, 93], [95, 95], [95, 83], [95, 94], [96, 85], [96, 100], [97, 96], [98, 85], [98, 100], [99, 98], [99, 61], [100, 99], [101, 85], [101, 100], [102, 101], [105, 97], [105, 82], [106, 105], [108, 4], [109, 108], [109, 107], [110, 4], [111, 110], [111, 109], [112, 111], [113, 4], [114, 113], [116, 97], [116, 82], [117, 119], [117, 116], [117, 61], [117, 125], [118, 4], [119, 118], [119, 117], [120, 4], [121, 119], [121, 120], [122, 121], [123, 97], [123, 82], [124, 4], [125, 123], [125, 124], [126, 5], [127, 95], [127, 126], [127, 83], [128, 127], [129, 4], [130, 128], [130, 129], [131, 122], [131, 112], [132, 131], [133, 122], [133, 112], [134, 133], [134, 119], [134, 130], [134, 139], [134, 61], [134, 125], [134, 109], [135, 4], [136, 135], [136, 109], [136, 130], [136, 139], [136, 61], [136, 125], [136, 119], [137, 134], [137, 136], [138, 112], [138, 122], [139, 137], [139, 138], [140, 114], [141, 140], [141, 119], [141, 109], [141, 130], [141, 139], [141, 61], [141, 125], [142, 141], [146, 143], [146, 25], [146, 18]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99_5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99.jsonl.gz", "strip_func_name": "sub_431727", "query": "\n\n\n__int64 __fastcall sub_431727(__int64 a1, int a2)\n{\npthread_t v2; // rbx\npthread_t v3; // rax\n__int64 result; // rax\nunsigned int v5; // eax\nint v6; // er9\nint v7; // [rsp+18h] [rbp-28h]\nint v8; // [rsp+1Ch] [rbp-24h]\n_QWORD *v9; // [rsp+20h] [rbp-20h]\n__int64 i; // [rsp+28h] [rbp-18h]\n__int64 v11; // [rsp+28h] [rbp-18h]\n\nv2 = thread2;\nv3 = pthread_self();\nif ( pthread_equal(v3, v2) )\n{\nif ( (unsigned int)sub_431FB2(a1) )\n{\nresult = 0LL;\n}\nelse\n{\npthread_mutex_lock(&mutex);\nif ( qword_4FBF30 == 1 )\nv7 = dword_52AFAC;\nelse\nv7 = *(_DWORD *)(qword_4FBF30 + 52);\n*(double *)&qword_52AFA0 = *(double *)&qword_52AFA0 + (double)(v7 - dword_52A790);\ndword_52AFA8 += v7 - dword_52A790;\nif ( qword_4FBF30 == 1 )\ndword_52AFAC = dword_52A790;\nelse\n*(_DWORD *)(qword_4FBF30 + 52) = dword_52A790;\npthread_mutex_unlock(&mutex);\nif ( qword_52A9E0 && (dword_4FBED4 & 0x20000000) != 0 )\n{\nv5 = (unsigned int)sub_42778B(a1);\nsub_438D9A(0x20000000, (unsigned int)&off_4FBE60, (unsigned int)\"Activating %s delay=%d\\n\", v5, a2, v6);\n}\nv9 = 0LL;\nv8 = 0;\nfor ( i = qword_4FBF30; i != 1 && a2 >= *(_DWORD *)(i + 52) + v8; i = *(_QWORD *)i )\n{\nv8 += *(_DWORD *)(i + 52);\nv9 = (_QWORD *)i;\n}\nif ( v9 )\n{\n*(_QWORD *)a1 = *v9;\nv11 = *(_QWORD *)a1;\n*v9 = a1;\n}\nelse\n{\n*(_QWORD *)a1 = qword_4FBF30;\nv11 = *(_QWORD *)a1;\nqword_4FBF30 = a1;\n}\n*(_DWORD *)(a1 + 52) = a2 - v8;\nif ( v11 != 1 )\n*(_DWORD *)(v11 + 52) -= *(_DWORD *)(a1 + 52);\ndword_52A790 = *(_DWORD *)(qword_4FBF30 + 52);\nresult = 0LL;\n}\n}\nelse\n{\nsub_413B21((__int64)sub_431727, a1, a2);\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v7,v8,v9,i,sub_431727,sub_431FB2,sub_42778B,sub_438D9A,sub_413B21,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'uptr', 'a2': 'event_time', 'v7': '_x', 'v8': 'accum', 'v9': 'prvptr', 'i': 'cptr', 'sub_431727': '_sim_activate', 'sub_431FB2': 'sim_is_active', 'sub_42778B': 'sim_uname', 'sub_438D9A': '_sim_debug_device', 'sub_413B21': 'sim_aio_activate'}"}
destroy
44e8aed08fe933b793e356a871e8f31cdd3a534e9dca1fb63610d519aee2b0ea
Xilinx
vcu-ctrl-sw
NA
static void destroy(TScheduler* pScheduler) { Rtos_Free((AL_TSchedulerMcu*)pScheduler); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_47A5C3", "function_addr": 4695491, "binary_name": "44e8aed08fe933b793e356a871e8f31cdd3a534e9dca1fb63610d519aee2b0ea.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "mov rdi, rax"], [6, "call sub_480B80"], [7, "nop"], [8, "leave"], [9, "retn"]], "data_dep": [[4, 3], [5, 4], [9, 6]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/44e8aed08fe933b793e356a871e8f31cdd3a534e9dca1fb63610d519aee2b0ea_44e8aed08fe933b793e356a871e8f31cdd3a534e9dca1fb63610d519aee2b0ea.jsonl.gz", "strip_func_name": "sub_47A5C3", "query": "\n\n\n__int64 __fastcall sub_47A5C3(__int64 a1)\n{\nreturn sub_480B80(a1);\n}\n\n\n\nQ:[a1,sub_47A5C3,sub_480B80,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pScheduler', 'sub_47A5C3': 'destroy', 'sub_480B80': 'Rtos_Free'}"}
signal_handler
88b297ed3b6e932b99641b5620aeec3cd941b4e06cb37924289772eefa3de8b7
trailofbits
ebpf-verifier
NA
static void signal_handler(int signal) { switch (signal) { case SIGINT: exit_requested = 1; if (debug) fprintf(stderr, " SIGINT\n"); break; case SIGUSR1: if (debug > 1) fprintf(stderr, "SIGUSR1\n"); break; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40E2BB", "function_addr": 4252347, "binary_name": "88b297ed3b6e932b99641b5620aeec3cd941b4e06cb37924289772eefa3de8b7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], edi"], [4, "cmp [rbp+var_4], 2"], [5, "jz short loc_40E2D4"], [6, "cmp [rbp+var_4], 0Ah"], [7, "jz short loc_40E308"], [8, "jmp short loc_40E337"], [9, "mov cs:dword_4224C8, 1"], [10, "mov eax, cs:dword_421F00"], [11, "test eax, eax"], [12, "jz short loc_40E333"], [13, "mov rax, cs:stderr"], [14, "mov rcx, rax"], [15, "mov edx, 8"], [16, "mov esi, 1"], [17, "mov edi, offset aSigint"], [18, "call _fwrite"], [19, "jmp short loc_40E333"], [20, "mov eax, cs:dword_421F00"], [21, "cmp eax, 1"], [22, "jbe short loc_40E336"], [23, "mov rax, cs:stderr"], [24, "mov rcx, rax"], [25, "mov edx, 8"], [26, "mov esi, 1"], [27, "mov edi, offset aSigusr1"], [28, "call _fwrite"], [29, "jmp short loc_40E336"], [30, "nop"], [31, "jmp short loc_40E337"], [32, "nop"], [33, "nop"], [34, "leave"], [35, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 6], [11, 10], [12, 11], [14, 13], [21, 20], [22, 21], [24, 23], [35, 20], [35, 28], [35, 18], [35, 11]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/88b297ed3b6e932b99641b5620aeec3cd941b4e06cb37924289772eefa3de8b7_88b297ed3b6e932b99641b5620aeec3cd941b4e06cb37924289772eefa3de8b7.jsonl.gz", "strip_func_name": "sub_40E2BB", "query": "\n\n\nsize_t __fastcall sub_40E2BB(int a1)\n{\nsize_t result; // rax\n\nif ( a1 == 2 )\n{\ndword_4224C8 = 1;\nresult = (unsigned int)dword_421F00;\nif ( dword_421F00 )\nresult = fwrite(\" SIGINT\\n\", 1uLL, 8uLL, stderr);\n}\nelse if ( a1 == 10 )\n{\nresult = (unsigned int)dword_421F00;\nif ( (unsigned int)dword_421F00 > 1 )\nresult = fwrite(\"SIGUSR1\\n\", 1uLL, 8uLL, stderr);\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_40E2BB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'signal', 'sub_40E2BB': 'signal_handler'}"}
maze_build_one_cell_wall
9820513feff189c82bdddee6a8084c55525ad799f67005835437b5a5fc8fa742
sbinet
perfbook
NA
void maze_build_one_cell_wall(struct maze *mp, int wallrow, int wallcol, int prevrow, int prevcol, int currow, int curcol, int nextrow, int nextcol) { cell_t wallbit; cell_t *cp; /* If the candidate cell is either prev or next, no wall. */ if (wallrow == prevrow && wallcol == prevcol) return; if (wallrow == nextrow && wallcol == nextcol) return; /* If the wall cell actually exists, we need a wall. */ if (maze_cell_exists(mp, wallrow, wallcol)) { /* Wall in other cell. */ wallbit = maze_find_wallbit(wallrow, wallcol, currow, curcol); cp = maze_get_cell_addr(mp, wallrow, wallcol); *cp |= wallbit; /* Wall in current cell. */ wallbit = maze_find_wallbit(currow, curcol, wallrow, wallcol); cp = maze_get_cell_addr(mp, currow, curcol); *cp |= wallbit; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402349", "function_addr": 4203337, "binary_name": "9820513feff189c82bdddee6a8084c55525ad799f67005835437b5a5fc8fa742.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_1C], esi"], [5, "mov [rbp+var_20], edx"], [6, "mov [rbp+var_24], ecx"], [7, "mov [rbp+var_28], r8d"], [8, "mov [rbp+var_2C], r9d"], [9, "mov eax, [rbp+var_1C]"], [10, "cmp eax, [rbp+var_24]"], [11, "jnz short loc_40237A"], [12, "mov eax, [rbp+var_20]"], [13, "cmp eax, [rbp+var_28]"], [14, "jz loc_40242A"], [15, "mov eax, [rbp+var_1C]"], [16, "cmp eax, [rbp+arg_8]"], [17, "jnz short loc_40238E"], [18, "mov eax, [rbp+var_20]"], [19, "cmp eax, [rbp+arg_10]"], [20, "jz loc_40242D"], [21, "mov edx, [rbp+var_20]"], [22, "mov ecx, [rbp+var_1C]"], [23, "mov rax, [rbp+var_18]"], [24, "mov esi, ecx"], [25, "mov rdi, rax"], [26, "call sub_401222"], [27, "test eax, eax"], [28, "jz locret_40242E"], [29, "mov edx, [rbp+var_2C]"], [30, "mov esi, [rbp+var_20]"], [31, "mov eax, [rbp+var_1C]"], [32, "mov ecx, [rbp+arg_0]"], [33, "mov edi, eax"], [34, "call sub_40133B"], [35, "mov [rbp+var_4], eax"], [36, "mov edx, [rbp+var_20]"], [37, "mov ecx, [rbp+var_1C]"], [38, "mov rax, [rbp+var_18]"], [39, "mov esi, ecx"], [40, "mov rdi, rax"], [41, "call sub_401261"], [42, "mov [rbp+var_10], rax"], [43, "mov rax, [rbp+var_10]"], [44, "mov eax, [rax]"], [45, "or eax, [rbp+var_4]"], [46, "mov edx, eax"], [47, "mov rax, [rbp+var_10]"], [48, "mov [rax], edx"], [49, "mov ecx, [rbp+var_20]"], [50, "mov edx, [rbp+var_1C]"], [51, "mov eax, [rbp+var_2C]"], [52, "mov esi, [rbp+arg_0]"], [53, "mov edi, eax"], [54, "call sub_40133B"], [55, "mov [rbp+var_4], eax"], [56, "mov ecx, [rbp+var_2C]"], [57, "mov rax, [rbp+var_18]"], [58, "mov edx, [rbp+arg_0]"], [59, "mov esi, ecx"], [60, "mov rdi, rax"], [61, "call sub_401261"], [62, "mov [rbp+var_10], rax"], [63, "mov rax, [rbp+var_10]"], [64, "mov eax, [rax]"], [65, "or eax, [rbp+var_4]"], [66, "mov edx, eax"], [67, "mov rax, [rbp+var_10]"], [68, "mov [rax], edx"], [69, "jmp short locret_40242E"], [70, "nop"], [71, "jmp short locret_40242E"], [72, "nop"], [73, "leave"], [74, "retn"]], "data_dep": [[9, 4], [10, 6], [10, 9], [11, 10], [12, 5], [13, 7], [13, 12], [14, 13], [15, 4], [16, 15], [17, 16], [18, 5], [19, 18], [20, 19], [21, 5], [22, 4], [23, 3], [24, 22], [25, 23], [27, 26], [28, 27], [29, 8], [30, 5], [31, 4], [33, 31], [35, 34], [36, 5], [37, 4], [38, 3], [39, 37], [40, 38], [42, 41], [43, 42], [44, 43], [45, 35], [45, 44], [46, 45], [47, 42], [48, 47], [48, 46], [49, 5], [50, 4], [51, 8], [53, 51], [55, 54], [56, 8], [57, 3], [59, 56], [60, 57], [62, 61], [63, 62], [64, 63], [64, 48], [65, 55], [65, 64], [66, 65], [67, 62], [68, 66], [68, 67], [74, 67], [74, 18], [74, 12], [74, 27]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/9820513feff189c82bdddee6a8084c55525ad799f67005835437b5a5fc8fa742_9820513feff189c82bdddee6a8084c55525ad799f67005835437b5a5fc8fa742.jsonl.gz", "strip_func_name": "sub_402349", "query": "\n\n\n__int64 __fastcall sub_402349(int *a1, int a2, unsigned int a3, int a4, int a5, int a6, int a7, int a8, int a9)\n{\n__int64 result; // rax\n_DWORD *v10; // rax\nint v13; // [rsp+2Ch] [rbp-4h]\nint v14; // [rsp+2Ch] [rbp-4h]\n\nif ( a2 != a4 || (result = a3, a3 != a5) )\n{\nif ( a2 != a8 || (result = a3, a3 != a9) )\n{\nresult = sub_401222(a1, a2, a3);\nif ( (_DWORD)result )\n{\nv13 = sub_40133B(a2, a3, a6, a7);\nv10 = (_DWORD *)sub_401261(a1, a2, a3);\n*v10 |= v13;\nv14 = sub_40133B(a6, a7, a2, a3);\nresult = sub_401261(a1, a6, a7);\n*(_DWORD *)result |= v14;\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,a8,a9,v14,sub_402349,sub_401222,sub_40133B,sub_401261,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'wallcol', 'a4': 'prevrow', 'a1': 'mp', 'a2': 'wallrow', 'a5': 'prevcol', 'a6': 'currow', 'a7': 'curcol', 'a8': 'nextrow', 'a9': 'nextcol', 'v14': 'wallbita', 'sub_402349': 'maze_build_one_cell_wall', 'sub_401222': 'maze_cell_exists', 'sub_40133B': 'maze_find_wallbit', 'sub_401261': 'maze_get_cell_addr'}"}
test_task_fd_query_tp
43930efbf7f49e9230654421eb5b1e9c224e2d5e0333a9e7aabf3997f8c39fd3
gfreewind
kernel_comment
NA
static void test_task_fd_query_tp(void) { test_task_fd_query_tp_core("sched/sched_switch", "sched_switch"); test_task_fd_query_tp_core("syscalls/sys_enter_read", "sys_enter_read"); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A917", "function_addr": 4237591, "binary_name": "43930efbf7f49e9230654421eb5b1e9c224e2d5e0333a9e7aabf3997f8c39fd3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov esi, offset aSchedSwitch"], [3, "mov edi, offset aSchedSchedSwit"], [4, "call sub_40A227"], [5, "mov esi, offset aSysEnterRead"], [6, "mov edi, offset aSyscallsSysEnt"], [7, "call sub_40A227"], [8, "nop"], [9, "pop rbp"], [10, "retn"]], "data_dep": [[9, 0], [10, 7]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/43930efbf7f49e9230654421eb5b1e9c224e2d5e0333a9e7aabf3997f8c39fd3_43930efbf7f49e9230654421eb5b1e9c224e2d5e0333a9e7aabf3997f8c39fd3.jsonl.gz", "strip_func_name": "sub_40A917", "query": "\n\n\n__int64 sub_40A917()\n{\nsub_40A227(\"sched/sched_switch\", \"sched_switch\");\nreturn sub_40A227(\"syscalls/sys_enter_read\", \"sys_enter_read\");\n}\n\n\n\nQ:[sub_40A917,sub_40A227,]\nAssistant: ", "hints": "[]", "response": "{'sub_40A917': 'test_task_fd_query_tp', 'sub_40A227': 'test_task_fd_query_tp_core'}"}
mbedtls_ssl_cache_init
dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84
FreeRTOS
coreMQTT-Agent-Demos
NA
void mbedtls_ssl_cache_init( mbedtls_ssl_cache_context *cache ) { memset( cache, 0, sizeof( mbedtls_ssl_cache_context ) ); cache->timeout = MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT; cache->max_entries = MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES; #if defined(MBEDTLS_THREADING_C) mbedtls_mutex_init( &cache->mutex ); #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405288", "function_addr": 4215432, "binary_name": "dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+s], rdi"], [4, "mov rax, [rbp+s]"], [5, "mov edx, 10h"], [6, "mov esi, 0"], [7, "mov rdi, rax"], [8, "call _memset"], [9, "mov rax, [rbp+s]"], [10, "mov dword ptr [rax+8], 15180h"], [11, "mov rax, [rbp+s]"], [12, "mov dword ptr [rax+0Ch], 32h "], [13, "nop"], [14, "leave"], [15, "retn"]], "data_dep": [[4, 3], [7, 4], [9, 3], [10, 9], [11, 3], [12, 11], [15, 11]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84_dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84.jsonl.gz", "strip_func_name": "sub_405288", "query": "\n\n\n_DWORD *__fastcall sub_405288(_DWORD *a1)\n{\n_DWORD *result; // rax\n\nmemset(a1, 0, 0x10uLL);\na1[2] = 86400;\nresult = a1;\na1[3] = 50;\nreturn result;\n}\n\n\n\nQ:[a1,sub_405288,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'cache', 'sub_405288': 'mbedtls_ssl_cache_init'}"}
main
5c8b84ba926310b30aee3a42f23ee583fbefc362174027e9ca7bc46d2243a7b5
ipts-linux-org
ipts-linux-new
NA
int main(int argc, char **argv) { bool long_run = false; int opt; while ((opt = getopt(argc, argv, "l")) != -1) { if (opt == 'l') long_run = true; } rcu_register_thread(); radix_tree_init(); regression1_test(); regression2_test(); regression3_test(); iteration_test(); single_thread_tests(long_run); sleep(1); printf("after sleep(1): %d allocated\n", nr_allocated); rcu_unregister_thread(); exit(0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "main", "function_addr": 4203416, "binary_name": "5c8b84ba926310b30aee3a42f23ee583fbefc362174027e9ca7bc46d2243a7b5.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+argc], edi"], [4, "mov [rbp+argv], rsi"], [5, "mov [rbp+var_1], 0"], [6, "jmp short loc_4023B7"], [7, "cmp [rbp+var_8], 6Ch "], [8, "jnz short loc_4023B7"], [9, "mov [rbp+var_1], 1"], [10, "mov rcx, [rbp+argv]"], [11, "mov eax, [rbp+argc]"], [12, "mov edx, offset shortopts"], [13, "mov rsi, rcx"], [14, "mov edi, eax"], [15, "call _getopt"], [16, "mov [rbp+var_8], eax"], [17, "cmp [rbp+var_8], 0FFFFFFFFh"], [18, "jnz short loc_4023AD"], [19, "call _rcu_register_thread_memb"], [20, "call sub_405A41"], [21, "call sub_4082C6"], [22, "call sub_40843F"], [23, "call sub_408747"], [24, "call sub_40CF34"], [25, "movzx eax, [rbp+var_1]"], [26, "mov edi, eax"], [27, "call sub_402244"], [28, "mov edi, 1"], [29, "call _sleep"], [30, "mov eax, cs:dword_413370"], [31, "mov esi, eax"], [32, "mov edi, offset aAfterSleep1DAl"], [33, "mov eax, 0"], [34, "call _printf"], [35, "call _rcu_unregister_thread_memb"], [36, "mov edi, 0"], [37, "call _exit"]], "data_dep": [[7, 16], [8, 7], [10, 4], [11, 3], [13, 10], [14, 11], [16, 15], [17, 16], [18, 17], [25, 9], [25, 5], [26, 25], [31, 30]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5c8b84ba926310b30aee3a42f23ee583fbefc362174027e9ca7bc46d2243a7b5_5c8b84ba926310b30aee3a42f23ee583fbefc362174027e9ca7bc46d2243a7b5.jsonl.gz", "strip_func_name": "main", "query": "\n\n\nvoid __fastcall __noreturn main(int a1, char **a2, char **a3)\n{\nint v3; // [rsp+18h] [rbp-8h]\nchar v4; // [rsp+1Fh] [rbp-1h]\n\nv4 = 0;\nwhile ( 1 )\n{\nv3 = getopt(a1, a2, \"l\");\nif ( v3 == -1 )\nbreak;\nif ( v3 == 108 )\nv4 = 1;\n}\nrcu_register_thread_memb();\nsub_405A41();\nsub_4082C6();\nsub_40843F();\nsub_408747();\nsub_40CF34();\nsub_402244(v4);\nsleep(1u);\nprintf(\"after sleep(1): %d allocated\\n\", (unsigned int)dword_413370);\nrcu_unregister_thread_memb();\nexit(0);\n}\n\n\n\nQ:[a2,a3,a1,v3,v4,sub_405A41,sub_4082C6,sub_40843F,sub_408747,sub_40CF34,sub_402244,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'argv', 'a3': 'envp', 'a1': 'argc', 'v3': 'opt', 'v4': 'long_run', 'sub_405A41': 'radix_tree_init', 'sub_4082C6': 'regression1_test', 'sub_40843F': 'regression2_test', 'sub_408747': 'regression3_test', 'sub_40CF34': 'iteration_test', 'sub_402244': 'single_thread_tests'}"}
Montgomery_inversion_mod_order_bingcd
88e86feec3474e91fc78cdc08236f2f1d678eb6ded9be74f7c7d113d35a19765
microsoft
PQCrypto-SIDH
NA
void Montgomery_inversion_mod_order_bingcd(const digit_t* a, digit_t* c, const digit_t* order, const digit_t* Montgomery_rprime, const digit_t* Montgomery_Rprime) {// Montgomery inversion modulo order, c = a^(-1)*R mod order. digit_t x[NWORDS_ORDER], t[NWORDS_ORDER] = {0}; unsigned int k; if (is_zero((digit_t*)a, NWORDS_ORDER) == true) { copy_words(t, c, NWORDS_ORDER); return; } Montgomery_inversion_mod_order_bingcd_partial(a, x, &k, order); if (k <= NBITS_ORDER) { Montgomery_multiply_mod_order(x, Montgomery_Rprime, x, order, Montgomery_rprime); k += NBITS_ORDER; } Montgomery_multiply_mod_order(x, Montgomery_Rprime, x, order, Montgomery_rprime); power2_setup(t, 2*NBITS_ORDER - k, NWORDS_ORDER); Montgomery_multiply_mod_order(x, t, c, order, Montgomery_rprime); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40525A", "function_addr": 4215386, "binary_name": "88e86feec3474e91fc78cdc08236f2f1d678eb6ded9be74f7c7d113d35a19765.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "add rsp, 0FFFFFFFFFFFFFF80h"], [3, "mov [rbp+var_58], rdi"], [4, "mov [rbp+var_60], rsi"], [5, "mov [rbp+var_68], rdx"], [6, "mov [rbp+var_70], rcx"], [7, "mov [rbp+var_78], r8"], [8, "mov [rbp+var_40], 0"], [9, "mov [rbp+var_38], 0"], [10, "mov [rbp+var_30], 0"], [11, "mov [rbp+var_28], 0"], [12, "mov rax, [rbp+var_58]"], [13, "mov esi, 4"], [14, "mov rdi, rax"], [15, "call sub_4038B5"], [16, "test al, al"], [17, "jz short loc_4052C8"], [18, "mov rcx, [rbp+var_60]"], [19, "lea rax, [rbp+var_40]"], [20, "mov edx, 4"], [21, "mov rsi, rcx"], [22, "mov rdi, rax"], [23, "call sub_401EE2"], [24, "jmp locret_405371"], [25, "mov rcx, [rbp+var_68]"], [26, "lea rdx, [rbp+var_44]"], [27, "lea rsi, [rbp+var_20]"], [28, "mov rax, [rbp+var_58]"], [29, "mov rdi, rax"], [30, "call sub_404ECE"], [31, "mov eax, [rbp+var_44]"], [32, "cmp eax, 100h"], [33, "ja short loc_405314"], [34, "mov rdi, [rbp+var_70]"], [35, "mov rcx, [rbp+var_68]"], [36, "lea rdx, [rbp+var_20]"], [37, "mov rsi, [rbp+var_78]"], [38, "lea rax, [rbp+var_20]"], [39, "mov r8, rdi"], [40, "mov rdi, rax"], [41, "call sub_404AC4"], [42, "mov eax, [rbp+var_44]"], [43, "add eax, 100h"], [44, "mov [rbp+var_44], eax"], [45, "mov rdi, [rbp+var_70]"], [46, "mov rcx, [rbp+var_68]"], [47, "lea rdx, [rbp+var_20]"], [48, "mov rsi, [rbp+var_78]"], [49, "lea rax, [rbp+var_20]"], [50, "mov r8, rdi"], [51, "mov rdi, rax"], [52, "call sub_404AC4"], [53, "mov edx, [rbp+var_44]"], [54, "mov eax, 200h"], [55, "sub eax, edx"], [56, "mov ecx, eax"], [57, "lea rax, [rbp+var_40]"], [58, "mov edx, 4"], [59, "mov esi, ecx"], [60, "mov rdi, rax"], [61, "call sub_403B79"], [62, "mov rdi, [rbp+var_70]"], [63, "mov rcx, [rbp+var_68]"], [64, "mov rdx, [rbp+var_60]"], [65, "lea rsi, [rbp+var_40]"], [66, "lea rax, [rbp+var_20]"], [67, "mov r8, rdi"], [68, "mov rdi, rax"], [69, "call sub_404AC4"], [70, "leave"], [71, "retn"]], "data_dep": [[12, 3], [14, 12], [16, 15], [17, 16], [18, 4], [19, 8], [19, 16], [21, 18], [22, 19], [25, 5], [27, 13], [28, 3], [29, 28], [32, 31], [33, 32], [34, 6], [35, 5], [36, 26], [37, 7], [38, 31], [39, 34], [40, 38], [43, 42], [44, 43], [45, 6], [46, 5], [47, 36], [47, 26], [48, 7], [49, 31], [49, 43], [50, 45], [51, 49], [53, 44], [55, 53], [55, 54], [56, 55], [57, 8], [57, 55], [59, 56], [60, 57], [62, 6], [63, 5], [64, 4], [65, 8], [65, 59], [66, 61], [67, 62], [68, 66], [71, 23], [71, 69]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/88e86feec3474e91fc78cdc08236f2f1d678eb6ded9be74f7c7d113d35a19765_88e86feec3474e91fc78cdc08236f2f1d678eb6ded9be74f7c7d113d35a19765.jsonl.gz", "strip_func_name": "sub_40525A", "query": "\n\n\n__int64 __fastcall sub_40525A(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5)\n{\nunsigned int v9; // [rsp+3Ch] [rbp-44h] BYREF\n__int64 v10[4]; // [rsp+40h] [rbp-40h] BYREF\n_QWORD v11[4]; // [rsp+60h] [rbp-20h] BYREF\n\nv10[0] = 0LL;\nv10[1] = 0LL;\nv10[2] = 0LL;\nv10[3] = 0LL;\nif ( (unsigned __int8)sub_4038B5(a1, 4u) )\nreturn sub_401EE2((__int64)v10, a2, 4u);\nsub_404ECE(a1, v11, &v9, a3);\nif ( v9 <= 0x100 )\n{\nsub_404AC4((__int64)v11, a5, (__int64)v11, a3, a4);\nv9 += 256;\n}\nsub_404AC4((__int64)v11, a5, (__int64)v11, a3, a4);\nsub_403B79((__int64)v10, 512 - v9, 4u);\nreturn sub_404AC4((__int64)v11, (__int64)v10, a2, a3, a4);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v10,v11,sub_40525A,sub_4038B5,sub_401EE2,sub_404ECE,sub_404AC4,sub_403B79,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'order', 'a4': 'Montgomery_rprime', 'a1': 'a', 'a2': 'c', 'a5': 'Montgomery_Rprime', 'v10': 't', 'v11': 'x', 'sub_40525A': 'Montgomery_inversion_mod_order_bingcd', 'sub_4038B5': 'is_zero', 'sub_401EE2': 'copy_words', 'sub_404ECE': 'Montgomery_inversion_mod_order_bingcd_partial', 'sub_404AC4': 'Montgomery_multiply_mod_order', 'sub_403B79': 'power2_setup'}"}
read_chapter_index_from_volume
47dbb0334d900656507d737fe374672f3140f5fc6d4279824cf09bfea156759f
dm-vdo
vdo
NA
int read_chapter_index_from_volume(const struct volume *volume, uint64_t virtual_chapter, struct volume_page volume_pages[], struct delta_index_page index_pages[]) { int result; struct volume_page volume_page; unsigned int i; const struct geometry *geometry = volume->geometry; unsigned int physical_chapter = map_to_physical_chapter(geometry, virtual_chapter); int physical_page = map_to_physical_page(geometry, physical_chapter, 0); prefetch_volume_pages(&volume->volume_store, physical_page, geometry->index_pages_per_chapter); result = initialize_volume_page(geometry->bytes_per_page, &volume_page); for (i = 0; i < geometry->index_pages_per_chapter; i++) { byte *index_page; int result = read_volume_page(&volume->volume_store, physical_page + i, &volume_pages[i]); if (result != UDS_SUCCESS) { break; } index_page = get_page_data(&volume_pages[i]); result = init_chapter_index_page(volume, index_page, physical_chapter, i, &index_pages[i]); if (result != UDS_SUCCESS) { break; } } destroy_volume_page(&volume_page); return result; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41A53F", "function_addr": 4302143, "binary_name": "47dbb0334d900656507d737fe374672f3140f5fc6d4279824cf09bfea156759f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_48], rdi"], [4, "mov [rbp+var_50], rsi"], [5, "mov [rbp+var_58], rdx"], [6, "mov [rbp+var_60], rcx"], [7, "mov rax, [rbp+var_48]"], [8, "mov rax, [rax]"], [9, "mov [rbp+var_10], rax"], [10, "mov rdx, [rbp+var_50]"], [11, "mov rax, [rbp+var_10]"], [12, "mov rsi, rdx"], [13, "mov rdi, rax"], [14, "call sub_425D17"], [15, "mov [rbp+var_14], eax"], [16, "mov ecx, [rbp+var_14]"], [17, "mov rax, [rbp+var_10]"], [18, "mov edx, 0"], [19, "mov esi, ecx"], [20, "mov rdi, rax"], [21, "call sub_4181FD"], [22, "mov [rbp+var_18], eax"], [23, "mov rax, [rbp+var_10]"], [24, "mov edx, [rax+3Ch]"], [25, "mov eax, [rbp+var_18]"], [26, "mov rcx, [rbp+var_48]"], [27, "add rcx, 8"], [28, "mov esi, eax"], [29, "mov rdi, rcx"], [30, "call sub_41C38C"], [31, "mov rax, [rbp+var_10]"], [32, "mov rax, [rax]"], [33, "lea rdx, [rbp+var_38]"], [34, "mov rsi, rdx"], [35, "mov rdi, rax"], [36, "call sub_41C2BB"], [37, "mov [rbp+var_1C], eax"], [38, "mov [rbp+var_4], 0"], [39, "jmp loc_41A660"], [40, "mov eax, [rbp+var_4]"], [41, "lea rdx, ds:0[rax*8]"], [42, "mov rax, [rbp+var_58]"], [43, "add rdx, rax"], [44, "mov ecx, [rbp+var_18]"], [45, "mov eax, [rbp+var_4]"], [46, "add ecx, eax"], [47, "mov rax, [rbp+var_48]"], [48, "add rax, 8"], [49, "mov esi, ecx"], [50, "mov rdi, rax"], [51, "call sub_41C3B3"], [52, "mov [rbp+var_20], eax"], [53, "cmp [rbp+var_20], 0"], [54, "jnz short loc_41A672"], [55, "mov eax, [rbp+var_4]"], [56, "lea rdx, ds:0[rax*8]"], [57, "mov rax, [rbp+var_58]"], [58, "add rax, rdx"], [59, "mov [rbp+var_30], rax"], [60, "mov rax, [rbp+var_30]"], [61, "mov rax, [rax]"], [62, "mov [rbp+var_28], rax"], [63, "mov eax, [rbp+var_4]"], [64, "shl rax, 8"], [65, "mov rdx, rax"], [66, "mov rax, [rbp+var_60]"], [67, "lea rdi, [rdx+rax]"], [68, "mov ecx, [rbp+var_4]"], [69, "mov edx, [rbp+var_14]"], [70, "mov rsi, [rbp+var_28]"], [71, "mov rax, [rbp+var_48]"], [72, "mov r8, rdi"], [73, "mov rdi, rax"], [74, "call sub_4186CF"], [75, "mov [rbp+var_20], eax"], [76, "cmp [rbp+var_20], 0"], [77, "jnz short loc_41A675"], [78, "add [rbp+var_4], 1"], [79, "mov rax, [rbp+var_10]"], [80, "mov eax, [rax+3Ch]"], [81, "cmp [rbp+var_4], eax"], [82, "jb loc_41A5D2"], [83, "jmp short loc_41A676"], [84, "nop"], [85, "jmp short loc_41A676"], [86, "nop"], [87, "lea rax, [rbp+var_38]"], [88, "mov rdi, rax"], [89, "call sub_41C292"], [90, "mov eax, [rbp+var_1C]"], [91, "leave"], [92, "retn"]], "data_dep": [[7, 3], [8, 7], [9, 8], [10, 4], [11, 9], [12, 10], [13, 11], [15, 14], [16, 15], [17, 9], [19, 16], [20, 17], [22, 21], [23, 9], [24, 23], [25, 22], [26, 3], [27, 26], [28, 25], [29, 27], [31, 9], [32, 31], [33, 24], [34, 33], [35, 32], [37, 36], [40, 38], [40, 78], [41, 33], [41, 69], [42, 5], [43, 41], [43, 42], [44, 22], [45, 78], [45, 38], [46, 45], [46, 44], [47, 3], [48, 47], [49, 46], [50, 48], [52, 51], [53, 52], [54, 53], [55, 38], [55, 78], [56, 43], [57, 5], [58, 56], [58, 57], [59, 58], [60, 59], [61, 60], [62, 61], [63, 38], [63, 78], [64, 63], [65, 64], [66, 6], [67, 66], [67, 50], [68, 38], [68, 78], [69, 15], [70, 62], [71, 3], [72, 67], [73, 71], [75, 74], [76, 75], [77, 76], [78, 38], [78, 78], [79, 9], [80, 79], [81, 78], [81, 80], [81, 38], [82, 81], [87, 80], [87, 51], [87, 74], [88, 87], [90, 37], [92, 90]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/47dbb0334d900656507d737fe374672f3140f5fc6d4279824cf09bfea156759f_47dbb0334d900656507d737fe374672f3140f5fc6d4279824cf09bfea156759f.jsonl.gz", "strip_func_name": "sub_41A53F", "query": "\n\n\n__int64 __fastcall sub_41A53F(__int64 *a1, __int64 a2, __int64 a3, __int64 a4)\n{\nchar v7[8]; // [rsp+28h] [rbp-38h] BYREF\n__int64 *v8; // [rsp+30h] [rbp-30h]\n__int64 v9; // [rsp+38h] [rbp-28h]\nint v10; // [rsp+40h] [rbp-20h]\nunsigned int v11; // [rsp+44h] [rbp-1Ch]\nunsigned int v12; // [rsp+48h] [rbp-18h]\nunsigned int v13; // [rsp+4Ch] [rbp-14h]\n__int64 v14; // [rsp+50h] [rbp-10h]\nunsigned int i; // [rsp+5Ch] [rbp-4h]\n\nv14 = *a1;\nv13 = sub_425D17(v14, a2);\nv12 = sub_4181FD(v14, v13, 0);\nsub_41C38C(a1 + 1, v12, *(unsigned int *)(v14 + 60));\nv11 = sub_41C2BB(*(_QWORD *)v14, v7);\nfor ( i = 0; i < *(_DWORD *)(v14 + 60); ++i )\n{\nv10 = sub_41C3B3(a1 + 1, i + v12, a3 + 8LL * i);\nif ( v10 )\nbreak;\nv8 = (__int64 *)(8LL * i + a3);\nv9 = *v8;\nv10 = sub_4186CF((__int64)a1, v9, v13, i, ((unsigned __int64)i << 8) + a4);\nif ( v10 )\nbreak;\n}\nsub_41C292(v7);\nreturn v11;\n}\n\n\n\nQ:[a3,a4,a1,a2,v7,v9,v10,v11,v12,v13,v14,sub_41A53F,sub_425D17,sub_4181FD,sub_41C38C,sub_41C2BB,sub_41C3B3,sub_4186CF,sub_41C292,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'volume_pages', 'a4': 'index_pages', 'a1': 'volume', 'a2': 'virtual_chapter', 'v7': 'volume_page', 'v9': 'index_page', 'v10': 'result_0', 'v11': 'result', 'v12': 'physical_page', 'v13': 'physical_chapter', 'v14': 'geometry', 'sub_41A53F': 'read_chapter_index_from_volume', 'sub_425D17': 'map_to_physical_chapter', 'sub_4181FD': 'map_to_physical_page', 'sub_41C38C': 'prefetch_volume_pages', 'sub_41C2BB': 'initialize_volume_page', 'sub_41C3B3': 'read_volume_page', 'sub_4186CF': 'init_chapter_index_page', 'sub_41C292': 'destroy_volume_page'}"}
jsmn_parse
c1f40cb8c6669dc506dadd9aade098cddb1652c207b41654ac5fa6b2ab6ee244
jb55
lnvis
NA
int jsmn_parse(jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens) { int r; int i; jsmntok_t *token; int count = parser->toknext; for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { char c; jsmntype_t type; c = js[parser->pos]; switch (c) { case '{': case '[': count++; if (tokens == NULL) { break; } token = jsmn_alloc_token(parser, tokens, num_tokens); if (token == NULL) return JSMN_ERROR_NOMEM; if (parser->toksuper != -1) { tokens[parser->toksuper].size++; #ifdef JSMN_PARENT_LINKS token->parent = parser->toksuper; #endif } token->type = (c == '{' ? JSMN_OBJECT : JSMN_ARRAY); token->start = parser->pos; parser->toksuper = parser->toknext - 1; break; case '}': case ']': if (tokens == NULL) break; type = (c == '}' ? JSMN_OBJECT : JSMN_ARRAY); #ifdef JSMN_PARENT_LINKS if (parser->toknext < 1) { return JSMN_ERROR_INVAL; } token = &tokens[parser->toknext - 1]; for (;;) { if (token->start != -1 && token->end == -1) { if (token->type != type) { return JSMN_ERROR_INVAL; } token->end = parser->pos + 1; parser->toksuper = token->parent; break; } if (token->parent == -1) { if(token->type != type || parser->toksuper == -1) { return JSMN_ERROR_INVAL; } break; } token = &tokens[token->parent]; } #else for (i = parser->toknext - 1; i >= 0; i--) { token = &tokens[i]; if (token->start != -1 && token->end == -1) { if (token->type != type) { return JSMN_ERROR_INVAL; } parser->toksuper = -1; token->end = parser->pos + 1; break; } } /* Error if unmatched closing bracket */ if (i == -1) return JSMN_ERROR_INVAL; for (; i >= 0; i--) { token = &tokens[i]; if (token->start != -1 && token->end == -1) { parser->toksuper = i; break; } } #endif break; case '\"': r = jsmn_parse_string(parser, js, len, tokens, num_tokens); if (r < 0) return r; count++; if (parser->toksuper != -1 && tokens != NULL) tokens[parser->toksuper].size++; break; case '\t' : case '\r' : case '\n' : case ' ': break; case ':': parser->toksuper = parser->toknext - 1; break; case ',': if (tokens != NULL && parser->toksuper != -1 && tokens[parser->toksuper].type != JSMN_ARRAY && tokens[parser->toksuper].type != JSMN_OBJECT) { #ifdef JSMN_PARENT_LINKS parser->toksuper = tokens[parser->toksuper].parent; #else for (i = parser->toknext - 1; i >= 0; i--) { if (tokens[i].type == JSMN_ARRAY || tokens[i].type == JSMN_OBJECT) { if (tokens[i].start != -1 && tokens[i].end == -1) { parser->toksuper = i; break; } } } #endif } break; #ifdef JSMN_STRICT /* In strict mode primitives are: numbers and booleans */ case '-': case '0': case '1' : case '2': case '3' : case '4': case '5': case '6': case '7' : case '8': case '9': case 't': case 'f': case 'n' : /* And they must not be keys of the object */ if (tokens != NULL && parser->toksuper != -1) { jsmntok_t *t = &tokens[parser->toksuper]; if (t->type == JSMN_OBJECT || (t->type == JSMN_STRING && t->size != 0)) { return JSMN_ERROR_INVAL; } } #else /* In non-strict mode every unquoted value is a primitive */ default: #endif r = jsmn_parse_primitive(parser, js, len, tokens, num_tokens); if (r < 0) return r; count++; if (parser->toksuper != -1 && tokens != NULL) tokens[parser->toksuper].size++; break; #ifdef JSMN_STRICT /* Unexpected char in strict mode */ default: return JSMN_ERROR_INVAL; #endif } } if (tokens != NULL) { for (i = parser->toknext - 1; i >= 0; i--) { /* Unmatched opened object or array */ if (tokens[i].start != -1 && tokens[i].end == -1) { return JSMN_ERROR_PART; } } } return count; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_415B86", "function_addr": 4283270, "binary_name": "c1f40cb8c6669dc506dadd9aade098cddb1652c207b41654ac5fa6b2ab6ee244.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 48h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_40], rcx"], [7, "mov [rbp+var_44], r8d"], [8, "mov rax, [rbp+var_28]"], [9, "mov eax, [rax+4]"], [10, "mov [rbp+var_14], eax"], [11, "jmp loc_415FBE"], [12, "mov rax, [rbp+var_28]"], [13, "mov eax, [rax]"], [14, "mov edx, eax"], [15, "mov rax, [rbp+var_30]"], [16, "add rax, rdx"], [17, "movzx eax, byte ptr [rax]"], [18, "mov [rbp+var_15], al"], [19, "movsx eax, [rbp+var_15]"], [20, "cmp eax, 7Dh "], [21, "jz loc_415CE9"], [22, "cmp eax, 7Dh "], [23, "jg def_415C20"], [24, "cmp eax, 7Bh "], [25, "jz short loc_415C2B"], [26, "cmp eax, 7Bh "], [27, "jg def_415C20"], [28, "cmp eax, 5Dh "], [29, "jz loc_415CE9"], [30, "cmp eax, 5Dh "], [31, "jg def_415C20"], [32, "cmp eax, 3Ah "], [33, "jg short loc_415C22"], [34, "cmp eax, 9"], [35, "jl def_415C20"], [36, "sub eax, 9"], [37, "cmp eax, 31h"], [38, "ja def_415C20"], [39, "mov eax, eax"], [40, "mov rax, ds:jpt_415C20[rax*8]"], [41, "jmp rax"], [42, "cmp eax, 5Bh "], [43, "jnz def_415C20"], [44, "add [rbp+var_14], 1"], [45, "cmp [rbp+var_40], 0"], [46, "jz loc_415FA2"], [47, "mov edx, [rbp+var_44]"], [48, "mov rcx, [rbp+var_40]"], [49, "mov rax, [rbp+var_28]"], [50, "mov rsi, rcx"], [51, "mov rdi, rax"], [52, "call sub_415686"], [53, "mov [rbp+var_10], rax"], [54, "cmp [rbp+var_10], 0"], [55, "jnz short loc_415C65"], [56, "mov eax, 0FFFFFFFFh"], [57, "jmp locret_41605C"], [58, "mov rax, [rbp+var_28]"], [59, "mov eax, [rax+8]"], [60, "cmp eax, 0FFFFFFFFh"], [61, "jz short loc_415CAA"], [62, "mov rax, [rbp+var_28]"], [63, "mov eax, [rax+8]"], [64, "movsxd rdx, eax"], [65, "mov rax, rdx"], [66, "shl rax, 2"], [67, "add rax, rdx"], [68, "shl rax, 2"], [69, "mov rdx, rax"], [70, "mov rax, [rbp+var_40]"], [71, "add rax, rdx"], [72, "mov edx, [rax+0Ch]"], [73, "add edx, 1"], [74, "mov [rax+0Ch], edx"], [75, "mov rax, [rbp+var_28]"], [76, "mov edx, [rax+8]"], [77, "mov rax, [rbp+var_10]"], [78, "mov [rax+10h], edx"], [79, "cmp [rbp+var_15], 7Bh "], [80, "jnz short loc_415CB7"], [81, "mov edx, 1"], [82, "jmp short loc_415CBC"], [83, "mov edx, 2"], [84, "mov rax, [rbp+var_10]"], [85, "mov [rax], edx"], [86, "mov rax, [rbp+var_28]"], [87, "mov eax, [rax]"], [88, "mov edx, eax"], [89, "mov rax, [rbp+var_10]"], [90, "mov [rax+4], edx"], [91, "mov rax, [rbp+var_28]"], [92, "mov eax, [rax+4]"], [93, "sub eax, 1"], [94, "mov edx, eax"], [95, "mov rax, [rbp+var_28]"], [96, "mov [rax+8], edx"], [97, "jmp loc_415FAF"], [98, "cmp [rbp+var_40], 0"], [99, "jz loc_415FA5"], [100, "cmp [rbp+var_15], 7Dh "], [101, "jnz short loc_415D01"], [102, "mov eax, 1"], [103, "jmp short loc_415D06"], [104, "mov eax, 2"], [105, "mov [rbp+var_1C], eax"], [106, "mov rax, [rbp+var_28]"], [107, "mov eax, [rax+4]"], [108, "test eax, eax"], [109, "jnz short loc_415D1E"], [110, "mov eax, 0FFFFFFFEh"], [111, "jmp locret_41605C"], [112, "mov rax, [rbp+var_28]"], [113, "mov eax, [rax+4]"], [114, "sub eax, 1"], [115, "mov edx, eax"], [116, "mov rax, rdx"], [117, "shl rax, 2"], [118, "add rax, rdx"], [119, "shl rax, 2"], [120, "mov rdx, rax"], [121, "mov rax, [rbp+var_40]"], [122, "add rax, rdx"], [123, "mov [rbp+var_10], rax"], [124, "mov rax, [rbp+var_10]"], [125, "mov eax, [rax+4]"], [126, "cmp eax, 0FFFFFFFFh"], [127, "jz short loc_415D95"], [128, "mov rax, [rbp+var_10]"], [129, "mov eax, [rax+8]"], [130, "cmp eax, 0FFFFFFFFh"], [131, "jnz short loc_415D95"], [132, "mov rax, [rbp+var_10]"], [133, "mov eax, [rax]"], [134, "cmp [rbp+var_1C], eax"], [135, "jz short loc_415D73"], [136, "mov eax, 0FFFFFFFEh"], [137, "jmp locret_41605C"], [138, "mov rax, [rbp+var_28]"], [139, "mov eax, [rax]"], [140, "add eax, 1"], [141, "mov edx, eax"], [142, "mov rax, [rbp+var_10]"], [143, "mov [rax+8], edx"], [144, "mov rax, [rbp+var_10]"], [145, "mov edx, [rax+10h]"], [146, "mov rax, [rbp+var_28]"], [147, "mov [rax+8], edx"], [148, "jmp short loc_415DEE"], [149, "mov rax, [rbp+var_10]"], [150, "mov eax, [rax+10h]"], [151, "cmp eax, 0FFFFFFFFh"], [152, "jnz short loc_415DC2"], [153, "mov rax, [rbp+var_10]"], [154, "mov eax, [rax]"], [155, "cmp [rbp+var_1C], eax"], [156, "jnz short loc_415DB8"], [157, "mov rax, [rbp+var_28]"], [158, "mov eax, [rax+8]"], [159, "cmp eax, 0FFFFFFFFh"], [160, "jnz short loc_415DED"], [161, "mov eax, 0FFFFFFFEh"], [162, "jmp locret_41605C"], [163, "mov rax, [rbp+var_10]"], [164, "mov eax, [rax+10h]"], [165, "movsxd rdx, eax"], [166, "mov rax, rdx"], [167, "shl rax, 2"], [168, "add rax, rdx"], [169, "shl rax, 2"], [170, "mov rdx, rax"], [171, "mov rax, [rbp+var_40]"], [172, "add rax, rdx"], [173, "mov [rbp+var_10], rax"], [174, "jmp loc_415D46"], [175, "nop"], [176, "jmp loc_415FAF"], [177, "mov edi, [rbp+var_44]"], [178, "mov rcx, [rbp+var_40]"], [179, "mov rdx, [rbp+var_38]"], [180, "mov rsi, [rbp+var_30]"], [181, "mov rax, [rbp+var_28]"], [182, "mov r8, rdi"], [183, "mov rdi, rax"], [184, "call sub_4158D6"], [185, "mov [rbp+var_20], eax"], [186, "cmp [rbp+var_20], 0"], [187, "jns short loc_415E22"], [188, "mov eax, [rbp+var_20]"], [189, "jmp locret_41605C"], [190, "add [rbp+var_14], 1"], [191, "mov rax, [rbp+var_28]"], [192, "mov eax, [rax+8]"], [193, "cmp eax, 0FFFFFFFFh"], [194, "jz loc_415FA8"], [195, "cmp [rbp+var_40], 0"], [196, "jz loc_415FA8"], [197, "mov rax, [rbp+var_28]"], [198, "mov eax, [rax+8]"], [199, "movsxd rdx, eax"], [200, "mov rax, rdx"], [201, "shl rax, 2"], [202, "add rax, rdx"], [203, "shl rax, 2"], [204, "mov rdx, rax"], [205, "mov rax, [rbp+var_40]"], [206, "add rax, rdx"], [207, "mov edx, [rax+0Ch]"], [208, "add edx, 1"], [209, "mov [rax+0Ch], edx"], [210, "jmp loc_415FA8"], [211, "mov rax, [rbp+var_28]"], [212, "mov eax, [rax+4]"], [213, "sub eax, 1"], [214, "mov edx, eax"], [215, "mov rax, [rbp+var_28]"], [216, "mov [rax+8], edx"], [217, "jmp loc_415FAF"], [218, "cmp [rbp+var_40], 0"], [219, "jz loc_415FAB"], [220, "mov rax, [rbp+var_28]"], [221, "mov eax, [rax+8]"], [222, "cmp eax, 0FFFFFFFFh"], [223, "jz loc_415FAB"], [224, "mov rax, [rbp+var_28]"], [225, "mov eax, [rax+8]"], [226, "movsxd rdx, eax"], [227, "mov rax, rdx"], [228, "shl rax, 2"], [229, "add rax, rdx"], [230, "shl rax, 2"], [231, "mov rdx, rax"], [232, "mov rax, [rbp+var_40]"], [233, "add rax, rdx"], [234, "mov eax, [rax]"], [235, "cmp eax, 2"], [236, "jz loc_415FAB"], [237, "mov rax, [rbp+var_28]"], [238, "mov eax, [rax+8]"], [239, "movsxd rdx, eax"], [240, "mov rax, rdx"], [241, "shl rax, 2"], [242, "add rax, rdx"], [243, "shl rax, 2"], [244, "mov rdx, rax"], [245, "mov rax, [rbp+var_40]"], [246, "add rax, rdx"], [247, "mov eax, [rax]"], [248, "cmp eax, 1"], [249, "jz loc_415FAB"], [250, "mov rax, [rbp+var_28]"], [251, "mov eax, [rax+8]"], [252, "movsxd rdx, eax"], [253, "mov rax, rdx"], [254, "shl rax, 2"], [255, "add rax, rdx"], [256, "shl rax, 2"], [257, "mov rdx, rax"], [258, "mov rax, [rbp+var_40]"], [259, "add rax, rdx"], [260, "mov edx, [rax+10h]"], [261, "mov rax, [rbp+var_28]"], [262, "mov [rax+8], edx"], [263, "jmp short loc_415FAB"], [264, "mov edi, [rbp+var_44]"], [265, "mov rcx, [rbp+var_40]"], [266, "mov rdx, [rbp+var_38]"], [267, "mov rsi, [rbp+var_30]"], [268, "mov rax, [rbp+var_28]"], [269, "mov r8, rdi"], [270, "mov rdi, rax"], [271, "call sub_41574C"], [272, "mov [rbp+var_20], eax"], [273, "cmp [rbp+var_20], 0"], [274, "jns short loc_415F5B"], [275, "mov eax, [rbp+var_20]"], [276, "jmp locret_41605C"], [277, "add [rbp+var_14], 1"], [278, "mov rax, [rbp+var_28]"], [279, "mov eax, [rax+8]"], [280, "cmp eax, 0FFFFFFFFh"], [281, "jz short loc_415FAE"], [282, "cmp [rbp+var_40], 0"], [283, "jz short loc_415FAE"], [284, "mov rax, [rbp+var_28]"], [285, "mov eax, [rax+8]"], [286, "movsxd rdx, eax"], [287, "mov rax, rdx"], [288, "shl rax, 2"], [289, "add rax, rdx"], [290, "shl rax, 2"], [291, "mov rdx, rax"], [292, "mov rax, [rbp+var_40]"], [293, "add rax, rdx"], [294, "mov edx, [rax+0Ch]"], [295, "add edx, 1"], [296, "mov [rax+0Ch], edx"], [297, "jmp short loc_415FAE"], [298, "nop"], [299, "jmp short loc_415FAF"], [300, "nop"], [301, "jmp short loc_415FAF"], [302, "nop"], [303, "jmp short loc_415FAF"], [304, "nop"], [305, "jmp short loc_415FAF"], [306, "nop"], [307, "jmp short loc_415FAF"], [308, "nop"], [309, "mov rax, [rbp+var_28]"], [310, "mov eax, [rax]"], [311, "lea edx, [rax+1]"], [312, "mov rax, [rbp+var_28]"], [313, "mov [rax], edx"], [314, "mov rax, [rbp+var_28]"], [315, "mov eax, [rax]"], [316, "mov eax, eax"], [317, "cmp [rbp+var_38], rax"], [318, "jbe short loc_415FE6"], [319, "mov rax, [rbp+var_28]"], [320, "mov eax, [rax]"], [321, "mov edx, eax"], [322, "mov rax, [rbp+var_30]"], [323, "add rax, rdx"], [324, "movzx eax, byte ptr [rax]"], [325, "test al, al"], [326, "jnz loc_415BB1"], [327, "cmp [rbp+var_40], 0"], [328, "jz short loc_416059"], [329, "mov rax, [rbp+var_28]"], [330, "mov eax, [rax+4]"], [331, "sub eax, 1"], [332, "mov [rbp+var_4], eax"], [333, "jmp short loc_416053"], [334, "mov eax, [rbp+var_4]"], [335, "movsxd rdx, eax"], [336, "mov rax, rdx"], [337, "shl rax, 2"], [338, "add rax, rdx"], [339, "shl rax, 2"], [340, "mov rdx, rax"], [341, "mov rax, [rbp+var_40]"], [342, "add rax, rdx"], [343, "mov eax, [rax+4]"], [344, "cmp eax, 0FFFFFFFFh"], [345, "jz short loc_41604F"], [346, "mov eax, [rbp+var_4]"], [347, "movsxd rdx, eax"], [348, "mov rax, rdx"], [349, "shl rax, 2"], [350, "add rax, rdx"], [351, "shl rax, 2"], [352, "mov rdx, rax"], [353, "mov rax, [rbp+var_40]"], [354, "add rax, rdx"], [355, "mov eax, [rax+8]"], [356, "cmp eax, 0FFFFFFFFh"], [357, "jnz short loc_41604F"], [358, "mov eax, 0FFFFFFFDh"], [359, "jmp short locret_41605C"], [360, "sub [rbp+var_4], 1"], [361, "cmp [rbp+var_4], 0"], [362, "jns short loc_415FFC"], [363, "mov eax, [rbp+var_14]"], [364, "leave"], [365, "retn"]], "data_dep": [[8, 3], [9, 8], [10, 9], [12, 3], [13, 209], [13, 74], [13, 78], [13, 296], [13, 143], [13, 147], [13, 12], [13, 96], [13, 262], [13, 216], [13, 90], [13, 85], [13, 313], [14, 13], [15, 4], [16, 15], [16, 14], [17, 85], [17, 313], [17, 209], [17, 74], [17, 78], [17, 296], [17, 143], [17, 147], [17, 16], [17, 96], [17, 262], [17, 216], [17, 90], [18, 17], [19, 18], [20, 19], [21, 20], [22, 19], [23, 22], [24, 19], [25, 24], [26, 19], [27, 26], [28, 19], [29, 28], [30, 19], [31, 30], [32, 19], [33, 32], [34, 19], [35, 34], [36, 19], [37, 36], [38, 37], [39, 36], [41, 40], [42, 19], [43, 42], [44, 10], [44, 190], [44, 44], [44, 277], [45, 6], [46, 45], [47, 7], [48, 6], [49, 3], [50, 48], [51, 49], [53, 52], [54, 53], [55, 54], [58, 3], [59, 296], [59, 143], [59, 147], [59, 96], [59, 262], [59, 216], [59, 90], [59, 58], [59, 85], [59, 313], [59, 209], [59, 74], [59, 78], [60, 59], [61, 60], [62, 3], [63, 209], [63, 74], [63, 78], [63, 296], [63, 143], [63, 147], [63, 96], [63, 262], [63, 216], [63, 90], [63, 85], [63, 62], [63, 313], [64, 63], [65, 64], [66, 65], [67, 66], [67, 64], [68, 67], [69, 68], [70, 6], [71, 69], [71, 70], [72, 262], [72, 90], [72, 85], [72, 71], [72, 313], [72, 209], [72, 74], [72, 143], [72, 78], [72, 96], [72, 216], [72, 296], [72, 147], [73, 72], [74, 73], [74, 71], [75, 3], [76, 96], [76, 147], [76, 262], [76, 216], [76, 75], [76, 74], [77, 53], [78, 77], [78, 76], [79, 18], [80, 79], [84, 53], [85, 84], [85, 83], [85, 81], [86, 3], [87, 86], [87, 85], [88, 87], [89, 53], [90, 88], [90, 89], [91, 3], [92, 91], [92, 90], [93, 92], [94, 93], [95, 3], [96, 95], [96, 94], [98, 6], [99, 98], [100, 18], [101, 100], [105, 104], [105, 102], [106, 3], [107, 90], [107, 85], [107, 313], [107, 209], [107, 74], [107, 143], [107, 106], [107, 78], [107, 96], [107, 216], [107, 296], [107, 147], [107, 262], [108, 107], [109, 108], [112, 3], [113, 147], [113, 262], [113, 216], [113, 90], [113, 85], [113, 313], [113, 112], [113, 209], [113, 74], [113, 78], [113, 96], [113, 296], [113, 143], [114, 113], [115, 114], [116, 115], [117, 116], [118, 117], [118, 115], [119, 118], [120, 119], [121, 6], [122, 121], [122, 120], [123, 122], [124, 123], [124, 173], [125, 143], [125, 124], [125, 209], [125, 74], [125, 78], [125, 96], [125, 296], [125, 147], [125, 262], [125, 216], [125, 90], [125, 85], [125, 313], [126, 125], [127, 126], [128, 123], [128, 173], [129, 128], [129, 262], [129, 90], [129, 85], [129, 209], [129, 74], [129, 143], [129, 78], [129, 96], [129, 216], [129, 296], [129, 147], [129, 313], [130, 129], [131, 130], [132, 123], [132, 173], [133, 143], [133, 78], [133, 96], [133, 216], [133, 296], [133, 147], [133, 132], [133, 262], [133, 90], [133, 85], [133, 313], [133, 209], [133, 74], [134, 133], [134, 105], [135, 134], [138, 3], [139, 143], [139, 138], [139, 78], [139, 96], [139, 216], [139, 296], [139, 147], [139, 313], [139, 262], [139, 90], [139, 85], [139, 209], [139, 74], [140, 139], [141, 140], [142, 173], [142, 123], [143, 141], [143, 142], [144, 123], [144, 173], [145, 144], [145, 143], [145, 78], [146, 3], [147, 146], [147, 145], [149, 123], [149, 173], [150, 209], [150, 74], [150, 149], [150, 143], [150, 78], [150, 96], [150, 216], [150, 296], [150, 147], [150, 313], [150, 262], [150, 90], [150, 85], [151, 150], [152, 151], [153, 173], [153, 123], [154, 216], [154, 296], [154, 147], [154, 313], [154, 262], [154, 90], [154, 85], [154, 209], [154, 74], [154, 153], [154, 143], [154, 78], [154, 96], [155, 105], [155, 154], [156, 155], [157, 3], [158, 157], [158, 143], [158, 78], [158, 96], [158, 216], [158, 296], [158, 147], [158, 262], [158, 90], [158, 85], [158, 313], [158, 209], [158, 74], [159, 158], [160, 159], [163, 123], [163, 173], [164, 209], [164, 74], [164, 78], [164, 163], [164, 296], [164, 143], [164, 147], [164, 96], [164, 216], [164, 90], [164, 85], [164, 313], [164, 262], [165, 164], [166, 165], [167, 166], [168, 165], [168, 167], [169, 168], [170, 169], [171, 6], [172, 171], [172, 170], [173, 172], [177, 7], [178, 6], [179, 5], [180, 4], [181, 3], [182, 177], [183, 181], [185, 184], [186, 185], [187, 186], [188, 185], [190, 277], [190, 44], [190, 10], [190, 190], [191, 3], [192, 296], [192, 313], [192, 262], [192, 90], [192, 85], [192, 191], [192, 209], [192, 74], [192, 143], [192, 147], [192, 78], [192, 96], [192, 216], [193, 192], [194, 193], [195, 6], [196, 195], [197, 3], [198, 78], [198, 96], [198, 216], [198, 90], [198, 197], [198, 313], [198, 262], [198, 85], [198, 209], [198, 74], [198, 296], [198, 143], [198, 147], [199, 198], [200, 199], [201, 200], [202, 199], [202, 201], [203, 202], [204, 203], [205, 6], [206, 205], [206, 204], [207, 209], [207, 74], [207, 78], [207, 296], [207, 143], [207, 147], [207, 96], [207, 216], [207, 90], [207, 85], [207, 206], [207, 313], [207, 262], [208, 207], [209, 208], [209, 206], [211, 3], [212, 296], [212, 143], [212, 147], [212, 96], [212, 216], [212, 90], [212, 211], [212, 85], [212, 313], [212, 262], [212, 209], [212, 74], [212, 78], [213, 212], [214, 213], [215, 3], [216, 215], [216, 214], [218, 6], [219, 218], [220, 3], [221, 209], [221, 74], [221, 78], [221, 296], [221, 143], [221, 147], [221, 96], [221, 216], [221, 90], [221, 220], [221, 85], [221, 313], [221, 262], [222, 221], [223, 222], [224, 3], [225, 96], [225, 216], [225, 90], [225, 85], [225, 313], [225, 262], [225, 224], [225, 209], [225, 74], [225, 78], [225, 296], [225, 143], [225, 147], [226, 225], [227, 226], [228, 227], [229, 228], [229, 226], [230, 229], [231, 230], [232, 6], [233, 232], [233, 231], [234, 296], [234, 143], [234, 147], [234, 78], [234, 96], [234, 216], [234, 90], [234, 313], [234, 262], [234, 85], [234, 233], [234, 209], [234, 74], [235, 234], [236, 235], [237, 3], [238, 313], [238, 262], [238, 237], [238, 209], [238, 74], [238, 78], [238, 296], [238, 143], [238, 147], [238, 96], [238, 216], [238, 90], [238, 85], [239, 238], [240, 239], [241, 240], [242, 241], [242, 239], [243, 242], [244, 243], [245, 6], [246, 245], [246, 244], [247, 147], [247, 96], [247, 216], [247, 90], [247, 85], [247, 313], [247, 262], [247, 246], [247, 209], [247, 74], [247, 78], [247, 296], [247, 143], [248, 247], [249, 248], [250, 3], [251, 209], [251, 74], [251, 78], [251, 296], [251, 143], [251, 147], [251, 250], [251, 96], [251, 216], [251, 90], [251, 85], [251, 313], [251, 262], [252, 251], [253, 252], [254, 253], [255, 252], [255, 254], [256, 255], [257, 256], [258, 6], [259, 258], [259, 257], [260, 313], [260, 262], [260, 209], [260, 74], [260, 78], [260, 296], [260, 143], [260, 147], [260, 259], [260, 96], [260, 216], [260, 90], [260, 85], [261, 3], [262, 261], [262, 260], [264, 7], [265, 6], [266, 5], [267, 4], [268, 3], [269, 264], [270, 268], [272, 271], [273, 272], [274, 273], [275, 272], [277, 277], [277, 10], [277, 190], [277, 44], [278, 3], [279, 85], [279, 313], [279, 262], [279, 209], [279, 74], [279, 78], [279, 278], [279, 296], [279, 143], [279, 147], [279, 96], [279, 216], [279, 90], [280, 279], [281, 280], [282, 6], [283, 282], [284, 3], [285, 262], [285, 216], [285, 90], [285, 85], [285, 313], [285, 284], [285, 209], [285, 74], [285, 78], [285, 96], [285, 296], [285, 143], [285, 147], [286, 285], [287, 286], [288, 287], [289, 286], [289, 288], [290, 289], [291, 290], [292, 6], [293, 292], [293, 291], [294, 78], [294, 96], [294, 296], [294, 143], [294, 147], [294, 262], [294, 216], [294, 90], [294, 85], [294, 313], [294, 293], [294, 209], [294, 74], [295, 294], [296, 295], [296, 293], [309, 3], [310, 296], [310, 143], [310, 309], [310, 147], [310, 262], [310, 216], [310, 90], [310, 85], [310, 313], [310, 209], [310, 74], [310, 78], [310, 96], [311, 266], [311, 14], [311, 260], [311, 120], [311, 214], [311, 209], [311, 74], [311, 231], [311, 78], [311, 96], [311, 208], [311, 310], [311, 296], [311, 143], [311, 170], [311, 179], [311, 147], [311, 295], [311, 244], [311, 262], [311, 216], [311, 90], [311, 85], [311, 94], [311, 313], [311, 145], [312, 3], [313, 311], [313, 312], [314, 3], [315, 262], [315, 216], [315, 90], [315, 85], [315, 313], [315, 209], [315, 74], [315, 78], [315, 96], [315, 296], [315, 314], [315, 143], [315, 147], [316, 315], [317, 5], [317, 316], [318, 317], [319, 3], [320, 216], [320, 90], [320, 85], [320, 313], [320, 209], [320, 74], [320, 78], [320, 96], [320, 319], [320, 296], [320, 143], [320, 147], [320, 262], [321, 320], [322, 4], [323, 322], [323, 321], [324, 209], [324, 74], [324, 78], [324, 96], [324, 296], [324, 143], [324, 147], [324, 262], [324, 216], [324, 90], [324, 85], [324, 323], [324, 313], [325, 324], [326, 325], [327, 6], [328, 327], [329, 3], [330, 209], [330, 74], [330, 78], [330, 96], [330, 329], [330, 296], [330, 143], [330, 147], [330, 262], [330, 216], [330, 90], [330, 85], [330, 313], [331, 330], [332, 331], [334, 360], [334, 332], [335, 334], [336, 335], [337, 336], [338, 335], [338, 337], [339, 338], [340, 339], [341, 6], [342, 341], [342, 340], [343, 209], [343, 74], [343, 78], [343, 296], [343, 143], [343, 147], [343, 96], [343, 262], [343, 342], [343, 216], [343, 90], [343, 85], [343, 313], [344, 343], [345, 344], [346, 360], [346, 332], [347, 346], [348, 347], [349, 348], [350, 349], [350, 347], [351, 350], [352, 351], [353, 6], [354, 353], [354, 352], [355, 313], [355, 354], [355, 209], [355, 74], [355, 78], [355, 96], [355, 296], [355, 143], [355, 147], [355, 262], [355, 216], [355, 90], [355, 85], [356, 355], [357, 356], [360, 360], [360, 332], [361, 360], [361, 332], [362, 361], [363, 10], [363, 190], [363, 44], [363, 277], [365, 358], [365, 110], [365, 161], [365, 188], [365, 136], [365, 363], [365, 56], [365, 275]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c1f40cb8c6669dc506dadd9aade098cddb1652c207b41654ac5fa6b2ab6ee244_c1f40cb8c6669dc506dadd9aade098cddb1652c207b41654ac5fa6b2ab6ee244.jsonl.gz", "strip_func_name": "sub_415B86", "query": "\n\n\n__int64 __fastcall sub_415B86(int *a1, __int64 a2, unsigned __int64 a3, __int64 a4, unsigned int a5)\n{\n__int64 v6; // rax\nint v7; // edx\nint v8; // eax\n__int64 v9; // rax\n__int64 v10; // rax\nint v14; // [rsp+28h] [rbp-20h]\nint v15; // [rsp+28h] [rbp-20h]\nchar v16; // [rsp+33h] [rbp-15h]\nunsigned int v17; // [rsp+34h] [rbp-14h]\n_DWORD *v18; // [rsp+38h] [rbp-10h]\n_DWORD *i; // [rsp+38h] [rbp-10h]\nint j; // [rsp+44h] [rbp-4h]\n\nv17 = a1[1];\nwhile ( a3 > (unsigned int)*a1 && *(_BYTE *)((unsigned int)*a1 + a2) )\n{\nv16 = *(_BYTE *)((unsigned int)*a1 + a2);\nif ( v16 == 125 )\ngoto LABEL_21;\nif ( v16 <= 125 )\n{\nif ( v16 == 123 )\ngoto LABEL_12;\nif ( v16 <= 123 )\n{\nif ( v16 == 93 )\n{\nLABEL_21:\nif ( a4 )\n{\nif ( v16 == 125 )\nv8 = 1;\nelse\nv8 = 2;\nif ( !a1[1] )\nreturn 4294967294LL;\nfor ( i = (_DWORD *)(20LL * (unsigned int)(a1[1] - 1) + a4); ; i = (_DWORD *)(20LL * (int)i[4] + a4) )\n{\nif ( i[1] != -1 && i[2] == -1 )\n{\nif ( v8 != *i )\nreturn 4294967294LL;\ni[2] = *a1 + 1;\na1[2] = i[4];\ngoto LABEL_55;\n}\nif ( i[4] == -1 )\nbreak;\n}\nif ( v8 != *i || a1[2] == -1 )\nreturn 4294967294LL;\n}\ngoto LABEL_55;\n}\nif ( v16 <= 93 )\n{\nif ( v16 > 58 )\n{\nif ( v16 == 91 )\n{\nLABEL_12:\n++v17;\nif ( a4 )\n{\nv18 = sub_415686((__int64)a1, a4, a5);\nif ( !v18 )\nreturn 0xFFFFFFFFLL;\nif ( a1[2] != -1 )\n{\nv6 = 20LL * a1[2] + a4;\n++*(_DWORD *)(v6 + 12);\nv18[4] = a1[2];\n}\nif ( v16 == 123 )\nv7 = 1;\nelse\nv7 = 2;\n*v18 = v7;\nv18[1] = *a1;\na1[2] = a1[1] - 1;\n}\ngoto LABEL_55;\n}\n}\nelse if ( v16 >= 9 )\n{\nswitch ( v16 )\n{\ncase 9:\ncase 10:\ncase 13:\ncase 32:\ngoto LABEL_55;\ncase 34:\nv14 = sub_4158D6(a1, a2, a3, a4, a5);\nif ( v14 < 0 )\nreturn (unsigned int)v14;\n++v17;\nif ( a1[2] != -1 && a4 )\n{\nv9 = 20LL * a1[2] + a4;\n++*(_DWORD *)(v9 + 12);\n}\nbreak;\ncase 44:\nif ( a4 && a1[2] != -1 && *(_DWORD *)(20LL * a1[2] + a4) != 2 && *(_DWORD *)(20LL * a1[2] + a4) != 1 )\na1[2] = *(_DWORD *)(20LL * a1[2] + a4 + 16);\ngoto LABEL_55;\ncase 58:\na1[2] = a1[1] - 1;\ngoto LABEL_55;\ndefault:\ngoto LABEL_50;\n}\ngoto LABEL_55;\n}\n}\n}\n}\nLABEL_50:\nv15 = sub_41574C(a1, a2, a3, a4, a5);\nif ( v15 < 0 )\nreturn (unsigned int)v15;\n++v17;\nif ( a1[2] != -1 && a4 )\n{\nv10 = 20LL * a1[2] + a4;\n++*(_DWORD *)(v10 + 12);\n}\nLABEL_55:\n++*a1;\n}\nif ( a4 )\n{\nfor ( j = a1[1] - 1; j >= 0; --j )\n{\nif ( *(_DWORD *)(20LL * j + a4 + 4) != -1 && *(_DWORD *)(20LL * j + a4 + 8) == -1 )\nreturn 4294967293LL;\n}\n}\nreturn v17;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v15,v16,v17,v18,sub_415B86,sub_415686,sub_4158D6,sub_41574C,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'len', 'a4': 'tokens', 'a1': 'parser', 'a2': 'js', 'a5': 'num_tokens', 'v15': 'ra', 'v16': 'c', 'v17': 'count', 'v18': 'token', 'sub_415B86': 'jsmn_parse', 'sub_415686': 'jsmn_alloc_token', 'sub_4158D6': 'jsmn_parse_string', 'sub_41574C': 'jsmn_parse_primitive'}"}
psa_start_key_creation
6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7
mattsta
trade-balancer
NA
static psa_status_t psa_start_key_creation( psa_key_creation_method_t method, const psa_key_attributes_t *attributes, psa_key_slot_t **p_slot, psa_se_drv_table_entry_t **p_drv ) { psa_status_t status; psa_key_id_t volatile_key_id; psa_key_slot_t *slot; (void) method; *p_drv = NULL; status = psa_validate_key_attributes( attributes, p_drv ); if( status != PSA_SUCCESS ) return( status ); status = psa_get_empty_key_slot( &volatile_key_id, p_slot ); if( status != PSA_SUCCESS ) return( status ); slot = *p_slot; /* We're storing the declared bit-size of the key. It's up to each * creation mechanism to verify that this information is correct. * It's automatically correct for mechanisms that use the bit-size as * an input (generate, device) but not for those where the bit-size * is optional (import, copy). In case of a volatile key, assign it the * volatile key identifier associated to the slot returned to contain its * definition. */ slot->attr = attributes->core; if( PSA_KEY_LIFETIME_IS_VOLATILE( slot->attr.lifetime ) ) { #if !defined(MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER) slot->attr.id = volatile_key_id; #else slot->attr.id.key_id = volatile_key_id; #endif } /* Erase external-only flags from the internal copy. To access * external-only flags, query `attributes`. Thanks to the check * in psa_validate_key_attributes(), this leaves the dual-use * flags and any internal flag that psa_get_empty_key_slot() * may have set. */ slot->attr.flags &= ~MBEDTLS_PSA_KA_MASK_EXTERNAL_ONLY; #if defined(MBEDTLS_PSA_CRYPTO_SE_C) /* For a key in a secure element, we need to do three things * when creating or registering a persistent key: * create the key file in internal storage, create the * key inside the secure element, and update the driver's * persistent data. This is done by starting a transaction that will * encompass these three actions. * For registering a volatile key, we just need to find an appropriate * slot number inside the SE. Since the key is designated volatile, creating * a transaction is not required. */ /* The first thing to do is to find a slot number for the new key. * We save the slot number in persistent storage as part of the * transaction data. It will be needed to recover if the power * fails during the key creation process, to clean up on the secure * element side after restarting. Obtaining a slot number from the * secure element driver updates its persistent state, but we do not yet * save the driver's persistent state, so that if the power fails, * we can roll back to a state where the key doesn't exist. */ if( *p_drv != NULL ) { status = psa_find_se_slot_for_key( attributes, method, *p_drv, &slot->data.se.slot_number ); if( status != PSA_SUCCESS ) return( status ); if( ! PSA_KEY_LIFETIME_IS_VOLATILE( attributes->core.lifetime ) ) { psa_crypto_prepare_transaction( PSA_CRYPTO_TRANSACTION_CREATE_KEY ); psa_crypto_transaction.key.lifetime = slot->attr.lifetime; psa_crypto_transaction.key.slot = slot->data.se.slot_number; psa_crypto_transaction.key.id = slot->attr.id; status = psa_crypto_save_transaction( ); if( status != PSA_SUCCESS ) { (void) psa_crypto_stop_transaction( ); return( status ); } } } if( *p_drv == NULL && method == PSA_KEY_CREATION_REGISTER ) { /* Key registration only makes sense with a secure element. */ return( PSA_ERROR_INVALID_ARGUMENT ); } #endif /* MBEDTLS_PSA_CRYPTO_SE_C */ return( PSA_SUCCESS ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_425FA1", "function_addr": 4349857, "binary_name": "6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 48h"], [4, "mov [rbp+var_34], edi"], [5, "mov [rbp+var_40], rsi"], [6, "mov [rbp+var_48], rdx"], [7, "mov [rbp+var_50], rcx"], [8, "mov rax, [rbp+var_50]"], [9, "mov qword ptr [rax], 0"], [10, "mov rdx, [rbp+var_50]"], [11, "mov rax, [rbp+var_40]"], [12, "mov rsi, rdx"], [13, "mov rdi, rax"], [14, "call sub_425E9C"], [15, "mov [rbp+var_14], eax"], [16, "cmp [rbp+var_14], 0"], [17, "jz short loc_425FE5"], [18, "mov eax, [rbp+var_14]"], [19, "jmp short loc_426064"], [20, "mov rdx, [rbp+var_48]"], [21, "lea rax, [rbp+var_24]"], [22, "mov rsi, rdx"], [23, "mov rdi, rax"], [24, "call sub_42D5AF"], [25, "mov [rbp+var_14], eax"], [26, "cmp [rbp+var_14], 0"], [27, "jz short loc_426006"], [28, "mov eax, [rbp+var_14]"], [29, "jmp short loc_426064"], [30, "mov rax, [rbp+var_48]"], [31, "mov rax, [rax]"], [32, "mov [rbp+var_20], rax"], [33, "mov rax, [rbp+var_20]"], [34, "mov rdx, [rbp+var_40]"], [35, "mov rcx, [rdx]"], [36, "mov rbx, [rdx+8]"], [37, "mov [rax], rcx"], [38, "mov [rax+8], rbx"], [39, "mov rcx, [rdx+10h]"], [40, "mov [rax+10h], rcx"], [41, "mov edx, [rdx+18h]"], [42, "mov [rax+18h], edx"], [43, "mov rax, [rbp+var_20]"], [44, "mov eax, [rax+4]"], [45, "test al, al"], [46, "jnz short loc_42604A"], [47, "mov edx, [rbp+var_24]"], [48, "mov rax, [rbp+var_20]"], [49, "mov [rax+8], edx"], [50, "mov rax, [rbp+var_20]"], [51, "movzx eax, word ptr [rax+18h]"], [52, "and eax, 0FFFFFFFEh"], [53, "mov edx, eax"], [54, "mov rax, [rbp+var_20]"], [55, "mov [rax+18h], dx"], [56, "mov eax, 0"], [57, "mov rbx, [rbp+var_8]"], [58, "leave"], [59, "retn"]], "data_dep": [[8, 7], [9, 8], [10, 7], [11, 5], [12, 10], [13, 11], [15, 14], [16, 15], [17, 16], [18, 15], [20, 6], [21, 14], [22, 20], [23, 21], [25, 24], [26, 25], [27, 26], [28, 25], [30, 6], [31, 38], [31, 40], [31, 42], [31, 37], [31, 30], [31, 9], [32, 31], [33, 32], [34, 5], [35, 42], [35, 37], [35, 9], [35, 34], [35, 38], [35, 40], [36, 9], [36, 34], [36, 38], [36, 40], [36, 42], [36, 37], [37, 33], [37, 35], [38, 36], [38, 33], [39, 34], [39, 38], [40, 33], [40, 39], [41, 40], [41, 34], [42, 41], [42, 33], [43, 32], [44, 42], [44, 43], [45, 44], [46, 45], [48, 32], [49, 48], [49, 47], [50, 32], [51, 9], [51, 50], [51, 38], [51, 40], [51, 49], [51, 42], [51, 37], [51, 55], [52, 51], [53, 52], [54, 32], [55, 54], [55, 53], [59, 18], [59, 56], [59, 28]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7_6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7.jsonl.gz", "strip_func_name": "sub_425FA1", "query": "\n\n\n__int64 __fastcall sub_425FA1(__int64 a1, __int64 a2, __int64 *a3, _QWORD *a4)\n{\n__int64 v5; // rax\n__int64 v6; // rbx\nint v8; // [rsp+2Ch] [rbp-24h] BYREF\n__int64 v9; // [rsp+30h] [rbp-20h]\nunsigned int v10; // [rsp+3Ch] [rbp-14h]\n\n*a4 = 0LL;\nv10 = sub_425E9C(a2, (__int64)a4);\nif ( v10 )\nreturn v10;\nv10 = sub_42D5AF(&v8, a3);\nif ( v10 )\nreturn v10;\nv9 = *a3;\nv5 = v9;\nv6 = *(_QWORD *)(a2 + 8);\n*(_QWORD *)v9 = *(_QWORD *)a2;\n*(_QWORD *)(v5 + 8) = v6;\n*(_QWORD *)(v5 + 16) = *(_QWORD *)(a2 + 16);\n*(_DWORD *)(v5 + 24) = *(_DWORD *)(a2 + 24);\nif ( !(unsigned __int8)*(_DWORD *)(v9 + 4) )\n*(_DWORD *)(v9 + 8) = v8;\n*(_WORD *)(v9 + 24) &= 0xFFFEu;\nreturn 0LL;\n}\n\n\n\nQ:[a3,a4,a2,a1,v8,v9,v10,sub_425FA1,sub_425E9C,sub_42D5AF,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'p_slot', 'a4': 'p_drv', 'a2': 'attributes', 'a1': 'method', 'v8': 'volatile_key_id', 'v9': 'slot', 'v10': 'status', 'sub_425FA1': 'psa_start_key_creation', 'sub_425E9C': 'psa_validate_key_attributes', 'sub_42D5AF': 'psa_get_empty_key_slot'}"}
_free_row
904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40
viest
php-ext-xlswriter
NA
STATIC void _free_row(lxw_row *row) { lxw_cell *cell; lxw_cell *next_cell; if (!row) return; for (cell = RB_MIN(lxw_table_cells, row->cells); cell; cell = next_cell) { next_cell = RB_NEXT(lxw_table_cells, row->cells, cell); RB_REMOVE(lxw_table_cells, row->cells, cell); _free_cell(cell); } free(row->cells); free(row); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40ABE6", "function_addr": 4238310, "binary_name": "904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+ptr], rdi"], [4, "cmp [rbp+ptr], 0"], [5, "jz short loc_40AC74"], [6, "mov rax, [rbp+ptr]"], [7, "mov rax, [rax+20h]"], [8, "mov esi, 0FFFFFFFFh"], [9, "mov rdi, rax"], [10, "call sub_406808"], [11, "mov [rbp+var_8], rax"], [12, "jmp short loc_40AC4F"], [13, "mov rax, [rbp+var_8]"], [14, "mov rdi, rax"], [15, "call sub_406760"], [16, "mov [rbp+var_10], rax"], [17, "mov rax, [rbp+ptr]"], [18, "mov rax, [rax+20h]"], [19, "mov rdx, [rbp+var_8]"], [20, "mov rsi, rdx"], [21, "mov rdi, rax"], [22, "call sub_406497"], [23, "mov rax, [rbp+var_8]"], [24, "mov rdi, rax"], [25, "call sub_40AB52"], [26, "mov rax, [rbp+var_10]"], [27, "mov [rbp+var_8], rax"], [28, "cmp [rbp+var_8], 0"], [29, "jnz short loc_40AC14"], [30, "mov rax, [rbp+ptr]"], [31, "mov rax, [rax+20h]"], [32, "mov rdi, rax"], [33, "call _free"], [34, "mov rax, [rbp+ptr]"], [35, "mov rdi, rax"], [36, "call _free"], [37, "jmp short locret_40AC75"], [38, "nop"], [39, "leave"], [40, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 6], [9, 7], [11, 10], [13, 27], [13, 11], [14, 13], [16, 15], [17, 3], [18, 17], [19, 27], [19, 11], [20, 19], [21, 18], [23, 27], [23, 11], [24, 23], [26, 16], [27, 26], [28, 27], [28, 11], [29, 28], [30, 3], [31, 30], [32, 31], [34, 3], [35, 34], [40, 36]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40_904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40.jsonl.gz", "strip_func_name": "sub_40ABE6", "query": "\n\n\nvoid __fastcall sub_40ABE6(__int64 **a1)\n{\n__int64 v1; // [rsp+10h] [rbp-10h]\n__int64 i; // [rsp+18h] [rbp-8h]\n\nif ( a1 )\n{\nfor ( i = sub_406808(a1[4], -1); i; i = v1 )\n{\nv1 = sub_406760(i);\nsub_406497(a1[4], i);\nsub_40AB52(i);\n}\nfree(a1[4]);\nfree(a1);\n}\n}\n\n\n\nQ:[a1,v1,i,sub_40ABE6,sub_406808,sub_406760,sub_406497,sub_40AB52,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'row', 'v1': 'next_cell', 'i': 'cell', 'sub_40ABE6': '_free_row', 'sub_406808': 'lxw_table_cells_RB_MINMAX', 'sub_406760': 'lxw_table_cells_RB_NEXT', 'sub_406497': 'lxw_table_cells_RB_REMOVE', 'sub_40AB52': '_free_cell'}"}
mbedtls_ecp_group_free
5ee93d36985e936bbd6f8188afebd6a24e0643eb24f160595f27ac160461f335
analogdevicesinc
no-OS
NA
void mbedtls_ecp_group_free( mbedtls_ecp_group *grp ) { size_t i; if( grp == NULL ) return; if( grp->h != 1 ) { mbedtls_mpi_free( &grp->P ); mbedtls_mpi_free( &grp->A ); mbedtls_mpi_free( &grp->B ); mbedtls_ecp_point_free( &grp->G ); mbedtls_mpi_free( &grp->N ); } if( grp->T != NULL ) { for( i = 0; i < grp->T_size; i++ ) mbedtls_ecp_point_free( &grp->T[i] ); mbedtls_free( grp->T ); } mbedtls_platform_zeroize( grp, sizeof( mbedtls_ecp_group ) ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40BDA2", "function_addr": 4242850, "binary_name": "5ee93d36985e936bbd6f8188afebd6a24e0643eb24f160595f27ac160461f335.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, "jz loc_40BE98"], [6, "mov rax, [rbp+var_18]"], [7, "mov eax, [rax+0C0h]"], [8, "cmp eax, 1"], [9, "jz short loc_40BE1A"], [10, "mov rax, [rbp+var_18]"], [11, "add rax, 8"], [12, "mov rdi, rax"], [13, "call sub_404DA7"], [14, "mov rax, [rbp+var_18]"], [15, "add rax, 20h "], [16, "mov rdi, rax"], [17, "call sub_404DA7"], [18, "mov rax, [rbp+var_18]"], [19, "add rax, 38h "], [20, "mov rdi, rax"], [21, "call sub_404DA7"], [22, "mov rax, [rbp+var_18]"], [23, "add rax, 50h "], [24, "mov rdi, rax"], [25, "call sub_40BD5E"], [26, "mov rax, [rbp+var_18]"], [27, "add rax, 98h"], [28, "mov rdi, rax"], [29, "call sub_404DA7"], [30, "mov rax, [rbp+var_18]"], [31, "mov rax, [rax+0E8h]"], [32, "test rax, rax"], [33, "jz short loc_40BE85"], [34, "mov [rbp+var_8], 0"], [35, "jmp short loc_40BE61"], [36, "mov rax, [rbp+var_18]"], [37, "mov rcx, [rax+0E8h]"], [38, "mov rdx, [rbp+var_8]"], [39, "mov rax, rdx"], [40, "shl rax, 3"], [41, "add rax, rdx"], [42, "shl rax, 3"], [43, "add rax, rcx"], [44, "mov rdi, rax"], [45, "call sub_40BD5E"], [46, "add [rbp+var_8], 1"], [47, "mov rax, [rbp+var_18]"], [48, "mov rax, [rax+0F0h]"], [49, "cmp [rbp+var_8], rax"], [50, "jb short loc_40BE34"], [51, "mov rax, [rbp+var_18]"], [52, "mov rax, [rax+0E8h]"], [53, "mov rdi, rax"], [54, "call _free"], [55, "mov rax, [rbp+var_18]"], [56, "mov esi, 0F8h"], [57, "mov rdi, rax"], [58, "call sub_416AAA"], [59, "jmp short locret_40BE99"], [60, "nop"], [61, "leave"], [62, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 6], [8, 7], [9, 8], [10, 3], [11, 10], [12, 11], [14, 3], [15, 14], [16, 15], [18, 3], [19, 18], [20, 19], [22, 3], [23, 22], [24, 23], [26, 3], [27, 26], [28, 27], [30, 3], [31, 30], [32, 31], [33, 32], [36, 3], [37, 36], [38, 34], [38, 46], [39, 38], [40, 39], [41, 40], [41, 38], [42, 41], [43, 37], [43, 42], [44, 43], [46, 34], [46, 46], [47, 3], [48, 47], [49, 34], [49, 46], [49, 48], [50, 49], [51, 3], [52, 51], [53, 52], [55, 3], [57, 55], [62, 58]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5ee93d36985e936bbd6f8188afebd6a24e0643eb24f160595f27ac160461f335_5ee93d36985e936bbd6f8188afebd6a24e0643eb24f160595f27ac160461f335.jsonl.gz", "strip_func_name": "sub_40BDA2", "query": "\n\n\n__int64 __fastcall sub_40BDA2(__int64 a1)\n{\n__int64 result; // rax\nunsigned __int64 i; // [rsp+18h] [rbp-8h]\n\nif ( a1 )\n{\nif ( *(_DWORD *)(a1 + 192) != 1 )\n{\nsub_404DA7(a1 + 8);\nsub_404DA7(a1 + 32);\nsub_404DA7(a1 + 56);\nsub_40BD5E(a1 + 80);\nsub_404DA7(a1 + 152);\n}\nif ( *(_QWORD *)(a1 + 232) )\n{\nfor ( i = 0LL; i < *(_QWORD *)(a1 + 240); ++i )\nsub_40BD5E(*(_QWORD *)(a1 + 232) + 72 * i);\nfree(*(void **)(a1 + 232));\n}\nresult = sub_416AAA(a1, 248LL);\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_40BDA2,sub_404DA7,sub_40BD5E,sub_416AAA,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'grp', 'sub_40BDA2': 'mbedtls_ecp_group_free', 'sub_404DA7': 'mbedtls_mpi_free', 'sub_40BD5E': 'mbedtls_ecp_point_free', 'sub_416AAA': 'mbedtls_platform_zeroize'}"}
zip64FlushWriteBuffer
904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40
viest
php-ext-xlswriter
NA
local int zip64FlushWriteBuffer(zip64_internal* zi) { int err=ZIP_OK; if (zi->ci.encrypt != 0) { #ifndef NOCRYPT uInt i; int t; for (i=0;i<zi->ci.pos_in_buffered_data;i++) zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, zi->ci.buffered_data[i],t); #endif } if (ZWRITE64(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) != zi->ci.pos_in_buffered_data) err = ZIP_ERRNO; zi->ci.totalCompressedData += zi->ci.pos_in_buffered_data; #ifdef HAVE_BZIP2 if(zi->ci.method == Z_BZIP2ED) { zi->ci.totalUncompressedData += zi->ci.bstream.total_in_lo32; zi->ci.bstream.total_in_lo32 = 0; zi->ci.bstream.total_in_hi32 = 0; } else #endif { zi->ci.totalUncompressedData += zi->ci.stream.total_in; zi->ci.stream.total_in = 0; } zi->ci.pos_in_buffered_data = 0; return err; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_447178", "function_addr": 4485496, "binary_name": "904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_4], 0"], [5, "mov rax, [rbp+var_18]"], [6, "mov r8, [rax+10h]"], [7, "mov rax, [rbp+var_18]"], [8, "mov eax, [rax+0ECh]"], [9, "mov ecx, eax"], [10, "mov rax, [rbp+var_18]"], [11, "lea rdx, [rax+128h]"], [12, "mov rax, [rbp+var_18]"], [13, "mov rsi, [rax+58h]"], [14, "mov rax, [rbp+var_18]"], [15, "mov rax, [rax+38h]"], [16, "mov rdi, rax"], [17, "call r8"], [18, "mov rdx, [rbp+var_18]"], [19, "mov edx, [rdx+0ECh]"], [20, "mov edx, edx"], [21, "cmp rax, rdx"], [22, "jz short loc_4471D8"], [23, "mov [rbp+var_4], 0FFFFFFFFh"], [24, "mov rax, [rbp+var_18]"], [25, "mov rdx, [rax+10148h]"], [26, "mov rax, [rbp+var_18]"], [27, "mov eax, [rax+0ECh]"], [28, "mov eax, eax"], [29, "add rdx, rax"], [30, "mov rax, [rbp+var_18]"], [31, "mov [rax+10148h], rdx"], [32, "mov rax, [rbp+var_18]"], [33, "mov rdx, [rax+10150h]"], [34, "mov rax, [rbp+var_18]"], [35, "mov rax, [rax+88h]"], [36, "add rdx, rax"], [37, "mov rax, [rbp+var_18]"], [38, "mov [rax+10150h], rdx"], [39, "mov rax, [rbp+var_18]"], [40, "mov qword ptr [rax+88h], 0"], [41, "mov rax, [rbp+var_18]"], [42, "mov dword ptr [rax+0ECh], 0"], [43, "mov eax, [rbp+var_4]"], [44, "leave"], [45, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 3], [8, 7], [9, 8], [10, 3], [11, 10], [12, 3], [13, 12], [14, 3], [15, 14], [16, 15], [17, 6], [18, 3], [19, 18], [20, 19], [21, 17], [21, 20], [22, 21], [24, 3], [25, 24], [26, 3], [27, 26], [28, 27], [29, 25], [29, 28], [30, 3], [31, 29], [31, 30], [32, 3], [33, 32], [33, 31], [34, 3], [35, 31], [35, 34], [36, 33], [36, 35], [37, 3], [38, 37], [38, 36], [39, 3], [40, 39], [41, 3], [42, 41], [43, 23], [43, 4], [45, 43]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40_904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40.jsonl.gz", "strip_func_name": "sub_447178", "query": "\n\n\n__int64 __fastcall sub_447178(__int64 a1)\n{\nunsigned int v2; // [rsp+1Ch] [rbp-4h]\n\nv2 = 0;\nif ( (*(__int64 (__fastcall **)(_QWORD, _QWORD, __int64, _QWORD))(a1 + 16))(\n*(_QWORD *)(a1 + 56),\n*(_QWORD *)(a1 + 88),\na1 + 296,\n*(unsigned int *)(a1 + 236)) != *(_DWORD *)(a1 + 236) )\nv2 = -1;\n*(_QWORD *)(a1 + 65864) += *(unsigned int *)(a1 + 236);\n*(_QWORD *)(a1 + 65872) += *(_QWORD *)(a1 + 136);\n*(_QWORD *)(a1 + 136) = 0LL;\n*(_DWORD *)(a1 + 236) = 0;\nreturn v2;\n}\n\n\n\nQ:[a1,v2,sub_447178,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'zi', 'v2': 'err', 'sub_447178': 'zip64FlushWriteBuffer'}"}
myhtml_token_attr_compare
7301b6e819ff084818bf7bd8fce59c1aa17e3d4892c34b25c84a11ff0b5959c5
lexborisov
Modest
NA
bool myhtml_token_attr_compare(myhtml_token_node_t* target, myhtml_token_node_t* dest) { if(target == NULL || dest == NULL) return false; myhtml_token_attr_t* target_attr = target->attr_first; myhtml_token_attr_t* dest_attr = dest->attr_first; while (target_attr && dest_attr) { if(target_attr->key.length == dest_attr->key.length && target_attr->value.length == dest_attr->value.length) { if(mycore_strcmp(target_attr->key.data, dest_attr->key.data) != 0) break; if(mycore_strcasecmp(target_attr->value.data, dest_attr->value.data) != 0) break; } else break; target_attr = target_attr->next; dest_attr = dest_attr->next; } if(target_attr == NULL && dest_attr == NULL) return true; return false; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_408874", "function_addr": 4229236, "binary_name": "7301b6e819ff084818bf7bd8fce59c1aa17e3d4892c34b25c84a11ff0b5959c5.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_408892"], [7, "cmp [rbp+var_20], 0"], [8, "jnz short loc_40889C"], [9, "mov eax, 0"], [10, "jmp locret_40896F"], [11, "mov rax, [rbp+var_18]"], [12, "mov rax, [rax+50h]"], [13, "mov [rbp+var_8], rax"], [14, "mov rax, [rbp+var_20]"], [15, "mov rax, [rax+50h]"], [16, "mov [rbp+var_10], rax"], [17, "jmp loc_40893D"], [18, "mov rax, [rbp+var_8]"], [19, "mov rdx, [rax+20h]"], [20, "mov rax, [rbp+var_10]"], [21, "mov rax, [rax+20h]"], [22, "cmp rdx, rax"], [23, "jnz loc_408955"], [24, "mov rax, [rbp+var_8]"], [25, "mov rdx, [rax+48h]"], [26, "mov rax, [rbp+var_10]"], [27, "mov rax, [rax+48h]"], [28, "cmp rdx, rax"], [29, "jnz short loc_408955"], [30, "mov rax, [rbp+var_10]"], [31, "mov rdx, [rax+10h]"], [32, "mov rax, [rbp+var_8]"], [33, "mov rax, [rax+10h]"], [34, "mov rsi, rdx"], [35, "mov rdi, rax"], [36, "call sub_4213A9"], [37, "test rax, rax"], [38, "jnz short loc_408951"], [39, "mov rax, [rbp+var_10]"], [40, "mov rdx, [rax+38h]"], [41, "mov rax, [rbp+var_8]"], [42, "mov rax, [rax+38h]"], [43, "mov rsi, rdx"], [44, "mov rdi, rax"], [45, "call sub_421272"], [46, "test rax, rax"], [47, "jnz short loc_408954"], [48, "mov rax, [rbp+var_8]"], [49, "mov rax, [rax]"], [50, "mov [rbp+var_8], rax"], [51, "mov rax, [rbp+var_10]"], [52, "mov rax, [rax]"], [53, "mov [rbp+var_10], rax"], [54, "cmp [rbp+var_8], 0"], [55, "jz short loc_408955"], [56, "cmp [rbp+var_10], 0"], [57, "jnz loc_4088B9"], [58, "jmp short loc_408955"], [59, "nop"], [60, "jmp short loc_408955"], [61, "nop"], [62, "cmp [rbp+var_8], 0"], [63, "jnz short loc_40896A"], [64, "cmp [rbp+var_10], 0"], [65, "jnz short loc_40896A"], [66, "mov eax, 1"], [67, "jmp short locret_40896F"], [68, "mov eax, 0"], [69, "leave"], [70, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 4], [8, 7], [11, 3], [12, 11], [13, 12], [14, 4], [15, 14], [16, 15], [18, 50], [18, 13], [19, 18], [20, 53], [20, 16], [21, 20], [22, 19], [22, 21], [23, 22], [24, 50], [24, 13], [25, 24], [26, 53], [26, 16], [27, 26], [28, 27], [28, 25], [29, 28], [30, 53], [30, 16], [31, 30], [32, 50], [32, 13], [33, 32], [34, 31], [35, 33], [37, 36], [38, 37], [39, 53], [39, 16], [40, 39], [41, 50], [41, 13], [42, 41], [43, 40], [44, 42], [46, 45], [47, 46], [48, 50], [48, 13], [49, 48], [50, 49], [51, 53], [51, 16], [52, 51], [53, 52], [54, 13], [54, 50], [55, 54], [56, 16], [56, 53], [57, 56], [62, 50], [62, 13], [63, 62], [64, 53], [64, 16], [65, 64], [70, 9], [70, 66], [70, 68]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/7301b6e819ff084818bf7bd8fce59c1aa17e3d4892c34b25c84a11ff0b5959c5_7301b6e819ff084818bf7bd8fce59c1aa17e3d4892c34b25c84a11ff0b5959c5.jsonl.gz", "strip_func_name": "sub_408874", "query": "\n\n\n_BOOL8 __fastcall sub_408874(__int64 a1, __int64 a2)\n{\n_QWORD *i; // [rsp+10h] [rbp-10h]\n_QWORD *v4; // [rsp+18h] [rbp-8h]\n\nif ( !a1 || !a2 )\nreturn 0LL;\nv4 = *(_QWORD **)(a1 + 80);\nfor ( i = *(_QWORD **)(a2 + 80);\nv4 && i && v4[4] == i[4] && v4[9] == i[9] && !sub_4213A9(v4[2], i[2]) && !sub_421272(v4[7], i[7]);\ni = (_QWORD *)*i )\n{\nv4 = (_QWORD *)*v4;\n}\nreturn !v4 && !i;\n}\n\n\n\nQ:[a1,a2,i,v4,sub_408874,sub_4213A9,sub_421272,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'target', 'a2': 'dest', 'i': 'dest_attr', 'v4': 'target_attr', 'sub_408874': 'myhtml_token_attr_compare', 'sub_4213A9': 'mycore_strcmp', 'sub_421272': 'mycore_strcasecmp'}"}
read_rr
3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7
msysgit
msysgit
NA
static void read_rr(struct string_list *rr) { unsigned char sha1[20]; char buf[PATH_MAX]; FILE *in = fopen(merge_rr_path, "r"); if (!in) return; while (fread(buf, 40, 1, in) == 1) { int i; char *name; if (get_sha1_hex(buf, sha1)) die("corrupt MERGE_RR"); buf[40] = '\0'; name = xstrdup(buf); if (fgetc(in) != '\t') die("corrupt MERGE_RR"); for (i = 0; i < sizeof(buf); i++) { int c = fgetc(in); if (c < 0) die("corrupt MERGE_RR"); buf[i] = c; if (c == 0) break; } if (i == sizeof(buf)) die("filename too long"); string_list_insert(rr, buf)->util = name; } fclose(in); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4B7728", "function_addr": 4945704, "binary_name": "3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 1040h"], [3, "mov [rbp+var_1038], rdi"], [4, "mov rax, cs:qword_530BA8"], [5, "mov esi, offset aR_12"], [6, "mov rdi, rax"], [7, "call _fopen64"], [8, "mov [rbp+stream], rax"], [9, "cmp [rbp+stream], 0"], [10, "jz loc_4B788B"], [11, "jmp loc_4B7853"], [12, "lea rdx, [rbp+var_30]"], [13, "lea rax, [rbp+ptr]"], [14, "mov rsi, rdx"], [15, "mov rdi, rax"], [16, "call sub_40DBD1"], [17, "test eax, eax"], [18, "jz short loc_4B778B"], [19, "mov edi, offset aCorruptMergeRr"], [20, "mov eax, 0"], [21, "call sub_432D06"], [22, "mov [rbp+var_1008], 0"], [23, "lea rax, [rbp+ptr]"], [24, "mov rdi, rax"], [25, "call sub_43534E"], [26, "mov [rbp+var_18], rax"], [27, "mov rax, [rbp+stream]"], [28, "mov rdi, rax"], [29, "call _fgetc"], [30, "cmp eax, 9"], [31, "jz short loc_4B77C5"], [32, "mov edi, offset aCorruptMergeRr"], [33, "mov eax, 0"], [34, "call sub_432D06"], [35, "mov [rbp+var_4], 0"], [36, "jmp short loc_4B780D"], [37, "mov rax, [rbp+stream]"], [38, "mov rdi, rax"], [39, "call _fgetc"], [40, "mov [rbp+var_1C], eax"], [41, "cmp [rbp+var_1C], 0"], [42, "jns short loc_4B77F2"], [43, "mov edi, offset aCorruptMergeRr"], [44, "mov eax, 0"], [45, "call sub_432D06"], [46, "mov eax, [rbp+var_1C]"], [47, "mov edx, eax"], [48, "mov eax, [rbp+var_4]"], [49, "cdqe"], [50, "mov [rbp+rax+ptr], dl"], [51, "cmp [rbp+var_1C], 0"], [52, "jz short loc_4B7819"], [53, "add [rbp+var_4], 1"], [54, "mov eax, [rbp+var_4]"], [55, "cmp eax, 0FFFh"], [56, "jbe short loc_4B77CE"], [57, "jmp short loc_4B781A"], [58, "nop"], [59, "cmp [rbp+var_4], 1000h"], [60, "jnz short loc_4B7832"], [61, "mov edi, offset aFilenameTooLon"], [62, "mov eax, 0"], [63, "call sub_432D06"], [64, "lea rdx, [rbp+ptr]"], [65, "mov rax, [rbp+var_1038]"], [66, "mov rsi, rdx"], [67, "mov rdi, rax"], [68, "call sub_42EA43"], [69, "mov rdx, [rbp+var_18]"], [70, "mov [rax+8], rdx"], [71, "mov rdx, [rbp+stream]"], [72, "lea rax, [rbp+ptr]"], [73, "mov rcx, rdx"], [74, "mov edx, 1"], [75, "mov esi, 28h "], [76, "mov rdi, rax"], [77, "call _fread"], [78, "cmp rax, 1"], [79, "jz loc_4B7762"], [80, "mov rax, [rbp+stream]"], [81, "mov rdi, rax"], [82, "call _fclose"], [83, "jmp short locret_4B788C"], [84, "nop"], [85, "leave"], [86, "retn"]], "data_dep": [[6, 4], [8, 7], [9, 8], [10, 9], [12, 74], [13, 77], [14, 12], [15, 13], [17, 16], [18, 17], [23, 17], [24, 23], [26, 25], [27, 8], [28, 27], [30, 29], [31, 30], [37, 8], [38, 37], [40, 39], [41, 40], [42, 41], [46, 40], [47, 46], [48, 35], [48, 53], [50, 48], [50, 47], [51, 40], [52, 51], [53, 35], [53, 53], [54, 35], [54, 53], [55, 54], [56, 55], [59, 35], [59, 53], [60, 59], [64, 47], [64, 12], [65, 3], [66, 64], [67, 65], [69, 26], [70, 69], [70, 68], [71, 8], [72, 68], [72, 7], [73, 71], [76, 72], [78, 77], [79, 78], [80, 8], [81, 80], [86, 7], [86, 82]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7_3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7.jsonl.gz", "strip_func_name": "sub_4B7728", "query": "\n\n\nint __fastcall sub_4B7728(__int64 a1)\n{\nFILE *v1; // rax\n__int64 v2; // rdx\n__int64 v3; // rcx\n__int64 v4; // r8\n__int64 v5; // r9\n__int64 v6; // rdx\n__int64 v7; // rcx\n__int64 v8; // r8\n__int64 v9; // r9\n__int64 v10; // rdx\n__int64 v11; // rax\nunsigned __int8 ptr[4096]; // [rsp+10h] [rbp-1030h] BYREF\nchar v14[20]; // [rsp+1010h] [rbp-30h] BYREF\nint v15; // [rsp+1024h] [rbp-1Ch]\nchar *v16; // [rsp+1028h] [rbp-18h]\nFILE *stream; // [rsp+1030h] [rbp-10h]\nunsigned int i; // [rsp+103Ch] [rbp-4h]\n\nv1 = fopen64(qword_530BA8, \"r\");\nstream = v1;\nif ( v1 )\n{\nwhile ( fread(ptr, 0x28uLL, 1uLL, stream) == 1 )\n{\nif ( (unsigned int)sub_40DBD1(ptr, v14) )\nsub_432D06((__int64)\"corrupt MERGE_RR\", (__int64)v14, v2, v3, v4, v5);\nptr[40] = 0;\nv16 = sub_43534E((const char *)ptr, (__int64)v14);\nif ( fgetc(stream) != 9 )\nsub_432D06((__int64)\"corrupt MERGE_RR\", (__int64)v14, v6, v7, v8, v9);\nfor ( i = 0; i <= 0xFFF; ++i )\n{\nv15 = fgetc(stream);\nif ( v15 < 0 )\nsub_432D06((__int64)\"corrupt MERGE_RR\", (__int64)v14, v10, v7, v8, v9);\nv6 = (unsigned int)v15;\nptr[i] = v15;\nif ( !v15 )\nbreak;\n}\nif ( i == 4096 )\nsub_432D06((__int64)\"filename too long\", (__int64)v14, v6, v7, v8, v9);\nv11 = sub_42EA43(a1, (__int64)ptr);\n*(_QWORD *)(v11 + 8) = v16;\n}\nLODWORD(v1) = fclose(stream);\n}\nreturn (int)v1;\n}\n\n\n\nQ:[a1,ptr,v14,v15,v16,stream,sub_4B7728,sub_40DBD1,sub_432D06,sub_43534E,sub_42EA43,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'rr', 'ptr': 'buf', 'v14': 'sha1', 'v15': 'c', 'v16': 'name', 'stream': 'in', 'sub_4B7728': 'read_rr', 'sub_40DBD1': 'get_sha1_hex', 'sub_432D06': 'die', 'sub_43534E': 'xstrdup', 'sub_42EA43': 'string_list_insert'}"}
CMS_set1_signers_certs
03c200181d5bd9d9aef7e21f9916a04779b98f82f54c02e756e7d6abb15fdf67
RKX1209
bitvisor-gdb
NA
int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *scerts, unsigned int flags) { CMS_SignedData *sd; CMS_SignerInfo *si; CMS_CertificateChoices *cch; STACK_OF(CMS_CertificateChoices) *certs; X509 *x; int i, j; int ret = 0; sd = cms_get0_signed(cms); if (!sd) return -1; certs = sd->certificates; for (i = 0; i < sk_CMS_SignerInfo_num(sd->signerInfos); i++) { si = sk_CMS_SignerInfo_value(sd->signerInfos, i); if (si->signer) continue; for (j = 0; j < sk_X509_num(scerts); j++) { x = sk_X509_value(scerts, j); if (CMS_SignerInfo_cert_cmp(si, x) == 0) { CMS_SignerInfo_set1_signer_cert(si, x); ret++; break; } } if (si->signer || (flags & CMS_NOINTERN)) continue; for (j = 0; j < sk_CMS_CertificateChoices_num(certs); j++) { cch = sk_CMS_CertificateChoices_value(certs, j); if (cch->type != 0) continue; x = cch->d.certificate; if (CMS_SignerInfo_cert_cmp(si, x) == 0) { CMS_SignerInfo_set1_signer_cert(si, x); ret++; break; } } } return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_49F24B", "function_addr": 4846155, "binary_name": "03c200181d5bd9d9aef7e21f9916a04779b98f82f54c02e756e7d6abb15fdf67.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_C], 0"], [7, "mov rax, [rbp+var_48]"], [8, "mov rdi, rax"], [9, "call sub_49E30B"], [10, "mov [rbp+var_18], rax"], [11, "cmp [rbp+var_18], 0"], [12, "jnz short loc_49F286"], [13, "mov eax, 0FFFFFFFFh"], [14, "jmp locret_49F3E6"], [15, "mov rax, [rbp+var_18]"], [16, "mov rax, [rax+18h]"], [17, "mov [rbp+var_20], rax"], [18, "mov [rbp+var_4], 0"], [19, "jmp loc_49F3CA"], [20, "mov rax, [rbp+var_18]"], [21, "mov rax, [rax+28h]"], [22, "mov edx, [rbp+var_4]"], [23, "mov esi, edx"], [24, "mov rdi, rax"], [25, "call sub_424A6B"], [26, "mov [rbp+var_28], rax"], [27, "mov rax, [rbp+var_28]"], [28, "mov rax, [rax+38h]"], [29, "test rax, rax"], [30, "jnz loc_49F3C2"], [31, "mov [rbp+var_8], 0"], [32, "jmp short loc_49F31A"], [33, "mov edx, [rbp+var_8]"], [34, "mov rax, [rbp+var_50]"], [35, "mov esi, edx"], [36, "mov rdi, rax"], [37, "call sub_424A6B"], [38, "mov [rbp+var_30], rax"], [39, "mov rdx, [rbp+var_30]"], [40, "mov rax, [rbp+var_28]"], [41, "mov rsi, rdx"], [42, "mov rdi, rax"], [43, "call sub_49F222"], [44, "test eax, eax"], [45, "jnz short loc_49F316"], [46, "mov rdx, [rbp+var_30]"], [47, "mov rax, [rbp+var_28]"], [48, "mov rsi, rdx"], [49, "mov rdi, rax"], [50, "call sub_49F153"], [51, "add [rbp+var_C], 1"], [52, "jmp short loc_49F32B"], [53, "add [rbp+var_8], 1"], [54, "mov rax, [rbp+var_50]"], [55, "mov rdi, rax"], [56, "call sub_424A4D"], [57, "cmp [rbp+var_8], eax"], [58, "jl short loc_49F2D1"], [59, "mov rax, [rbp+var_28]"], [60, "mov rax, [rax+38h]"], [61, "test rax, rax"], [62, "jnz loc_49F3C5"], [63, "mov eax, [rbp+var_54]"], [64, "and eax, 10h"], [65, "test eax, eax"], [66, "jnz short loc_49F3C5"], [67, "mov [rbp+var_8], 0"], [68, "jmp short loc_49F3AF"], [69, "mov edx, [rbp+var_8]"], [70, "mov rax, [rbp+var_20]"], [71, "mov esi, edx"], [72, "mov rdi, rax"], [73, "call sub_424A6B"], [74, "mov [rbp+var_38], rax"], [75, "mov rax, [rbp+var_38]"], [76, "mov eax, [rax]"], [77, "test eax, eax"], [78, "jnz short loc_49F3AA"], [79, "mov rax, [rbp+var_38]"], [80, "mov rax, [rax+8]"], [81, "mov [rbp+var_30], rax"], [82, "mov rdx, [rbp+var_30]"], [83, "mov rax, [rbp+var_28]"], [84, "mov rsi, rdx"], [85, "mov rdi, rax"], [86, "call sub_49F222"], [87, "test eax, eax"], [88, "jnz short loc_49F3AB"], [89, "mov rdx, [rbp+var_30]"], [90, "mov rax, [rbp+var_28]"], [91, "mov rsi, rdx"], [92, "mov rdi, rax"], [93, "call sub_49F153"], [94, "add [rbp+var_C], 1"], [95, "jmp short loc_49F3C6"], [96, "nop"], [97, "add [rbp+var_8], 1"], [98, "mov rax, [rbp+var_20]"], [99, "mov rdi, rax"], [100, "call sub_424A4D"], [101, "cmp [rbp+var_8], eax"], [102, "jl short loc_49F34F"], [103, "jmp short loc_49F3C6"], [104, "nop"], [105, "jmp short loc_49F3C6"], [106, "nop"], [107, "add [rbp+var_4], 1"], [108, "mov rax, [rbp+var_18]"], [109, "mov rax, [rax+28h]"], [110, "mov rdi, rax"], [111, "call sub_424A4D"], [112, "cmp [rbp+var_4], eax"], [113, "jl loc_49F29E"], [114, "mov eax, [rbp+var_C]"], [115, "leave"], [116, "retn"]], "data_dep": [[7, 3], [8, 7], [10, 9], [11, 10], [12, 11], [15, 10], [16, 15], [17, 16], [20, 10], [21, 20], [22, 18], [22, 107], [23, 22], [24, 21], [26, 25], [27, 26], [28, 27], [29, 28], [30, 29], [33, 31], [33, 53], [34, 4], [35, 33], [36, 34], [38, 37], [39, 38], [40, 26], [41, 39], [42, 40], [44, 43], [45, 44], [46, 38], [47, 26], [48, 46], [49, 47], [51, 6], [51, 51], [51, 94], [53, 31], [53, 53], [54, 4], [55, 54], [57, 56], [57, 31], [57, 53], [58, 57], [59, 26], [60, 59], [61, 60], [62, 61], [63, 5], [64, 63], [65, 64], [66, 65], [69, 97], [69, 67], [70, 17], [71, 69], [72, 70], [74, 73], [75, 74], [76, 75], [77, 76], [78, 77], [79, 74], [80, 79], [81, 80], [82, 81], [83, 26], [84, 82], [85, 83], [87, 86], [88, 87], [89, 81], [90, 26], [91, 89], [92, 90], [94, 94], [94, 6], [94, 51], [97, 67], [97, 97], [98, 17], [99, 98], [101, 97], [101, 100], [101, 67], [102, 101], [107, 18], [107, 107], [108, 10], [109, 108], [110, 109], [112, 107], [112, 111], [112, 18], [113, 112], [114, 51], [114, 94], [114, 6], [116, 114], [116, 13]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/03c200181d5bd9d9aef7e21f9916a04779b98f82f54c02e756e7d6abb15fdf67_03c200181d5bd9d9aef7e21f9916a04779b98f82f54c02e756e7d6abb15fdf67.jsonl.gz", "strip_func_name": "sub_49F24B", "query": "\n\n\n__int64 __fastcall sub_49F24B(__int64 *a1, unsigned int *a2, char a3)\n{\n__int64 v5; // [rsp+28h] [rbp-38h]\n__int64 v6; // [rsp+30h] [rbp-30h]\n__int64 v7; // [rsp+30h] [rbp-30h]\n__int64 v8; // [rsp+38h] [rbp-28h]\nunsigned int *v9; // [rsp+40h] [rbp-20h]\n__int64 v10; // [rsp+48h] [rbp-18h]\nunsigned int v11; // [rsp+54h] [rbp-Ch]\nint j; // [rsp+58h] [rbp-8h]\nint k; // [rsp+58h] [rbp-8h]\nint i; // [rsp+5Ch] [rbp-4h]\n\nv11 = 0;\nv10 = sub_49E30B(a1);\nif ( !v10 )\nreturn 0xFFFFFFFFLL;\nv9 = *(unsigned int **)(v10 + 24);\nfor ( i = 0; i < (int)sub_424A4D(*(unsigned int **)(v10 + 40)); ++i )\n{\nv8 = sub_424A6B(*(_QWORD *)(v10 + 40), i);\nif ( !*(_QWORD *)(v8 + 56) )\n{\nfor ( j = 0; j < (int)sub_424A4D(a2); ++j )\n{\nv6 = sub_424A6B((__int64)a2, j);\nif ( !(unsigned int)sub_49F222(v8, v6) )\n{\nsub_49F153(v8, v6);\n++v11;\nbreak;\n}\n}\nif ( !*(_QWORD *)(v8 + 56) && (a3 & 0x10) == 0 )\n{\nfor ( k = 0; k < (int)sub_424A4D(v9); ++k )\n{\nv5 = sub_424A6B((__int64)v9, k);\nif ( !*(_DWORD *)v5 )\n{\nv7 = *(_QWORD *)(v5 + 8);\nif ( !(unsigned int)sub_49F222(v8, v7) )\n{\nsub_49F153(v8, v7);\n++v11;\nbreak;\n}\n}\n}\n}\n}\n}\nreturn v11;\n}\n\n\n\nQ:[a3,a1,a2,v5,v6,v8,v9,v10,sub_49F24B,sub_49E30B,sub_424A4D,sub_424A6B,sub_49F222,sub_49F153,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'flags', 'a1': 'cms', 'a2': 'scerts', 'v5': 'cch', 'v6': 'xa', 'v8': 'si_0', 'v9': 'certs', 'v10': 'sd', 'sub_49F24B': 'CMS_set1_signers_certs', 'sub_49E30B': 'cms_get0_signed', 'sub_424A4D': 'sk_num', 'sub_424A6B': 'sk_value', 'sub_49F222': 'CMS_SignerInfo_cert_cmp', 'sub_49F153': 'CMS_SignerInfo_set1_signer_cert'}"}
gen_phone
41d06854252dfb8c032727bb4e7d892e7ceacfe1eb0315c2ad0607148de08969
dimitri
tpch-citus
NA
static void gen_phone(DSS_HUGE ind, char *target, long seed) { DSS_HUGE acode, exchg, number; RANDOM(acode, 100, 999, seed); RANDOM(exchg, 100, 999, seed); RANDOM(number, 1000, 9999, seed); sprintf(target, "%02d", (int) (10 + (ind % NATIONS_MAX))); sprintf(target + 3, "%03d", (int) acode); sprintf(target + 7, "%03d", (int) exchg); sprintf(target + 11, "%04d", (int) number); target[2] = target[6] = target[10] = '-'; return; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4024C4", "function_addr": 4203716, "binary_name": "41d06854252dfb8c032727bb4e7d892e7ceacfe1eb0315c2ad0607148de08969.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+s], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov rdx, [rbp+var_38]"], [7, "lea rax, [rbp+var_8]"], [8, "mov rcx, rdx"], [9, "mov edx, 3E7h"], [10, "mov esi, 64h "], [11, "mov rdi, rax"], [12, "call sub_406B82"], [13, "mov rdx, [rbp+var_38]"], [14, "lea rax, [rbp+var_10]"], [15, "mov rcx, rdx"], [16, "mov edx, 3E7h"], [17, "mov esi, 64h "], [18, "mov rdi, rax"], [19, "call sub_406B82"], [20, "mov rdx, [rbp+var_38]"], [21, "lea rax, [rbp+var_18]"], [22, "mov rcx, rdx"], [23, "mov edx, 270Fh"], [24, "mov esi, 3E8h"], [25, "mov rdi, rax"], [26, "call sub_406B82"], [27, "mov rcx, [rbp+var_28]"], [28, "mov rdx, 2D82D82D82D82D83h"], [29, "mov rax, rcx"], [30, "imul rdx"], [31, "mov rax, rdx"], [32, "sar rax, 4"], [33, "mov rdx, rcx"], [34, "sar rdx, 3Fh"], [35, "sub rax, rdx"], [36, "imul rdx, rax, 5Ah "], [37, "mov rax, rcx"], [38, "sub rax, rdx"], [39, "add eax, 0Ah"], [40, "mov edx, eax"], [41, "mov rax, [rbp+s]"], [42, "mov esi, offset format"], [43, "mov rdi, rax"], [44, "mov eax, 0"], [45, "call _sprintf"], [46, "mov rax, [rbp+var_8]"], [47, "mov edx, eax"], [48, "mov rax, [rbp+s]"], [49, "add rax, 3"], [50, "mov esi, offset a03d"], [51, "mov rdi, rax"], [52, "mov eax, 0"], [53, "call _sprintf"], [54, "mov rax, [rbp+var_10]"], [55, "mov edx, eax"], [56, "mov rax, [rbp+s]"], [57, "add rax, 7"], [58, "mov esi, offset a03d"], [59, "mov rdi, rax"], [60, "mov eax, 0"], [61, "call _sprintf"], [62, "mov rax, [rbp+var_18]"], [63, "mov edx, eax"], [64, "mov rax, [rbp+s]"], [65, "add rax, 0Bh"], [66, "mov esi, offset a04d"], [67, "mov rdi, rax"], [68, "mov eax, 0"], [69, "call _sprintf"], [70, "mov rax, [rbp+s]"], [71, "lea rdx, [rax+0Ah]"], [72, "mov byte ptr [rdx], 2Dh "], [73, "mov rax, [rbp+s]"], [74, "add rax, 6"], [75, "movzx edx, byte ptr [rdx]"], [76, "mov [rax], dl"], [77, "mov rdx, [rbp+s]"], [78, "add rdx, 2"], [79, "movzx eax, byte ptr [rax]"], [80, "mov [rdx], al"], [81, "nop"], [82, "leave"], [83, "retn"]], "data_dep": [[6, 5], [8, 6], [11, 7], [13, 5], [14, 12], [15, 13], [18, 14], [20, 5], [21, 19], [22, 20], [25, 21], [27, 3], [29, 27], [30, 28], [31, 30], [32, 31], [33, 27], [34, 33], [35, 32], [35, 34], [36, 34], [36, 35], [37, 27], [38, 37], [38, 36], [39, 38], [40, 39], [41, 4], [43, 41], [47, 46], [48, 4], [49, 48], [51, 49], [55, 54], [56, 4], [57, 56], [59, 57], [63, 62], [64, 4], [65, 64], [67, 65], [70, 4], [71, 70], [71, 63], [72, 71], [73, 4], [74, 73], [75, 72], [75, 71], [76, 75], [76, 74], [77, 4], [78, 77], [79, 74], [79, 76], [80, 79], [80, 78], [83, 79]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/41d06854252dfb8c032727bb4e7d892e7ceacfe1eb0315c2ad0607148de08969_41d06854252dfb8c032727bb4e7d892e7ceacfe1eb0315c2ad0607148de08969.jsonl.gz", "strip_func_name": "sub_4024C4", "query": "\n\n\n__int64 __fastcall sub_4024C4(int a1, char *a2, __int64 a3)\n{\n__int64 result; // rax\n__int64 v5; // [rsp+28h] [rbp-18h] BYREF\n__int64 v6; // [rsp+30h] [rbp-10h] BYREF\n__int64 v7; // [rsp+38h] [rbp-8h] BYREF\n\nsub_406B82(&v7, 100LL, 999LL, a3);\nsub_406B82(&v6, 100LL, 999LL, a3);\nsub_406B82(&v5, 1000LL, 9999LL, a3);\nsprintf(a2, \"%02d\", (unsigned int)(a1 % 90 + 10));\nsprintf(a2 + 3, \"%03d\", (unsigned int)v7);\nsprintf(a2 + 7, \"%03d\", (unsigned int)v6);\nsprintf(a2 + 11, \"%04d\", (unsigned int)v5);\na2[10] = 45;\na2[6] = a2[10];\nresult = (unsigned __int8)a2[6];\na2[2] = result;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v5,v6,v7,sub_4024C4,sub_406B82,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'seed', 'a1': 'ind', 'a2': 'target', 'v5': 'number', 'v6': 'exchg', 'v7': 'acode', 'sub_4024C4': 'gen_phone', 'sub_406B82': 'dss_random'}"}
pjsip_endpt_register_module
0dba2efb1fd115cd7387120e076fb705039c22af79b652ae5d8f057ceac37356
asterisk
pjproject-archive
NA
PJ_DEF(pj_status_t) pjsip_endpt_register_module( pjsip_endpoint *endpt, pjsip_module *mod ) { pj_status_t status = PJ_SUCCESS; pjsip_module *m; unsigned i; pj_rwmutex_lock_write(endpt->mod_mutex); /* Make sure that this module has not been registered. */ PJ_ASSERT_ON_FAIL( pj_list_find_node(&endpt->module_list, mod) == NULL, {status = PJ_EEXISTS; goto on_return;}); /* Make sure that no module with the same name has been registered. */ PJ_ASSERT_ON_FAIL( pj_list_search(&endpt->module_list, &mod->name, &cmp_mod_name)==NULL, {status = PJ_EEXISTS; goto on_return; }); /* Find unused ID for this module. */ for (i=0; i<PJ_ARRAY_SIZE(endpt->modules); ++i) { if (endpt->modules[i] == NULL) break; } if (i == PJ_ARRAY_SIZE(endpt->modules)) { pj_assert(!"Too many modules registered!"); status = PJ_ETOOMANY; goto on_return; } /* Assign the ID. */ mod->id = i; /* Try to load the module. */ if (mod->load) { status = (*mod->load)(endpt); if (status != PJ_SUCCESS) goto on_return; } /* Try to start the module. */ if (mod->start) { status = (*mod->start)(); if (status != PJ_SUCCESS) goto on_return; } /* Save the module. */ endpt->modules[i] = mod; /* Put in the module list, sorted by priority. */ m = endpt->module_list.next; while (m != &endpt->module_list) { if (m->priority > mod->priority) break; m = m->next; } pj_list_insert_before(m, mod); /* Done. */ PJ_LOG(4,(THIS_FILE, "Module \"%.*s\" registered", (int)mod->name.slen, mod->name.ptr)); on_return: pj_rwmutex_unlock_write(endpt->mod_mutex); return status; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41093E", "function_addr": 4262206, "binary_name": "0dba2efb1fd115cd7387120e076fb705039c22af79b652ae5d8f057ceac37356.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_4], 0"], [6, "mov rax, [rbp+var_28]"], [7, "mov rax, [rax+50h]"], [8, "mov rdi, rax"], [9, "call sub_45CB6E"], [10, "mov rax, [rbp+var_28]"], [11, "lea rdx, [rax+158h]"], [12, "mov rax, [rbp+var_30]"], [13, "mov rsi, rax"], [14, "mov rdi, rdx"], [15, "call sub_462E19"], [16, "test rax, rax"], [17, "jz short loc_41099D"], [18, "mov ecx, offset aPjsipEndptRegi"], [19, "mov edx, 0AAh"], [20, "mov esi, offset aSrcPjsipSipEnd"], [21, "mov edi, offset aPjListFindNode"], [22, "call ___assert_fail"], [23, "mov rax, [rbp+var_28]"], [24, "lea rdx, [rax+158h]"], [25, "mov rax, [rbp+var_30]"], [26, "mov rsi, rax"], [27, "mov rdi, rdx"], [28, "call sub_462E19"], [29, "test rax, rax"], [30, "jz short loc_4109C8"], [31, "mov [rbp+var_4], 1117Fh"], [32, "jmp loc_410B81"], [33, "mov rax, [rbp+var_30]"], [34, "lea rcx, [rax+10h]"], [35, "mov rax, [rbp+var_28]"], [36, "add rax, 158h"], [37, "mov edx, offset sub_410915"], [38, "mov rsi, rcx"], [39, "mov rdi, rax"], [40, "call sub_462E6A"], [41, "test rax, rax"], [42, "jz short loc_410A08"], [43, "mov ecx, offset aPjsipEndptRegi"], [44, "mov edx, 0AEh"], [45, "mov esi, offset aSrcPjsipSipEnd"], [46, "mov edi, offset aPjListSearchEn"], [47, "call ___assert_fail"], [48, "mov rax, [rbp+var_30]"], [49, "lea rcx, [rax+10h]"], [50, "mov rax, [rbp+var_28]"], [51, "add rax, 158h"], [52, "mov edx, offset sub_410915"], [53, "mov rsi, rcx"], [54, "mov rdi, rax"], [55, "call sub_462E6A"], [56, "test rax, rax"], [57, "jz short loc_410A3B"], [58, "mov [rbp+var_4], 1117Fh"], [59, "jmp loc_410B81"], [60, "mov [rbp+var_14], 0"], [61, "jmp short loc_410A5D"], [62, "mov rax, [rbp+var_28]"], [63, "mov edx, [rbp+var_14]"], [64, "add rdx, 0Ah"], [65, "mov rax, [rax+rdx*8+8]"], [66, "test rax, rax"], [67, "jz short loc_410A65"], [68, "add [rbp+var_14], 1"], [69, "cmp [rbp+var_14], 1Fh"], [70, "jbe short loc_410A44"], [71, "jmp short loc_410A66"], [72, "nop"], [73, "cmp [rbp+var_14], 20h "], [74, "jnz short loc_410A85"], [75, "mov ecx, offset aPjsipEndptRegi"], [76, "mov edx, 0B8h"], [77, "mov esi, offset aSrcPjsipSipEnd"], [78, "mov edi, offset aTooManyModules"], [79, "call ___assert_fail"], [80, "mov edx, [rbp+var_14]"], [81, "mov rax, [rbp+var_30]"], [82, "mov [rax+20h], edx"], [83, "mov rax, [rbp+var_30]"], [84, "mov rax, [rax+28h]"], [85, "test rax, rax"], [86, "jz short loc_410ABA"], [87, "mov rax, [rbp+var_30]"], [88, "mov rdx, [rax+28h]"], [89, "mov rax, [rbp+var_28]"], [90, "mov rdi, rax"], [91, "call rdx"], [92, "mov [rbp+var_4], eax"], [93, "cmp [rbp+var_4], 0"], [94, "jnz loc_410B7A"], [95, "mov rax, [rbp+var_30]"], [96, "mov rax, [rax+30h]"], [97, "test rax, rax"], [98, "jz short loc_410ADE"], [99, "mov rax, [rbp+var_30]"], [100, "mov rax, [rax+30h]"], [101, "call rax"], [102, "mov [rbp+var_4], eax"], [103, "cmp [rbp+var_4], 0"], [104, "jnz loc_410B7D"], [105, "mov rax, [rbp+var_28]"], [106, "mov edx, [rbp+var_14]"], [107, "lea rcx, [rdx+0Ah]"], [108, "mov rdx, [rbp+var_30]"], [109, "mov [rax+rcx*8+8], rdx"], [110, "mov rax, [rbp+var_28]"], [111, "mov rax, [rax+160h]"], [112, "mov [rbp+var_10], rax"], [113, "jmp short loc_410B21"], [114, "mov rax, [rbp+var_10]"], [115, "mov edx, [rax+24h]"], [116, "mov rax, [rbp+var_30]"], [117, "mov eax, [rax+24h]"], [118, "cmp edx, eax"], [119, "jg short loc_410B33"], [120, "mov rax, [rbp+var_10]"], [121, "mov rax, [rax+8]"], [122, "mov [rbp+var_10], rax"], [123, "mov rax, [rbp+var_28]"], [124, "add rax, 158h"], [125, "cmp [rbp+var_10], rax"], [126, "jnz short loc_410B03"], [127, "jmp short loc_410B34"], [128, "nop"], [129, "mov rdx, [rbp+var_30]"], [130, "mov rax, [rbp+var_10]"], [131, "mov rsi, rdx"], [132, "mov rdi, rax"], [133, "call sub_462C83"], [134, "call sub_464190"], [135, "cmp eax, 3"], [136, "jle short loc_410B80"], [137, "mov rax, [rbp+var_30]"], [138, "mov rax, [rax+10h]"], [139, "mov rdx, [rbp+var_30]"], [140, "mov rdx, [rdx+18h]"], [141, "mov rcx, rax"], [142, "mov esi, offset aModuleSRegiste"], [143, "mov edi, offset aSipEndpointC"], [144, "mov eax, 0"], [145, "call sub_464B04"], [146, "jmp short loc_410B81"], [147, "nop"], [148, "jmp short loc_410B81"], [149, "nop"], [150, "jmp short loc_410B81"], [151, "nop"], [152, "mov rax, [rbp+var_28]"], [153, "mov rax, [rax+50h]"], [154, "mov rdi, rax"], [155, "call sub_45CBC7"], [156, "mov eax, [rbp+var_4]"], [157, "leave"], [158, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [10, 3], [11, 10], [12, 4], [13, 12], [14, 11], [16, 15], [17, 16], [23, 3], [24, 23], [24, 11], [25, 4], [26, 25], [27, 24], [29, 28], [30, 29], [33, 4], [34, 33], [35, 3], [36, 35], [38, 34], [39, 36], [41, 40], [42, 41], [48, 4], [49, 48], [49, 34], [50, 3], [51, 50], [53, 49], [54, 51], [56, 55], [57, 56], [62, 3], [63, 60], [63, 68], [64, 63], [65, 62], [66, 65], [67, 66], [68, 68], [68, 60], [69, 60], [69, 68], [70, 69], [73, 60], [73, 68], [74, 73], [80, 60], [80, 68], [81, 4], [82, 81], [82, 80], [83, 4], [84, 83], [84, 82], [85, 84], [86, 85], [87, 4], [88, 87], [88, 82], [89, 3], [90, 89], [91, 88], [92, 91], [93, 92], [94, 93], [95, 4], [96, 95], [96, 82], [97, 96], [98, 97], [99, 4], [100, 82], [100, 99], [101, 100], [102, 101], [103, 102], [104, 103], [105, 3], [106, 68], [106, 60], [107, 49], [107, 106], [107, 82], [107, 109], [108, 4], [109, 108], [109, 105], [110, 3], [111, 110], [111, 109], [112, 111], [114, 122], [114, 112], [115, 82], [115, 114], [115, 109], [116, 4], [117, 82], [117, 116], [117, 109], [118, 115], [118, 117], [119, 118], [120, 122], [120, 112], [121, 82], [121, 109], [121, 120], [122, 121], [123, 3], [124, 123], [125, 112], [125, 122], [125, 124], [126, 125], [129, 4], [130, 112], [130, 122], [131, 129], [132, 130], [135, 134], [136, 135], [137, 4], [138, 137], [138, 82], [138, 109], [139, 4], [140, 82], [140, 139], [140, 109], [141, 138], [152, 3], [153, 82], [153, 152], [153, 109], [154, 153], [156, 5], [156, 92], [156, 102], [156, 31], [156, 58], [158, 156]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0dba2efb1fd115cd7387120e076fb705039c22af79b652ae5d8f057ceac37356_0dba2efb1fd115cd7387120e076fb705039c22af79b652ae5d8f057ceac37356.jsonl.gz", "strip_func_name": "sub_41093E", "query": "\n\n\n__int64 __fastcall sub_41093E(__int64 a1, __int64 a2)\n{\nint v2; // er8\nint v3; // er9\nunsigned int i; // [rsp+1Ch] [rbp-14h]\n__int64 j; // [rsp+20h] [rbp-10h]\nunsigned int v7; // [rsp+2Ch] [rbp-4h]\n\nv7 = 0;\nsub_45CB6E(*(_QWORD *)(a1 + 80));\nif ( sub_462E19(a1 + 344, a2) )\n__assert_fail(\n\"pj_list_find_node(&endpt->module_list, mod) == ((void *)0)\",\n\"../src/pjsip/sip_endpoint.c\",\n0xAAu,\n\"pjsip_endpt_register_module\");\nif ( sub_462E19(a1 + 344, a2) )\n{\nv7 = 70015;\n}\nelse\n{\nif ( sub_462E6A(a1 + 344, a2 + 16, sub_410915) )\n__assert_fail(\n\"pj_list_search(&endpt->module_list, &mod->name, &cmp_mod_name)==((void *)0)\",\n\"../src/pjsip/sip_endpoint.c\",\n0xAEu,\n\"pjsip_endpt_register_module\");\nif ( sub_462E6A(a1 + 344, a2 + 16, sub_410915) )\n{\nv7 = 70015;\n}\nelse\n{\nfor ( i = 0; i <= 0x1F && *(_QWORD *)(a1 + 8 * (i + 10LL) + 8); ++i )\n;\nif ( i == 32 )\n__assert_fail(\n\"!\\\"Too many modules registered!\\\"\",\n\"../src/pjsip/sip_endpoint.c\",\n0xB8u,\n\"pjsip_endpt_register_module\");\n*(_DWORD *)(a2 + 32) = i;\nif ( (!*(_QWORD *)(a2 + 40) || (v7 = (*(__int64 (__fastcall **)(__int64))(a2 + 40))(a1)) == 0)\n&& (!*(_QWORD *)(a2 + 48) || (v7 = (*(__int64 (**)(void))(a2 + 48))()) == 0) )\n{\n*(_QWORD *)(a1 + 8 * (i + 10LL) + 8) = a2;\nfor ( j = *(_QWORD *)(a1 + 352);\nj != a1 + 344 && *(_DWORD *)(j + 36) <= *(_DWORD *)(a2 + 36);\nj = *(_QWORD *)(j + 8) )\n{\n;\n}\nsub_462C83(j, a2);\nif ( (int)sub_464190() > 3 )\nsub_464B04(\n(unsigned int)\"sip_endpoint.c\",\n(unsigned int)\"Module \\\"%.*s\\\" registered\",\n*(_QWORD *)(a2 + 24),\n*(_QWORD *)(a2 + 16),\nv2,\nv3,\na2);\n}\n}\n}\nsub_45CBC7(*(_QWORD *)(a1 + 80));\nreturn v7;\n}\n\n\n\nQ:[a1,a2,j,v7,sub_41093E,sub_45CB6E,sub_462E19,sub_462E6A,sub_410915,sub_462C83,sub_464190,sub_464B04,sub_45CBC7,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'endpt', 'a2': 'mod', 'j': 'm', 'v7': 'status', 'sub_41093E': 'pjsip_endpt_register_module', 'sub_45CB6E': 'pj_rwmutex_lock_write', 'sub_462E19': 'pj_list_find_node', 'sub_462E6A': 'pj_list_search', 'sub_410915': 'cmp_mod_name', 'sub_462C83': 'pj_list_insert_before', 'sub_464190': 'pj_log_get_level', 'sub_464B04': 'pj_log_4', 'sub_45CBC7': 'pj_rwmutex_unlock_write'}"}
od_bexp64
e3d332886c18631eb372d9962b58e0dd7b335903e6edf0cd135d1e37ebbfa91b
xiph
daala
NA
static int64_t od_bexp64(int64_t logq57) { int64_t w; int64_t z; int ipart; ipart = (int)(logq57 >> 57); if (ipart < 0) return 0; if (ipart >= 63) return 0x7FFFFFFFFFFFFFFFLL; z = logq57 - OD_Q57(ipart); if (z) { int64_t mask; long wlo; int i; /*C doesn't give us 64x64->128 muls, so we use CORDIC. This is not particularly fast, but it's not being used in time-critical code; it is very accurate.*/ /*z is the fractional part of the log in Q62 format. We need 1 bit of headroom since the magnitude can get larger than 1 during the iteration, and a sign bit.*/ z <<= 5; /*w is the exponential in Q61 format (since it also needs headroom and can get as large as 2.0); we could get another bit if we dropped the sign, but we'll recover that bit later anyway. Ideally this should start out as \lim_{n->\infty} 2^{61}/\product_{i=1}^n \sqrt{1-2^{-2i}} but in order to guarantee convergence we have to repeat iterations 4, 13 (=3*4+1), and 40 (=3*13+1, etc.), so it winds up somewhat larger.*/ w = 0x26A3D0E401DD846DLL; for (i = 0;; i++) { mask = -(z < 0); w += ((w >> (i + 1)) + mask) ^ mask; z -= (OD_ATANH_LOG2[i] + mask) ^ mask; /*Repeat iteration 4.*/ if (i >= 3) break; z *= 2; } for (;; i++) { mask = -(z < 0); w += ((w >> (i + 1)) + mask) ^ mask; z -= (OD_ATANH_LOG2[i] + mask) ^ mask; /*Repeat iteration 13.*/ if (i >= 12) break; z *= 2; } for (; i < 32; i++) { mask = -(z < 0); w += ((w >> (i + 1)) + mask) ^ mask; z = (z - ((OD_ATANH_LOG2[i] + mask) ^ mask))*2; } wlo = 0; /*Skip the remaining iterations unless we really require that much precision. We could have bailed out earlier for smaller iparts, but that would require initializing w from a table, as the limit doesn't converge to 61-bit precision until n=30.*/ if (ipart > 30) { /*For these iterations, we just update the low bits, as the high bits can't possibly be affected. OD_ATANH_LOG2 has also converged (it actually did so one iteration earlier, but that's no reason for an extra special case).*/ for (;; i++) { mask = -(z < 0); wlo += ((w >> i) + mask) ^ mask; z -= (OD_ATANH_LOG2[31] + mask) ^ mask; /*Repeat iteration 40.*/ if (i >= 39) break; z <<= 1; } for (; i<61; i++) { mask = -(z < 0); wlo += ((w >> i) + mask) ^ mask; z = (z - ((OD_ATANH_LOG2[31] + mask) ^ mask)) << 1; } } w = (w << 1) + wlo; } else { w = (int64_t)1 << 62; } if (ipart < 62) { w = ((w >> (61 - ipart)) + 1) >> 1; } return w; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_424370", "function_addr": 4342640, "binary_name": "e3d332886c18631eb372d9962b58e0dd7b335903e6edf0cd135d1e37ebbfa91b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_38], rdi"], [3, "mov rax, [rbp+var_38]"], [4, "sar rax, 39h"], [5, "mov [rbp+var_20], eax"], [6, "cmp [rbp+var_20], 0"], [7, "jns short loc_424393"], [8, "mov eax, 0"], [9, "jmp loc_42463E"], [10, "cmp [rbp+var_20], 3Eh "], [11, "jle short loc_4243A8"], [12, "mov rax, 7FFFFFFFFFFFFFFFh"], [13, "jmp loc_42463E"], [14, "mov eax, [rbp+var_20]"], [15, "cdqe"], [16, "shl rax, 39h"], [17, "mov rdx, rax"], [18, "mov rax, [rbp+var_38]"], [19, "sub rax, rdx"], [20, "mov [rbp+var_10], rax"], [21, "cmp [rbp+var_10], 0"], [22, "jz loc_424607"], [23, "shl [rbp+var_10], 5"], [24, "mov rax, 26A3D0E401DD846Dh"], [25, "mov [rbp+var_8], rax"], [26, "mov [rbp+var_1C], 0"], [27, "mov rax, [rbp+var_10]"], [28, "shr rax, 3Fh"], [29, "movzx eax, al"], [30, "neg eax"], [31, "cdqe"], [32, "mov [rbp+var_28], rax"], [33, "mov eax, [rbp+var_1C]"], [34, "add eax, 1"], [35, "mov rdx, [rbp+var_8]"], [36, "mov ecx, eax"], [37, "sar rdx, cl"], [38, "mov rax, [rbp+var_28]"], [39, "add rax, rdx"], [40, "xor rax, [rbp+var_28]"], [41, "add [rbp+var_8], rax"], [42, "mov eax, [rbp+var_1C]"], [43, "cdqe"], [44, "lea rdx, ds:0[rax*8]"], [45, "lea rax, unk_466A80"], [46, "mov rdx, [rdx+rax]"], [47, "mov rax, [rbp+var_28]"], [48, "add rax, rdx"], [49, "xor rax, [rbp+var_28]"], [50, "sub [rbp+var_10], rax"], [51, "cmp [rbp+var_1C], 2"], [52, "jle short loc_424444"], [53, "jmp short loc_42444E"], [54, "shl [rbp+var_10], 1"], [55, "add [rbp+var_1C], 1"], [56, "jmp short loc_4243E4"], [57, "mov rax, [rbp+var_10]"], [58, "shr rax, 3Fh"], [59, "movzx eax, al"], [60, "neg eax"], [61, "cdqe"], [62, "mov [rbp+var_28], rax"], [63, "mov eax, [rbp+var_1C]"], [64, "add eax, 1"], [65, "mov rdx, [rbp+var_8]"], [66, "mov ecx, eax"], [67, "sar rdx, cl"], [68, "mov rax, [rbp+var_28]"], [69, "add rax, rdx"], [70, "xor rax, [rbp+var_28]"], [71, "add [rbp+var_8], rax"], [72, "mov eax, [rbp+var_1C]"], [73, "cdqe"], [74, "lea rdx, ds:0[rax*8]"], [75, "lea rax, unk_466A80"], [76, "mov rdx, [rdx+rax]"], [77, "mov rax, [rbp+var_28]"], [78, "add rax, rdx"], [79, "xor rax, [rbp+var_28]"], [80, "sub [rbp+var_10], rax"], [81, "cmp [rbp+var_1C], 0Bh"], [82, "jg short loc_4244B6"], [83, "shl [rbp+var_10], 1"], [84, "add [rbp+var_1C], 1"], [85, "jmp short loc_42444E"], [86, "nop"], [87, "jmp short loc_424522"], [88, "mov rax, [rbp+var_10]"], [89, "shr rax, 3Fh"], [90, "movzx eax, al"], [91, "neg eax"], [92, "cdqe"], [93, "mov [rbp+var_28], rax"], [94, "mov eax, [rbp+var_1C]"], [95, "add eax, 1"], [96, "mov rdx, [rbp+var_8]"], [97, "mov ecx, eax"], [98, "sar rdx, cl"], [99, "mov rax, [rbp+var_28]"], [100, "add rax, rdx"], [101, "xor rax, [rbp+var_28]"], [102, "add [rbp+var_8], rax"], [103, "mov eax, [rbp+var_1C]"], [104, "cdqe"], [105, "lea rdx, ds:0[rax*8]"], [106, "lea rax, unk_466A80"], [107, "mov rdx, [rdx+rax]"], [108, "mov rax, [rbp+var_28]"], [109, "add rax, rdx"], [110, "xor rax, [rbp+var_28]"], [111, "mov rdx, rax"], [112, "mov rax, [rbp+var_10]"], [113, "sub rax, rdx"], [114, "add rax, rax"], [115, "mov [rbp+var_10], rax"], [116, "add [rbp+var_1C], 1"], [117, "cmp [rbp+var_1C], 1Fh"], [118, "jle short loc_4244B9"], [119, "mov [rbp+var_18], 0"], [120, "cmp [rbp+var_20], 1Eh"], [121, "jle loc_4245F2"], [122, "mov rax, [rbp+var_10]"], [123, "shr rax, 3Fh"], [124, "movzx eax, al"], [125, "neg eax"], [126, "cdqe"], [127, "mov [rbp+var_28], rax"], [128, "mov eax, [rbp+var_1C]"], [129, "mov rdx, [rbp+var_8]"], [130, "mov ecx, eax"], [131, "sar rdx, cl"], [132, "mov rax, [rbp+var_28]"], [133, "add rax, rdx"], [134, "xor rax, [rbp+var_28]"], [135, "add [rbp+var_18], rax"], [136, "mov rdx, 2E2A8ECA5705FC2Fh"], [137, "mov rax, [rbp+var_28]"], [138, "add rax, rdx"], [139, "xor rax, [rbp+var_28]"], [140, "sub [rbp+var_10], rax"], [141, "cmp [rbp+var_1C], 26h "], [142, "jg short loc_424591"], [143, "shl [rbp+var_10], 1"], [144, "add [rbp+var_1C], 1"], [145, "jmp short loc_42453A"], [146, "nop"], [147, "jmp short loc_4245EC"], [148, "mov rax, [rbp+var_10]"], [149, "shr rax, 3Fh"], [150, "movzx eax, al"], [151, "neg eax"], [152, "cdqe"], [153, "mov [rbp+var_28], rax"], [154, "mov eax, [rbp+var_1C]"], [155, "mov rdx, [rbp+var_8]"], [156, "mov ecx, eax"], [157, "sar rdx, cl"], [158, "mov rax, [rbp+var_28]"], [159, "add rax, rdx"], [160, "xor rax, [rbp+var_28]"], [161, "add [rbp+var_18], rax"], [162, "mov rdx, 2E2A8ECA5705FC2Fh"], [163, "mov rax, [rbp+var_28]"], [164, "add rax, rdx"], [165, "xor rax, [rbp+var_28]"], [166, "mov rdx, rax"], [167, "mov rax, [rbp+var_10]"], [168, "sub rax, rdx"], [169, "add rax, rax"], [170, "mov [rbp+var_10], rax"], [171, "add [rbp+var_1C], 1"], [172, "cmp [rbp+var_1C], 3Ch "], [173, "jle short loc_424594"], [174, "mov rax, [rbp+var_8]"], [175, "lea rdx, [rax+rax]"], [176, "mov rax, [rbp+var_18]"], [177, "add rax, rdx"], [178, "mov [rbp+var_8], rax"], [179, "jmp short loc_424615"], [180, "mov rax, 4000000000000000h"], [181, "mov [rbp+var_8], rax"], [182, "cmp [rbp+var_20], 3Dh "], [183, "jg short loc_42463A"], [184, "mov eax, 3Dh "], [185, "sub eax, [rbp+var_20]"], [186, "mov rdx, [rbp+var_8]"], [187, "mov ecx, eax"], [188, "sar rdx, cl"], [189, "mov rax, rdx"], [190, "add rax, 1"], [191, "sar rax, 1"], [192, "mov [rbp+var_8], rax"], [193, "mov rax, [rbp+var_8]"], [194, "pop rbp"], [195, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [10, 5], [11, 10], [14, 5], [16, 14], [17, 16], [18, 2], [19, 18], [19, 17], [20, 19], [21, 20], [22, 21], [23, 20], [25, 24], [27, 54], [27, 23], [28, 27], [29, 28], [30, 29], [32, 30], [33, 26], [33, 55], [34, 33], [35, 25], [35, 41], [36, 34], [37, 35], [37, 36], [38, 32], [39, 37], [39, 38], [40, 32], [40, 39], [41, 40], [41, 25], [41, 41], [42, 26], [42, 55], [44, 37], [45, 42], [46, 45], [47, 32], [48, 47], [48, 46], [49, 48], [49, 32], [50, 54], [50, 49], [50, 23], [51, 26], [51, 55], [52, 51], [54, 50], [55, 26], [55, 55], [57, 50], [57, 83], [58, 57], [59, 58], [60, 59], [62, 60], [63, 84], [63, 26], [63, 55], [64, 63], [65, 41], [65, 71], [66, 64], [67, 65], [67, 66], [68, 62], [69, 67], [69, 68], [70, 69], [70, 62], [71, 71], [71, 41], [71, 70], [72, 84], [72, 26], [72, 55], [74, 67], [75, 72], [76, 75], [77, 62], [78, 77], [78, 76], [79, 78], [79, 62], [80, 83], [80, 50], [80, 79], [81, 84], [81, 26], [81, 55], [82, 81], [83, 80], [84, 84], [84, 26], [84, 55], [88, 115], [88, 80], [89, 88], [90, 89], [91, 90], [93, 91], [94, 55], [94, 84], [94, 116], [94, 26], [95, 94], [96, 71], [96, 102], [97, 95], [98, 96], [98, 97], [99, 93], [100, 98], [100, 99], [101, 93], [101, 100], [102, 71], [102, 102], [102, 101], [103, 26], [103, 55], [103, 84], [103, 116], [105, 98], [106, 103], [107, 106], [108, 93], [109, 108], [109, 107], [110, 93], [110, 109], [111, 110], [112, 115], [112, 80], [113, 112], [113, 111], [114, 113], [115, 114], [116, 116], [116, 26], [116, 55], [116, 84], [117, 26], [117, 55], [117, 84], [117, 116], [118, 117], [120, 5], [121, 120], [122, 115], [122, 80], [122, 143], [123, 122], [124, 123], [125, 124], [127, 125], [128, 26], [128, 55], [128, 144], [128, 84], [128, 116], [129, 102], [129, 71], [130, 128], [131, 129], [131, 130], [132, 127], [133, 132], [133, 131], [134, 133], [134, 127], [135, 119], [135, 135], [135, 134], [137, 127], [138, 137], [138, 136], [139, 127], [139, 138], [140, 139], [140, 143], [140, 115], [140, 80], [141, 26], [141, 55], [141, 144], [141, 84], [141, 116], [142, 141], [143, 140], [144, 116], [144, 26], [144, 55], [144, 144], [144, 84], [148, 140], [148, 170], [149, 148], [150, 149], [151, 150], [153, 151], [154, 26], [154, 55], [154, 144], [154, 171], [154, 84], [154, 116], [155, 71], [155, 102], [156, 154], [157, 155], [157, 156], [158, 153], [159, 157], [159, 158], [160, 153], [160, 159], [161, 161], [161, 160], [161, 135], [163, 153], [164, 162], [164, 163], [165, 153], [165, 164], [166, 165], [167, 140], [167, 170], [168, 166], [168, 167], [169, 168], [170, 169], [171, 116], [171, 26], [171, 55], [171, 144], [171, 171], [171, 84], [172, 84], [172, 116], [172, 171], [172, 26], [172, 55], [172, 144], [173, 172], [174, 102], [174, 71], [175, 174], [175, 76], [175, 136], [175, 166], [175, 111], [176, 135], [176, 161], [176, 119], [177, 176], [177, 175], [178, 177], [181, 180], [182, 5], [183, 182], [185, 184], [185, 5], [186, 181], [186, 178], [187, 185], [188, 187], [188, 186], [189, 188], [190, 189], [191, 190], [192, 191], [193, 181], [193, 192], [193, 178], [194, 0], [195, 8], [195, 193], [195, 12]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/e3d332886c18631eb372d9962b58e0dd7b335903e6edf0cd135d1e37ebbfa91b_e3d332886c18631eb372d9962b58e0dd7b335903e6edf0cd135d1e37ebbfa91b.jsonl.gz", "strip_func_name": "sub_424370", "query": "\n\n\n__int64 __fastcall sub_424370(__int64 a1)\n{\n__int64 v2; // rdx\n__int64 v3; // [rsp+10h] [rbp-28h]\n__int64 v4; // [rsp+10h] [rbp-28h]\n__int64 v5; // [rsp+10h] [rbp-28h]\n__int64 v6; // [rsp+10h] [rbp-28h]\n__int64 v7; // [rsp+10h] [rbp-28h]\nint v8; // [rsp+18h] [rbp-20h]\nint i; // [rsp+1Ch] [rbp-1Ch]\n__int64 v10; // [rsp+20h] [rbp-18h]\n__int64 v11; // [rsp+28h] [rbp-10h]\n__int64 v12; // [rsp+28h] [rbp-10h]\n__int64 v13; // [rsp+28h] [rbp-10h]\n__int64 v14; // [rsp+28h] [rbp-10h]\n__int64 v15; // [rsp+30h] [rbp-8h]\n__int64 v16; // [rsp+30h] [rbp-8h]\n\nv8 = a1 >> 57;\nif ( v8 < 0 )\nreturn 0LL;\nif ( v8 > 62 )\nreturn 0x7FFFFFFFFFFFFFFFLL;\nv2 = (__int64)v8 << 57;\nif ( a1 == v2 )\n{\nv16 = 0x4000000000000000LL;\n}\nelse\n{\nv11 = 32 * (a1 - v2);\nv15 = 0x26A3D0E401DD846DLL;\nfor ( i = 0; ; ++i )\n{\nv3 = -(v11 < 0);\nv15 += v3 ^ ((v15 >> ((unsigned __int8)i + 1)) + v3);\nv12 = v11 - (v3 ^ (qword_466A80[i] + v3));\nif ( i > 2 )\nbreak;\nv11 = 2 * v12;\n}\nwhile ( 1 )\n{\nv4 = -(v12 < 0);\nv15 += v4 ^ ((v15 >> ((unsigned __int8)i + 1)) + v4);\nv13 = v12 - (v4 ^ (qword_466A80[i] + v4));\nif ( i > 11 )\nbreak;\nv12 = 2 * v13;\n++i;\n}\nwhile ( i <= 31 )\n{\nv5 = -(v13 < 0);\nv15 += v5 ^ ((v15 >> ((unsigned __int8)i + 1)) + v5);\nv13 = 2 * (v13 - (v5 ^ (qword_466A80[i++] + v5)));\n}\nv10 = 0LL;\nif ( v8 > 30 )\n{\nwhile ( 1 )\n{\nv6 = -(v13 < 0);\nv10 += v6 ^ ((v15 >> i) + v6);\nv14 = v13 - (v6 ^ (v6 + 0x2E2A8ECA5705FC2FLL));\nif ( i > 38 )\nbreak;\nv13 = 2 * v14;\n++i;\n}\nwhile ( i <= 60 )\n{\nv7 = -(v14 < 0);\nv10 += v7 ^ ((v15 >> i) + v7);\nv14 = 2 * (v14 - (v7 ^ (v7 + 0x2E2A8ECA5705FC2FLL)));\n++i;\n}\n}\nv16 = 2 * v15 + v10;\n}\nif ( v8 <= 61 )\nv16 = ((v16 >> (61 - (unsigned __int8)v8)) + 1) >> 1;\nreturn v16;\n}\n\n\n\nQ:[a1,v5,v8,v10,v12,v15,sub_424370,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'logq57', 'v5': 'mask', 'v8': 'ipart', 'v10': 'wlo', 'v12': 'za', 'v15': 'w', 'sub_424370': 'od_bexp64'}"}
myencode
0d2339a86c5360b2903e326cf96aff1bba53a83010193cb8a761753fe9d96bbe
RedoXyde
nabgcc
NA
int32_t myencode(int16_t pcm16) { int32_t step,diff; int32_t predicedValue = PredictedValue; int32_t stepIndex = StepIndex; int32_t delta = pcm16-predicedValue; uint32_t value; if(delta>=0) value = 0; else { value = 8; delta = -delta; } step = IMA_ADPCMStepTable[stepIndex]; diff = step>>3; if(delta>step) { value |= 4; delta -= step; diff += step; } step >>= 1; if(delta>step) { value |= 2; delta -= step; diff += step; } step >>= 1; if(delta>step) { value |= 1; diff += step; } if(value&8) predicedValue -= diff; else predicedValue += diff; if(predicedValue<-0x8000) predicedValue = -0x8000; else if(predicedValue>0x7fff) predicedValue = 0x7fff; PredictedValue = predicedValue; stepIndex += IMA_ADPCMIndexTable[value&7]; if(stepIndex<0) stepIndex = 0; else if(stepIndex>88) stepIndex = 88; StepIndex = stepIndex; return value&15; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_409A81", "function_addr": 4233857, "binary_name": "0d2339a86c5360b2903e326cf96aff1bba53a83010193cb8a761753fe9d96bbe.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, edi"], [3, "mov [rbp+var_24], ax"], [4, "movzx eax, cs:word_4EB648"], [5, "cwde"], [6, "mov [rbp+var_8], eax"], [7, "movzx eax, cs:byte_4EB64A"], [8, "movzx eax, al"], [9, "mov [rbp+var_C], eax"], [10, "movsx eax, [rbp+var_24]"], [11, "sub eax, [rbp+var_8]"], [12, "mov [rbp+var_10], eax"], [13, "cmp [rbp+var_10], 0"], [14, "js short loc_409ABC"], [15, "mov [rbp+var_14], 0"], [16, "jmp short loc_409AC6"], [17, "mov [rbp+var_14], 8"], [18, "neg [rbp+var_10]"], [19, "mov eax, [rbp+var_C]"], [20, "cdqe"], [21, "movzx eax, ds:word_412BE0[rax+rax]"], [22, "movzx eax, ax"], [23, "mov [rbp+var_18], eax"], [24, "mov eax, [rbp+var_18]"], [25, "sar eax, 3"], [26, "mov [rbp+var_4], eax"], [27, "mov eax, [rbp+var_10]"], [28, "cmp eax, [rbp+var_18]"], [29, "jle short loc_409AFA"], [30, "or [rbp+var_14], 4"], [31, "mov eax, [rbp+var_18]"], [32, "sub [rbp+var_10], eax"], [33, "mov eax, [rbp+var_18]"], [34, "add [rbp+var_4], eax"], [35, "sar [rbp+var_18], 1"], [36, "mov eax, [rbp+var_10]"], [37, "cmp eax, [rbp+var_18]"], [38, "jle short loc_409B15"], [39, "or [rbp+var_14], 2"], [40, "mov eax, [rbp+var_18]"], [41, "sub [rbp+var_10], eax"], [42, "mov eax, [rbp+var_18]"], [43, "add [rbp+var_4], eax"], [44, "sar [rbp+var_18], 1"], [45, "mov eax, [rbp+var_10]"], [46, "cmp eax, [rbp+var_18]"], [47, "jle short loc_409B2A"], [48, "or [rbp+var_14], 1"], [49, "mov eax, [rbp+var_18]"], [50, "add [rbp+var_4], eax"], [51, "mov eax, [rbp+var_14]"], [52, "and eax, 8"], [53, "test eax, eax"], [54, "jz short loc_409B3C"], [55, "mov eax, [rbp+var_4]"], [56, "sub [rbp+var_8], eax"], [57, "jmp short loc_409B42"], [58, "mov eax, [rbp+var_4]"], [59, "add [rbp+var_8], eax"], [60, "cmp [rbp+var_8], 0FFFF8000h"], [61, "jge short loc_409B54"], [62, "mov [rbp+var_8], 0FFFF8000h"], [63, "jmp short loc_409B64"], [64, "cmp [rbp+var_8], 7FFFh"], [65, "jle short loc_409B64"], [66, "mov [rbp+var_8], 7FFFh"], [67, "mov eax, [rbp+var_8]"], [68, "mov cs:word_4EB648, ax"], [69, "mov eax, [rbp+var_14]"], [70, "and eax, 7"], [71, "mov eax, eax"], [72, "mov eax, ds:dword_412CA0[rax*4]"], [73, "add [rbp+var_C], eax"], [74, "cmp [rbp+var_C], 0"], [75, "jns short loc_409B8F"], [76, "mov [rbp+var_C], 0"], [77, "jmp short loc_409B9C"], [78, "cmp [rbp+var_C], 58h "], [79, "jle short loc_409B9C"], [80, "mov [rbp+var_C], 58h "], [81, "mov eax, [rbp+var_C]"], [82, "mov cs:byte_4EB64A, al"], [83, "mov eax, [rbp+var_14]"], [84, "and eax, 0Fh"], [85, "pop rbp"], [86, "retn"]], "data_dep": [[3, 2], [6, 4], [8, 7], [9, 8], [10, 3], [11, 6], [11, 10], [12, 11], [13, 12], [14, 13], [18, 12], [19, 9], [22, 21], [23, 22], [24, 23], [25, 24], [26, 25], [27, 12], [27, 18], [28, 23], [28, 27], [29, 28], [30, 15], [30, 17], [31, 23], [32, 12], [32, 18], [32, 31], [33, 23], [34, 33], [34, 26], [35, 23], [36, 18], [36, 12], [36, 32], [37, 35], [37, 36], [38, 37], [39, 17], [39, 30], [39, 15], [40, 35], [41, 40], [41, 12], [41, 32], [41, 18], [42, 35], [43, 34], [43, 42], [43, 26], [44, 35], [45, 12], [45, 32], [45, 18], [45, 41], [46, 45], [46, 44], [47, 46], [48, 15], [48, 17], [48, 30], [48, 39], [49, 44], [50, 49], [50, 26], [50, 34], [50, 43], [51, 15], [51, 17], [51, 30], [51, 39], [51, 48], [52, 51], [53, 52], [54, 53], [55, 50], [55, 43], [55, 26], [55, 34], [56, 55], [56, 6], [58, 26], [58, 34], [58, 50], [58, 43], [59, 6], [59, 58], [60, 59], [60, 56], [61, 60], [64, 59], [64, 56], [65, 64], [67, 59], [67, 56], [67, 62], [67, 66], [68, 67], [69, 17], [69, 30], [69, 39], [69, 48], [69, 15], [70, 69], [71, 70], [73, 9], [73, 72], [74, 73], [75, 74], [78, 73], [79, 78], [81, 76], [81, 80], [81, 73], [82, 81], [83, 30], [83, 39], [83, 48], [83, 15], [83, 17], [84, 83], [85, 0], [86, 84]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0d2339a86c5360b2903e326cf96aff1bba53a83010193cb8a761753fe9d96bbe_0d2339a86c5360b2903e326cf96aff1bba53a83010193cb8a761753fe9d96bbe.jsonl.gz", "strip_func_name": "sub_409A81", "query": "\n\n\n__int64 __fastcall sub_409A81(__int16 a1)\n{\nint v2; // [rsp+Ch] [rbp-18h]\nint v3; // [rsp+Ch] [rbp-18h]\nint v4; // [rsp+Ch] [rbp-18h]\nchar v5; // [rsp+10h] [rbp-14h]\nint v6; // [rsp+14h] [rbp-10h]\nint v7; // [rsp+18h] [rbp-Ch]\nint v8; // [rsp+1Ch] [rbp-8h]\nint v9; // [rsp+20h] [rbp-4h]\n\nv6 = a1 - word_4EB648;\nif ( v6 < 0 )\n{\nv5 = 8;\nv6 = word_4EB648 - a1;\n}\nelse\n{\nv5 = 0;\n}\nv2 = (unsigned __int16)word_412BE0[(unsigned __int8)byte_4EB64A];\nv9 = v2 >> 3;\nif ( v6 > v2 )\n{\nv5 |= 4u;\nv6 -= v2;\nv9 += v2;\n}\nv3 = v2 >> 1;\nif ( v6 > v3 )\n{\nv5 |= 2u;\nv6 -= v3;\nv9 += v3;\n}\nv4 = v3 >> 1;\nif ( v6 > v4 )\n{\nv5 |= 1u;\nv9 += v4;\n}\nif ( (v5 & 8) != 0 )\nv8 = word_4EB648 - v9;\nelse\nv8 = v9 + word_4EB648;\nif ( v8 >= -32768 )\n{\nif ( v8 > 0x7FFF )\nLOWORD(v8) = 0x7FFF;\n}\nelse\n{\nLOWORD(v8) = 0x8000;\n}\nword_4EB648 = v8;\nv7 = dword_412CA0[v5 & 7] + (unsigned __int8)byte_4EB64A;\nif ( v7 >= 0 )\n{\nif ( v7 > 88 )\nLOBYTE(v7) = 88;\n}\nelse\n{\nLOBYTE(v7) = 0;\n}\nbyte_4EB64A = v7;\nreturn v5 & 0xF;\n}\n\n\n\nQ:[a1,v4,v5,v6,v7,v8,v9,sub_409A81,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pcm16', 'v4': 'step', 'v5': 'value', 'v6': 'delta', 'v7': 'stepIndex', 'v8': 'predicedValue', 'v9': 'diff', 'sub_409A81': 'myencode'}"}
dfs_reset
3c0aaf322c6ccdc6b2e4303341c6135e39952377a0ef7fbf56294667f9cd2c29
nimble-code
Uno
NA
static void dfs_reset(void) { Graphs *g; for (g = graph; g; g = g->nxt) g->visited = 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_425668", "function_addr": 4347496, "binary_name": "3c0aaf322c6ccdc6b2e4303341c6135e39952377a0ef7fbf56294667f9cd2c29.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:qword_4870C8"], [3, "mov [rbp+var_8], rax"], [4, "jmp short loc_42568F"], [5, "mov rax, [rbp+var_8]"], [6, "mov word ptr [rax+40h], 0"], [7, "mov rax, [rbp+var_8]"], [8, "mov rax, [rax+48h]"], [9, "mov [rbp+var_8], rax"], [10, "cmp [rbp+var_8], 0"], [11, "jnz short loc_425679"], [12, "nop"], [13, "nop"], [14, "pop rbp"], [15, "retn"]], "data_dep": [[3, 2], [5, 3], [5, 9], [6, 5], [7, 3], [7, 9], [8, 7], [8, 6], [9, 8], [10, 9], [10, 3], [11, 10], [14, 0], [15, 8], [15, 2]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3c0aaf322c6ccdc6b2e4303341c6135e39952377a0ef7fbf56294667f9cd2c29_3c0aaf322c6ccdc6b2e4303341c6135e39952377a0ef7fbf56294667f9cd2c29.jsonl.gz", "strip_func_name": "sub_425668", "query": "\n\n\n__int64 sub_425668()\n{\n__int64 result; // rax\n__int64 i; // [rsp+0h] [rbp-8h]\n\nresult = qword_4870C8;\nfor ( i = qword_4870C8; i; i = result )\n{\n*(_WORD *)(i + 64) = 0;\nresult = *(_QWORD *)(i + 72);\n}\nreturn result;\n}\n\n\n\nQ:[i,sub_425668,]\nAssistant: ", "hints": "[]", "response": "{'i': 'g', 'sub_425668': 'dfs_reset'}"}
F_IsVariadic
1c9782cb95ac345a77465ba88b70eb8da93f650d1c8877cf5bb119d4d1bf0021
mupfdev
SNESoIP
NA
int F_IsVariadic (const Function* F) /* Return true if this is a variadic function */ { return (F->Desc->Flags & FD_VARIADIC) != 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43495C", "function_addr": 4409692, "binary_name": "1c9782cb95ac345a77465ba88b70eb8da93f650d1c8877cf5bb119d4d1bf0021.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+10h]"], [5, "mov eax, [rax]"], [6, "and eax, 4"], [7, "test eax, eax"], [8, "setnz al"], [9, "movzx eax, al"], [10, "pop rbp"], [11, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 0], [11, 9]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1c9782cb95ac345a77465ba88b70eb8da93f650d1c8877cf5bb119d4d1bf0021_1c9782cb95ac345a77465ba88b70eb8da93f650d1c8877cf5bb119d4d1bf0021.jsonl.gz", "strip_func_name": "sub_43495C", "query": "\n\n\n_BOOL8 __fastcall sub_43495C(__int64 a1)\n{\nreturn (**(_DWORD **)(a1 + 16) & 4) != 0;\n}\n\n\n\nQ:[a1,sub_43495C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'F', 'sub_43495C': 'F_IsVariadic'}"}
s_ASCII_IsUpper
2e41131efdc31893b1e9cfe634b3497205fe890eb5cb06161fcc58fe784adeba
xiaochuanle
MECAT2
NA
bool s_ASCII_IsUpper(unsigned char c) { return c >= 'A' && c <= 'Z'; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4089ED", "function_addr": 4229613, "binary_name": "2e41131efdc31893b1e9cfe634b3497205fe890eb5cb06161fcc58fe784adeba.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], 40h "], [5, "jbe short loc_408A09"], [6, "cmp [rbp+var_4], 5Ah "], [7, "ja short loc_408A09"], [8, "mov eax, 1"], [9, "jmp short loc_408A0E"], [10, "mov eax, 0"], [11, "pop rbp"], [12, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 3], [7, 6], [11, 0], [12, 10], [12, 8]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2e41131efdc31893b1e9cfe634b3497205fe890eb5cb06161fcc58fe784adeba_2e41131efdc31893b1e9cfe634b3497205fe890eb5cb06161fcc58fe784adeba.jsonl.gz", "strip_func_name": "sub_4089ED", "query": "\n\n\n_BOOL8 __fastcall sub_4089ED(unsigned __int8 a1)\n{\nreturn a1 > 0x40u && a1 <= 0x5Au;\n}\n\n\n\nQ:[a1,sub_4089ED,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'c', 'sub_4089ED': 's_ASCII_IsUpper'}"}
constexpr_bits_array
2d8cb5f6d3befa3f239a74d751762d3d2d63b886f763899296126b965f504863
thanks4opensource
regbits
NA
__attribute__((noinline)) void constexpr_bits_array() { (GPIO1 + GPIO_WORDS_OFFSET)[3] = 0x6 ; *(GPIO1 + GPIO_SET_OFFSET) = 1 << 13; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40171D", "function_addr": 4200221, "binary_name": "2d8cb5f6d3befa3f239a74d751762d3d2d63b886f763899296126b965f504863.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, 70012Ch"], [3, "mov dword ptr [rax], 6"], [4, "mov eax, 7001A0h"], [5, "mov dword ptr [rax], 2000h"], [6, "nop"], [7, "pop rbp"], [8, "retn"]], "data_dep": [[3, 2], [5, 4], [7, 0], [8, 4]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2d8cb5f6d3befa3f239a74d751762d3d2d63b886f763899296126b965f504863_2d8cb5f6d3befa3f239a74d751762d3d2d63b886f763899296126b965f504863.jsonl.gz", "strip_func_name": "sub_40171D", "query": "\n\n\n__int64 sub_40171D()\n{\n__int64 result; // rax\n\nMEMORY[0x70012C] = 6;\nresult = 7340448LL;\nMEMORY[0x7001A0] = 0x2000;\nreturn result;\n}\n\n\n\nQ:[sub_40171D,]\nAssistant: ", "hints": "[]", "response": "{'sub_40171D': 'constexpr_bits_array'}"}
ata_Legacy_Write_DMA_CHS
fa7d192f403e4cd85103a5281abf24b8385f9da12ec461f965cc0a971258cb29
Seagate
openSeaChest
NA
int ata_Legacy_Write_DMA_CHS(tDevice *device, uint16_t cylinder, uint8_t head, uint8_t sector, uint8_t *ptrData, uint32_t dataSize, bool extendedCmd, bool fua) { int ret = UNKNOWN; ataPassthroughCommand ataCommandOptions; memset(&ataCommandOptions, 0, sizeof(ataPassthroughCommand)); ataCommandOptions.commandDirection = XFER_DATA_OUT; ataCommandOptions.ataCommandLengthLocation = ATA_PT_LEN_SECTOR_COUNT; ataCommandOptions.ataTransferBlocks = ATA_PT_LOGICAL_SECTOR_SIZE; ataCommandOptions.ptrData = ptrData; ataCommandOptions.dataSize = dataSize; switch (device->drive_info.ata_Options.dmaMode) { case ATA_DMA_MODE_NO_DMA: return BAD_PARAMETER; case ATA_DMA_MODE_UDMA: ataCommandOptions.commadProtocol = ATA_PROTOCOL_UDMA; break; case ATA_DMA_MODE_MWDMA: case ATA_DMA_MODE_DMA: default: ataCommandOptions.commadProtocol = ATA_PROTOCOL_DMA; break; } ataCommandOptions.tfr.SectorNumber = sector; ataCommandOptions.tfr.CylinderLow = M_Byte0(cylinder); ataCommandOptions.tfr.CylinderHigh = M_Byte1(cylinder); ataCommandOptions.tfr.SectorCount = M_Byte0(dataSize / device->drive_info.deviceBlockSize); ataCommandOptions.tfr.DeviceHead = DEVICE_REG_BACKWARDS_COMPATIBLE_BITS; ataCommandOptions.tfr.DeviceHead |= head; if (device->drive_info.ata_Options.isDevice1) { ataCommandOptions.tfr.DeviceHead |= DEVICE_SELECT_BIT; } if (extendedCmd) { ataCommandOptions.commandType = ATA_CMD_TYPE_EXTENDED_TASKFILE; if (fua) { ataCommandOptions.tfr.CommandStatus = ATA_WRITE_DMA_FUA_EXT; } else { ataCommandOptions.tfr.CommandStatus = ATA_WRITE_DMA_EXT; } ataCommandOptions.tfr.SectorNumberExt = 0; ataCommandOptions.tfr.CylinderLowExt = 0; ataCommandOptions.tfr.CylinderHighExt = 0; ataCommandOptions.tfr.SectorCount48 = M_Byte1(dataSize / device->drive_info.deviceBlockSize); } else { ataCommandOptions.commandType = ATA_CMD_TYPE_TASKFILE; ataCommandOptions.tfr.CommandStatus = ATA_WRITE_DMA_RETRY_CMD; } if (!ptrData) { return BAD_PARAMETER; } if (VERBOSITY_COMMAND_NAMES <= device->deviceVerbosity) { if (extendedCmd) { printf("Sending ATA Write DMA Ext (CHS)\n"); } else { printf("Sending ATA Write DMA (CHS)\n"); } } ret = ata_Passthrough_Command(device, &ataCommandOptions); if (VERBOSITY_COMMAND_NAMES <= device->deviceVerbosity) { if (extendedCmd) { print_Return_Enum("Write DMA Ext (CHS)", ret); } else { print_Return_Enum("Write DMA (CHS)", ret); } } return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4673EB", "function_addr": 4617195, "binary_name": "fa7d192f403e4cd85103a5281abf24b8385f9da12ec461f965cc0a971258cb29.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0A0h"], [3, "mov [rbp+var_78], rdi"], [4, "mov eax, esi"], [5, "mov esi, edx"], [6, "mov edx, ecx"], [7, "mov [rbp+var_90], r8"], [8, "mov [rbp+var_88], r9d"], [9, "mov edi, [rbp+arg_0]"], [10, "mov ecx, [rbp+arg_8]"], [11, "mov [rbp+var_7C], ax"], [12, "mov eax, esi"], [13, "mov [rbp+var_80], al"], [14, "mov eax, edx"], [15, "mov [rbp+var_84], al"], [16, "mov eax, edi"], [17, "mov [rbp+var_94], al"], [18, "mov eax, ecx"], [19, "mov [rbp+var_98], al"], [20, "mov [rbp+var_4], 20h "], [21, "lea rax, [rbp+s]"], [22, "mov edx, 60h "], [23, "mov esi, 0"], [24, "mov rdi, rax"], [25, "call _memset"], [26, "mov [rbp+var_6C], 2"], [27, "mov [rbp+var_1C], 2"], [28, "mov [rbp+var_20], 1"], [29, "mov rax, [rbp+var_90]"], [30, "mov [rbp+var_40], rax"], [31, "mov eax, [rbp+var_88]"], [32, "mov [rbp+var_38], eax"], [33, "mov rax, [rbp+var_78]"], [34, "mov eax, [rax+2540h]"], [35, "test eax, eax"], [36, "jz short loc_467490"], [37, "cmp eax, 3"], [38, "jz short loc_46749A"], [39, "jmp short loc_4674A3"], [40, "mov eax, 6"], [41, "jmp locret_4675FF"], [42, "mov [rbp+var_68], 0Dh"], [43, "jmp short loc_4674AB"], [44, "mov [rbp+var_68], 2"], [45, "nop"], [46, "movzx eax, [rbp+var_84]"], [47, "mov [rbp+var_62], al"], [48, "movzx eax, [rbp+var_7C]"], [49, "mov [rbp+var_61], al"], [50, "movzx eax, [rbp+var_7C]"], [51, "shr ax, 8"], [52, "mov [rbp+var_60], al"], [53, "mov rax, [rbp+var_78]"], [54, "mov ecx, [rax+1C8h]"], [55, "mov eax, [rbp+var_88]"], [56, "mov edx, 0"], [57, "div ecx"], [58, "mov [rbp+var_5A], al"], [59, "mov [rbp+var_5F], 0A0h"], [60, "movzx eax, [rbp+var_5F]"], [61, "or al, [rbp+var_80]"], [62, "mov [rbp+var_5F], al"], [63, "mov rax, [rbp+var_78]"], [64, "movzx eax, byte ptr [rax+254Eh]"], [65, "test al, al"], [66, "jz short loc_467508"], [67, "movzx eax, [rbp+var_5F]"], [68, "or eax, 10h"], [69, "mov [rbp+var_5F], al"], [70, "cmp [rbp+var_94], 0"], [71, "jz short loc_467559"], [72, "mov [rbp+s], 2"], [73, "cmp [rbp+var_98], 0"], [74, "jz short loc_467527"], [75, "mov [rbp+var_64], 3Dh "], [76, "jmp short loc_46752B"], [77, "mov [rbp+var_64], 35h "], [78, "mov [rbp+var_5E], 0"], [79, "mov [rbp+var_5D], 0"], [80, "mov [rbp+var_5C], 0"], [81, "mov rax, [rbp+var_78]"], [82, "mov ecx, [rax+1C8h]"], [83, "mov eax, [rbp+var_88]"], [84, "mov edx, 0"], [85, "div ecx"], [86, "mov eax, eax"], [87, "shr rax, 8"], [88, "mov [rbp+var_59], al"], [89, "jmp short loc_467564"], [90, "mov [rbp+s], 1"], [91, "mov [rbp+var_64], 0CAh"], [92, "cmp [rbp+var_90], 0"], [93, "jnz short loc_467578"], [94, "mov eax, 6"], [95, "jmp locret_4675FF"], [96, "mov rax, [rbp+var_78]"], [97, "mov eax, [rax+26FCh]"], [98, "cmp eax, 1"], [99, "jbe short loc_4675AA"], [100, "cmp [rbp+var_94], 0"], [101, "jz short loc_46759E"], [102, "lea rdi, aSendingAtaWrit_7"], [103, "call _puts"], [104, "jmp short loc_4675AA"], [105, "lea rdi, aSendingAtaWrit_8"], [106, "call _puts"], [107, "lea rdx, [rbp+s]"], [108, "mov rax, [rbp+var_78]"], [109, "mov rsi, rdx"], [110, "mov rdi, rax"], [111, "call sub_436B68"], [112, "mov [rbp+var_4], eax"], [113, "mov rax, [rbp+var_78]"], [114, "mov eax, [rax+26FCh]"], [115, "cmp eax, 1"], [116, "jbe short loc_4675FC"], [117, "cmp [rbp+var_94], 0"], [118, "jz short loc_4675EB"], [119, "mov eax, [rbp+var_4]"], [120, "mov esi, eax"], [121, "lea rdi, aWriteDmaExtChs"], [122, "call sub_4824E2"], [123, "jmp short loc_4675FC"], [124, "mov eax, [rbp+var_4]"], [125, "mov esi, eax"], [126, "lea rdi, aWriteDmaChs"], [127, "call sub_4824E2"], [128, "mov eax, [rbp+var_4]"], [129, "leave"], [130, "retn"]], "data_dep": [[11, 4], [12, 5], [13, 12], [14, 6], [15, 14], [16, 9], [17, 16], [18, 10], [19, 18], [21, 18], [24, 21], [29, 7], [30, 29], [31, 8], [32, 31], [33, 3], [34, 33], [35, 34], [36, 35], [37, 35], [38, 37], [46, 15], [47, 46], [48, 11], [49, 48], [50, 11], [51, 50], [52, 51], [53, 3], [54, 53], [55, 8], [57, 54], [58, 55], [60, 59], [61, 60], [61, 13], [62, 61], [63, 3], [64, 63], [65, 64], [66, 65], [67, 62], [68, 67], [69, 68], [70, 17], [71, 70], [73, 19], [74, 73], [81, 3], [82, 81], [83, 8], [85, 82], [86, 83], [87, 86], [88, 87], [92, 7], [93, 92], [96, 3], [97, 96], [98, 97], [99, 98], [100, 17], [101, 100], [102, 24], [105, 24], [107, 90], [107, 84], [107, 72], [107, 56], [108, 3], [109, 107], [110, 108], [112, 111], [113, 3], [114, 113], [115, 114], [116, 115], [117, 17], [118, 117], [119, 112], [120, 119], [121, 110], [124, 112], [125, 124], [126, 110], [128, 112], [130, 94], [130, 128], [130, 40]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/fa7d192f403e4cd85103a5281abf24b8385f9da12ec461f965cc0a971258cb29_fa7d192f403e4cd85103a5281abf24b8385f9da12ec461f965cc0a971258cb29.jsonl.gz", "strip_func_name": "sub_4673EB", "query": "\n\n\n__int64 __fastcall sub_4673EB(__int64 a1, __int16 a2, char a3, char a4, __int64 a5, unsigned int a6, char a7, char a8)\n{\nint v8; // eax\nint s[2]; // [rsp+30h] [rbp-70h] BYREF\nint v15; // [rsp+38h] [rbp-68h]\nchar v16; // [rsp+3Ch] [rbp-64h]\nchar v17; // [rsp+3Eh] [rbp-62h]\n__int16 v18; // [rsp+3Fh] [rbp-61h]\nchar v19; // [rsp+41h] [rbp-5Fh]\nchar v20; // [rsp+42h] [rbp-5Eh]\nchar v21; // [rsp+43h] [rbp-5Dh]\nchar v22; // [rsp+44h] [rbp-5Ch]\nchar v23; // [rsp+46h] [rbp-5Ah]\nchar v24; // [rsp+47h] [rbp-59h]\n__int64 v25; // [rsp+60h] [rbp-40h]\nunsigned int v26; // [rsp+68h] [rbp-38h]\nint v27; // [rsp+80h] [rbp-20h]\nint v28; // [rsp+84h] [rbp-1Ch]\nunsigned int v29; // [rsp+9Ch] [rbp-4h]\n\nv29 = 32;\nmemset(s, 0, 0x60uLL);\ns[1] = 2;\nv28 = 2;\nv27 = 1;\nv25 = a5;\nv26 = a6;\nv8 = *(_DWORD *)(a1 + 9536);\nif ( !v8 )\nreturn 6LL;\nif ( v8 == 3 )\nv15 = 13;\nelse\nv15 = 2;\nv17 = a4;\nv18 = a2;\nv23 = a6 / *(_DWORD *)(a1 + 456);\nv19 = a3 | 0xA0;\nif ( *(_BYTE *)(a1 + 9550) )\nv19 |= 0x10u;\nif ( a7 )\n{\ns[0] = 2;\nif ( a8 )\nv16 = 61;\nelse\nv16 = 53;\nv20 = 0;\nv21 = 0;\nv22 = 0;\nv24 = (unsigned __int16)(a6 / *(_DWORD *)(a1 + 456)) >> 8;\n}\nelse\n{\ns[0] = 1;\nv16 = -54;\n}\nif ( !a5 )\nreturn 6LL;\nif ( *(_DWORD *)(a1 + 9980) > 1u )\n{\nif ( a7 )\nputs(\"Sending ATA Write DMA Ext (CHS)\");\nelse\nputs(\"Sending ATA Write DMA (CHS)\");\n}\nv29 = sub_436B68(a1, (__int64)s);\nif ( *(_DWORD *)(a1 + 9980) > 1u )\n{\nif ( a7 )\nsub_4824E2(\"Write DMA Ext (CHS)\", v29);\nelse\nsub_4824E2(\"Write DMA (CHS)\", v29);\n}\nreturn v29;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,a8,s,sub_4673EB,sub_436B68,sub_4824E2,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'head', 'a4': 'sector', 'a1': 'device', 'a2': 'cylinder', 'a5': 'ptrData', 'a6': 'dataSize', 'a7': 'extendedCmd', 'a8': 'fua', 's': 'ataCommandOptions', 'sub_4673EB': 'ata_Legacy_Write_DMA_CHS', 'sub_436B68': 'ata_Passthrough_Command', 'sub_4824E2': 'print_Return_Enum'}"}
tmxr_set_port_speed_control
9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23
open-simh
simh
NA
t_stat tmxr_set_port_speed_control (TMXR *mp) { int i; if (!mp->port_speed_control && mp->uptr && !(mp->uptr->flags & UNIT_ATT)) return sim_messagef (SCPE_ALATT, "Can't change speed mode while attached.\n:"); mp->port_speed_control = TRUE; for (i=0; i<mp->lines; ++i) mp->ldsc[i].port_speed_control = mp->port_speed_control; sim_debug (TMXR_DBG_CFG, mp->dptr, "Speed Mode: Enabled\n"); return SCPE_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_479245", "function_addr": 4690501, "binary_name": "9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rax, [rbp+var_18]"], [5, "mov eax, [rax+1078h]"], [6, "test eax, eax"], [7, "jnz short loc_479297"], [8, "mov rax, [rbp+var_18]"], [9, "mov rax, [rax+40h]"], [10, "test rax, rax"], [11, "jz short loc_479297"], [12, "mov rax, [rbp+var_18]"], [13, "mov rax, [rax+40h]"], [14, "mov eax, [rax+38h]"], [15, "and eax, 10h"], [16, "test eax, eax"], [17, "jnz short loc_479297"], [18, "mov esi, offset aCanTChangeSpee"], [19, "mov edi, 54h "], [20, "mov eax, 0"], [21, "call sub_4556C5"], [22, "jmp locret_47933E"], [23, "mov rax, [rbp+var_18]"], [24, "mov dword ptr [rax+1078h], 1"], [25, "mov [rbp+var_4], 0"], [26, "jmp short loc_4792E2"], [27, "mov rax, [rbp+var_18]"], [28, "mov rcx, [rax+18h]"], [29, "mov eax, [rbp+var_4]"], [30, "movsxd rdx, eax"], [31, "mov rax, rdx"], [32, "shl rax, 6"], [33, "add rax, rdx"], [34, "shl rax, 3"], [35, "lea rdx, [rcx+rax]"], [36, "mov rax, [rbp+var_18]"], [37, "mov eax, [rax+1078h]"], [38, "mov [rdx+90h], eax"], [39, "add [rbp+var_4], 1"], [40, "mov rax, [rbp+var_18]"], [41, "mov eax, [rax]"], [42, "cmp [rbp+var_4], eax"], [43, "jl short loc_4792AE"], [44, "mov rax, cs:qword_537120"], [45, "test rax, rax"], [46, "jz short loc_479339"], [47, "mov rax, [rbp+var_18]"], [48, "mov rax, [rax+28h]"], [49, "test rax, rax"], [50, "jz short loc_479339"], [51, "mov rax, [rbp+var_18]"], [52, "mov rax, [rax+28h]"], [53, "mov eax, [rax+74h]"], [54, "and eax, 1000000h"], [55, "test eax, eax"], [56, "jz short loc_479339"], [57, "mov rax, [rbp+var_18]"], [58, "mov rax, [rax+28h]"], [59, "mov edx, offset aSpeedModeEnabl"], [60, "mov rsi, rax"], [61, "mov edi, 1000000h"], [62, "mov eax, 0"], [63, "call sub_45610E"], [64, "mov eax, 0"], [65, "leave"], [66, "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], [16, 15], [17, 16], [23, 3], [24, 23], [27, 3], [28, 24], [28, 27], [28, 38], [29, 25], [29, 39], [30, 29], [31, 30], [32, 31], [33, 32], [33, 30], [34, 33], [35, 30], [35, 38], [35, 34], [35, 24], [36, 3], [37, 24], [37, 36], [37, 38], [38, 35], [38, 37], [39, 39], [39, 25], [40, 3], [41, 40], [41, 24], [41, 38], [42, 39], [42, 41], [42, 25], [43, 42], [45, 44], [46, 45], [47, 3], [48, 24], [48, 38], [48, 47], [49, 48], [50, 49], [51, 3], [52, 24], [52, 51], [52, 38], [53, 38], [53, 52], [53, 24], [54, 53], [55, 54], [56, 55], [57, 3], [58, 24], [58, 57], [58, 38], [60, 58], [66, 21], [66, 64]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23_9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23.jsonl.gz", "strip_func_name": "sub_479245", "query": "\n\n\n__int64 __fastcall sub_479245(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\nint i; // [rsp+1Ch] [rbp-4h]\n\nif ( !*(_DWORD *)(a1 + 4216) && *(_QWORD *)(a1 + 64) && (*(_DWORD *)(*(_QWORD *)(a1 + 64) + 56LL) & 0x10) == 0 )\nreturn sub_4556C5(84, \"Can't change speed mode while attached.\\n:\", a3, a4, a5, a6);\n*(_DWORD *)(a1 + 4216) = 1;\nfor ( i = 0; i < *(_DWORD *)a1; ++i )\n{\na4 = *(_QWORD *)(a1 + 24);\n*(_DWORD *)(a4 + 520LL * i + 144) = *(_DWORD *)(a1 + 4216);\n}\nif ( qword_537120 && *(_QWORD *)(a1 + 40) && (*(_DWORD *)(*(_QWORD *)(a1 + 40) + 116LL) & 0x1000000) != 0 )\nsub_45610E(0x1000000, *(_QWORD *)(a1 + 40), \"Speed Mode: Enabled\\n\", a4, a5, a6);\nreturn 0LL;\n}\n\n\n\nQ:[a1,sub_479245,sub_4556C5,sub_45610E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'mp', 'sub_479245': 'tmxr_set_port_speed_control', 'sub_4556C5': 'sim_messagef', 'sub_45610E': '_sim_debug_device'}"}
l2util_ipv6_iid_from_addr
cf5039b5de5a4a8165d436ee73408599f6aa6efab38134956d1026ec9e90165a
RIOT-OS
RIOT
NA
int l2util_ipv6_iid_from_addr(int dev_type, const uint8_t *addr, size_t addr_len, eui64_t *iid) { switch (dev_type) { #if defined(MODULE_NETDEV_IEEE802154) || defined(MODULE_XBEE) case NETDEV_TYPE_IEEE802154: if (ieee802154_get_iid(iid, addr, addr_len) != NULL) { return sizeof(eui64_t); } else { return -EINVAL; } #endif /* defined(MODULE_NETDEV_IEEE802154) || defined(MODULE_XBEE) */ #if defined(MODULE_CC110X) || defined(MODULE_NRFMIN) case NETDEV_TYPE_CC110X: case NETDEV_TYPE_NRFMIN: if (addr_len <= 3) { _create_eui64_from_short(addr, addr_len, iid); /* since this address conversion is based on the IEEE * 802.15.4 address conversion for short addresses, the * U/L bit doesn't need to be flipped. * see https://tools.ietf.org/html/rfc6282#section-3.2.2 */ return sizeof(eui64_t); } else { return -EINVAL; } #endif /* defined(MODULE_CC110X) || defined(MODULE_NRFMIN) */ #if defined(MODULE_NIMBLE_NETIF) case NETDEV_TYPE_BLE: /* for BLE we don't flip the universal/local flag... */ return l2util_eui64_from_addr(dev_type, addr, addr_len, iid); #endif /* defined(MODULE_NIMBLE_NETIF) */ default: { int res = l2util_eui64_from_addr(dev_type, addr, addr_len, iid); if (res == sizeof(eui64_t)) { iid->uint8[0] ^= 0x02; } return res; } } return -ENOTSUP; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40532B", "function_addr": 4215595, "binary_name": "cf5039b5de5a4a8165d436ee73408599f6aa6efab38134956d1026ec9e90165a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_14], edi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov [rbp+var_30], rcx"], [7, "mov rcx, [rbp+var_30]"], [8, "mov rdx, [rbp+var_28]"], [9, "mov rsi, [rbp+var_20]"], [10, "mov eax, [rbp+var_14]"], [11, "mov edi, eax"], [12, "call sub_405310"], [13, "mov [rbp+var_4], eax"], [14, "cmp [rbp+var_4], 8"], [15, "jnz short loc_405373"], [16, "mov rax, [rbp+var_30]"], [17, "movzx eax, byte ptr [rax]"], [18, "xor eax, 2"], [19, "mov edx, eax"], [20, "mov rax, [rbp+var_30]"], [21, "mov [rax], dl"], [22, "mov eax, [rbp+var_4]"], [23, "leave"], [24, "retn"]], "data_dep": [[7, 6], [8, 5], [9, 4], [10, 3], [11, 10], [13, 12], [14, 13], [15, 14], [16, 6], [17, 16], [18, 17], [19, 18], [20, 6], [21, 20], [21, 19], [22, 13], [24, 22]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/cf5039b5de5a4a8165d436ee73408599f6aa6efab38134956d1026ec9e90165a_cf5039b5de5a4a8165d436ee73408599f6aa6efab38134956d1026ec9e90165a.jsonl.gz", "strip_func_name": "sub_40532B", "query": "\n\n\n__int64 __fastcall sub_40532B(unsigned int a1, __int64 a2, __int64 a3, _BYTE *a4)\n{\nunsigned int v6; // [rsp+2Ch] [rbp-4h]\n\nv6 = sub_405310(a1, a2, a3, a4);\nif ( v6 == 8 )\n*a4 ^= 2u;\nreturn v6;\n}\n\n\n\nQ:[a3,a4,a1,a2,v6,sub_40532B,sub_405310,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'addr_len', 'a4': 'iid', 'a1': 'dev_type', 'a2': 'addr', 'v6': 'res', 'sub_40532B': 'l2util_ipv6_iid_from_addr', 'sub_405310': 'l2util_eui64_from_addr'}"}
nro_print
ce297ee2eb040ae897b55138df396bcca9b0e280a22ead4e0aa5cba0644de078
dazjo
nxtool
NA
void nro_print(nro_context* ctx, u32 actions) { nro_header* header = ctx->header; if (ctx->module_size - getle32(header->bss_size) > ctx->size) fprintf(stdout, "Warning: NRO binary is incomplete. 0x%"PRIX64" bytes missing.\n", (ctx->module_size - getle32(header->bss_size)) - ctx->size); fprintf(stdout, "\nNRO %s:\n\n", ctx->name); fprintf(stdout, "Header: %.4s\n", header->magic); fprintf(stdout, "Size: 0x%"PRIX32" bytes\n", getle32(header->size)); fprintf(stdout, "\nSegments:\n"); fprintf(stdout, " > .text: 0x%08"PRIX32" (0x%"PRIX32" bytes)\n", getle32(header->text_memoffset), getle32(header->text_size)); fprintf(stdout, " > .rodata: 0x%08"PRIX32" (0x%"PRIX32" bytes)\n", getle32(header->ro_memoffset), getle32(header->ro_size)); fprintf(stdout, " > .data: 0x%08"PRIX32" (0x%"PRIX32" bytes)\n", getle32(header->data_memoffset), getle32(header->data_size)); fprintf(stdout, " > .bss: 0x%08"PRIX32" (0x%"PRIX32" bytes)\n\n", getle32(header->data_memoffset) + getle32(header->data_size), getle32(header->bss_size)); if (ctx->module) { u8 hash[0x20] = { 0 }; nx_sha256(ctx->buffer, getle32(header->size), hash); memdump(stdout, "Hash: ", hash, sizeof(hash)); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4060A2", "function_addr": 4219042, "binary_name": "ce297ee2eb040ae897b55138df396bcca9b0e280a22ead4e0aa5cba0644de078.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_48], rdi"], [6, "mov [rbp+var_4C], esi"], [7, "mov rax, [rbp+var_48]"], [8, "mov rax, [rax+38h]"], [9, "mov [rbp+var_18], rax"], [10, "mov rax, [rbp+var_48]"], [11, "mov ebx, [rax+48h]"], [12, "mov rax, [rbp+var_18]"], [13, "add rax, 28h "], [14, "mov rdi, rax"], [15, "call sub_406824"], [16, "sub ebx, eax"], [17, "mov edx, ebx"], [18, "mov edx, edx"], [19, "mov rax, [rbp+var_48]"], [20, "mov rax, [rax+30h]"], [21, "cmp rdx, rax"], [22, "jbe short loc_40612B"], [23, "mov rax, [rbp+var_48]"], [24, "mov ebx, [rax+48h]"], [25, "mov rax, [rbp+var_18]"], [26, "add rax, 28h "], [27, "mov rdi, rax"], [28, "call sub_406824"], [29, "sub ebx, eax"], [30, "mov edx, ebx"], [31, "mov edx, edx"], [32, "mov rax, [rbp+var_48]"], [33, "mov rax, [rax+30h]"], [34, "sub rdx, rax"], [35, "mov rax, cs:stdout"], [36, "mov esi, offset aWarningNroBina"], [37, "mov rdi, rax"], [38, "mov eax, 0"], [39, "call _fprintf"], [40, "mov rax, [rbp+var_48]"], [41, "mov rdx, [rax+10h]"], [42, "mov rax, cs:stdout"], [43, "mov esi, offset aNroS"], [44, "mov rdi, rax"], [45, "mov eax, 0"], [46, "call _fprintf"], [47, "mov rdx, [rbp+var_18]"], [48, "mov rax, cs:stdout"], [49, "mov esi, offset aHeader4s_1"], [50, "mov rdi, rax"], [51, "mov eax, 0"], [52, "call _fprintf"], [53, "mov rax, [rbp+var_18]"], [54, "add rax, 8"], [55, "mov rdi, rax"], [56, "call sub_406824"], [57, "mov edx, eax"], [58, "mov rax, cs:stdout"], [59, "mov esi, offset aSize0xXBytes"], [60, "mov rdi, rax"], [61, "mov eax, 0"], [62, "call _fprintf"], [63, "mov rax, cs:stdout"], [64, "mov rcx, rax"], [65, "mov edx, 0Bh"], [66, "mov esi, 1"], [67, "mov edi, offset aSegments_0"], [68, "call _fwrite"], [69, "mov rax, [rbp+var_18]"], [70, "add rax, 14h"], [71, "mov rdi, rax"], [72, "call sub_406824"], [73, "mov ebx, eax"], [74, "mov rax, [rbp+var_18]"], [75, "add rax, 10h"], [76, "mov rdi, rax"], [77, "call sub_406824"], [78, "mov edx, eax"], [79, "mov rax, cs:stdout"], [80, "mov ecx, ebx"], [81, "mov esi, offset aText0x08x0xXBy_0"], [82, "mov rdi, rax"], [83, "mov eax, 0"], [84, "call _fprintf"], [85, "mov rax, [rbp+var_18]"], [86, "add rax, 1Ch"], [87, "mov rdi, rax"], [88, "call sub_406824"], [89, "mov ebx, eax"], [90, "mov rax, [rbp+var_18]"], [91, "add rax, 18h"], [92, "mov rdi, rax"], [93, "call sub_406824"], [94, "mov edx, eax"], [95, "mov rax, cs:stdout"], [96, "mov ecx, ebx"], [97, "mov esi, offset aRodata0x08x0xX_0"], [98, "mov rdi, rax"], [99, "mov eax, 0"], [100, "call _fprintf"], [101, "mov rax, [rbp+var_18]"], [102, "add rax, 24h "], [103, "mov rdi, rax"], [104, "call sub_406824"], [105, "mov ebx, eax"], [106, "mov rax, [rbp+var_18]"], [107, "add rax, 20h "], [108, "mov rdi, rax"], [109, "call sub_406824"], [110, "mov edx, eax"], [111, "mov rax, cs:stdout"], [112, "mov ecx, ebx"], [113, "mov esi, offset aData0x08x0xXBy_0"], [114, "mov rdi, rax"], [115, "mov eax, 0"], [116, "call _fprintf"], [117, "mov rax, [rbp+var_18]"], [118, "add rax, 28h "], [119, "mov rdi, rax"], [120, "call sub_406824"], [121, "mov ebx, eax"], [122, "mov rax, [rbp+var_18]"], [123, "add rax, 20h "], [124, "mov rdi, rax"], [125, "call sub_406824"], [126, "mov r12d, eax"], [127, "mov rax, [rbp+var_18]"], [128, "add rax, 24h "], [129, "mov rdi, rax"], [130, "call sub_406824"], [131, "lea edx, [r12+rax]"], [132, "mov rax, cs:stdout"], [133, "mov ecx, ebx"], [134, "mov esi, offset aBss0x08x0xXByt_0"], [135, "mov rdi, rax"], [136, "mov eax, 0"], [137, "call _fprintf"], [138, "mov rax, [rbp+var_48]"], [139, "mov rax, [rax+40h]"], [140, "test rax, rax"], [141, "jz short loc_406335"], [142, "mov [rbp+var_40], 0"], [143, "mov [rbp+var_38], 0"], [144, "mov [rbp+var_30], 0"], [145, "mov [rbp+var_28], 0"], [146, "mov rax, [rbp+var_18]"], [147, "add rax, 8"], [148, "mov rdi, rax"], [149, "call sub_406824"], [150, "mov ecx, eax"], [151, "mov rax, [rbp+var_48]"], [152, "mov rax, [rax+18h]"], [153, "lea rdx, [rbp+var_40]"], [154, "mov esi, ecx"], [155, "mov rdi, rax"], [156, "call sub_405599"], [157, "mov rax, cs:stdout"], [158, "lea rdx, [rbp+var_40]"], [159, "mov ecx, 20h "], [160, "mov esi, offset aHash"], [161, "mov rdi, rax"], [162, "call sub_406E7C"], [163, "nop"], [164, "add rsp, 40h"], [165, "pop rbx"], [166, "pop r12"], [167, "pop rbp"], [168, "retn"]], "data_dep": [[7, 5], [8, 7], [9, 8], [10, 5], [11, 10], [12, 9], [13, 12], [14, 13], [16, 15], [16, 11], [17, 16], [18, 17], [19, 5], [20, 19], [21, 18], [21, 20], [22, 21], [23, 5], [24, 23], [25, 9], [26, 25], [27, 26], [29, 24], [29, 28], [30, 29], [31, 30], [32, 5], [33, 32], [34, 31], [34, 33], [37, 35], [40, 5], [41, 40], [44, 42], [47, 9], [50, 48], [53, 9], [54, 53], [55, 54], [57, 56], [60, 58], [64, 63], [69, 9], [70, 69], [71, 70], [73, 72], [74, 9], [75, 74], [76, 75], [78, 77], [80, 73], [82, 79], [85, 9], [86, 85], [87, 86], [89, 88], [90, 9], [91, 90], [92, 91], [94, 93], [96, 89], [98, 95], [101, 9], [102, 101], [103, 102], [105, 104], [106, 9], [107, 106], [108, 107], [110, 109], [112, 105], [114, 111], [117, 9], [118, 117], [119, 118], [121, 120], [122, 9], [123, 122], [124, 123], [126, 125], [127, 9], [128, 127], [129, 128], [131, 110], [131, 130], [133, 121], [135, 132], [138, 5], [139, 138], [140, 139], [141, 140], [146, 9], [147, 146], [148, 147], [150, 149], [151, 5], [152, 151], [153, 131], [153, 142], [154, 150], [155, 152], [158, 142], [158, 153], [161, 157], [164, 4], [165, 3], [166, 2], [167, 0], [168, 162], [168, 140]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/ce297ee2eb040ae897b55138df396bcca9b0e280a22ead4e0aa5cba0644de078_ce297ee2eb040ae897b55138df396bcca9b0e280a22ead4e0aa5cba0644de078.jsonl.gz", "strip_func_name": "sub_4060A2", "query": "\n\n\n__int64 __fastcall sub_4060A2(__int64 a1)\n{\nint v1; // ebx\nint v2; // ebx\nint v3; // eax\nunsigned int v4; // eax\nunsigned int v5; // ebx\nunsigned int v6; // eax\nunsigned int v7; // ebx\nunsigned int v8; // eax\nunsigned int v9; // ebx\nunsigned int v10; // eax\nunsigned int v11; // ebx\nint v12; // er12\nint v13; // eax\n__int64 result; // rax\nunsigned int v15; // eax\n__int64 v16[5]; // [rsp+10h] [rbp-40h] BYREF\nconst char *v17; // [rsp+38h] [rbp-18h]\n\nv17 = *(const char **)(a1 + 56);\nv1 = *(_DWORD *)(a1 + 72);\nif ( (unsigned __int64)(v1 - (unsigned int)sub_406824(v17 + 40)) > *(_QWORD *)(a1 + 48) )\n{\nv2 = *(_DWORD *)(a1 + 72);\nv3 = sub_406824(v17 + 40);\nfprintf(\nstdout,\n\"Warning: NRO binary is incomplete. 0x%lX bytes missing.\\n\",\n(unsigned int)(v2 - v3) - *(_QWORD *)(a1 + 48));\n}\nfprintf(stdout, \"\\nNRO %s:\\n\\n\", *(const char **)(a1 + 16));\nfprintf(stdout, \"Header: %.4s\\n\", v17);\nv4 = sub_406824(v17 + 8);\nfprintf(stdout, \"Size: 0x%X bytes\\n\", v4);\nfwrite(\"\\nSegments:\\n\", 1uLL, 0xBuLL, stdout);\nv5 = sub_406824(v17 + 20);\nv6 = sub_406824(v17 + 16);\nfprintf(stdout, \" > .text: 0x%08X (0x%X bytes)\\n\", v6, v5);\nv7 = sub_406824(v17 + 28);\nv8 = sub_406824(v17 + 24);\nfprintf(stdout, \" > .rodata: 0x%08X (0x%X bytes)\\n\", v8, v7);\nv9 = sub_406824(v17 + 36);\nv10 = sub_406824(v17 + 32);\nfprintf(stdout, \" > .data: 0x%08X (0x%X bytes)\\n\", v10, v9);\nv11 = sub_406824(v17 + 40);\nv12 = sub_406824(v17 + 32);\nv13 = sub_406824(v17 + 36);\nfprintf(stdout, \" > .bss: 0x%08X (0x%X bytes)\\n\\n\", (unsigned int)(v12 + v13), v11);\nresult = *(_QWORD *)(a1 + 64);\nif ( result )\n{\nv16[0] = 0LL;\nv16[1] = 0LL;\nv16[2] = 0LL;\nv16[3] = 0LL;\nv15 = sub_406824(v17 + 8);\nsub_405599(*(_QWORD *)(a1 + 24), v15, (__int64)v16);\nresult = sub_406E7C(stdout, \"Hash: \", v16, 32LL);\n}\nreturn result;\n}\n\n\n\nQ:[a1,v16,v17,sub_4060A2,sub_406824,sub_405599,sub_406E7C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ctx', 'v16': 'hash', 'v17': 'header', 'sub_4060A2': 'nro_print', 'sub_406824': 'getle32', 'sub_405599': 'nx_sha256', 'sub_406E7C': 'memdump'}"}
sigmoid
d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f
smcameron
space-nerds-in-space
NA
float sigmoid(float x, float sigma, float lambda) { return powf(x, lambda) / (powf(x, lambda) + powf(sigma, lambda)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sigmoid", "function_addr": 4252379, "binary_name": "d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 18h"], [4, "movss [rbp+x], xmm0"], [5, "movss [rbp+var_18], xmm1"], [6, "movss [rbp+y], xmm2"], [7, "movss xmm0, [rbp+y]"], [8, "mov eax, [rbp+x]"], [9, "movaps xmm1, xmm0"], [10, "movd xmm0, eax"], [11, "call _powf"], [12, "movd ebx, xmm0"], [13, "movss xmm0, [rbp+y]"], [14, "mov eax, [rbp+x]"], [15, "movaps xmm1, xmm0"], [16, "movd xmm0, eax"], [17, "call _powf"], [18, "movss [rbp+var_20], xmm0"], [19, "movss xmm0, [rbp+y]"], [20, "mov eax, [rbp+var_18]"], [21, "movaps xmm1, xmm0"], [22, "movd xmm0, eax"], [23, "call _powf"], [24, "addss xmm0, [rbp+var_20]"], [25, "movd xmm1, ebx"], [26, "divss xmm1, xmm0"], [27, "movaps xmm0, xmm1"], [28, "mov rbx, [rbp+var_8]"], [29, "leave"], [30, "retn"]], "data_dep": [[7, 6], [8, 4], [9, 7], [10, 8], [12, 10], [13, 6], [14, 4], [15, 13], [16, 14], [18, 16], [19, 6], [20, 5], [21, 19], [22, 20], [24, 22], [24, 18], [25, 12], [26, 24], [26, 25], [27, 26], [30, 23]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f_d20d5d136ed82a5a36fdeedd4c3a30a62ee46f8e0365a7e4e8f0c462411d4a2f.jsonl.gz", "strip_func_name": "sigmoid", "query": "\n\n\n__m128i __fastcall sigmoid(float a1, float a2, float a3)\n{\n__m128i v3; // xmm0\nunsigned int v4; // ebx\n__m128i v5; // xmm1\nfloat v7; // [rsp+0h] [rbp-20h]\n\nv3 = _mm_cvtsi32_si128(LODWORD(a1));\n*(float *)v3.m128i_i32 = powf(*(float *)v3.m128i_i32, a3);\nv4 = _mm_cvtsi128_si32(v3);\nv7 = powf(a1, a3);\n*(float *)v3.m128i_i32 = powf(a2, a3);\nv5 = _mm_cvtsi32_si128(v4);\n*(float *)v5.m128i_i32 = *(float *)v5.m128i_i32 / (float)(*(float *)v3.m128i_i32 + v7);\nreturn v5;\n}\n\n\n\nQ:[a1,a2,a3,v5,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'x', 'a2': 'sigma', 'a3': 'lambda', 'v5': 'sigma'}"}
bconchar
971338c11c703c7316f12234720df93fe2351b819b513d16f4f7f06a46846f52
zedshaw
liblcthw
NA
int bconchar (bstring b, char c) { int d; if (b == NULL) return BSTR_ERR; d = b->slen; if ((d | (b->mlen - d)) < 0 || balloc (b, d + 2) != BSTR_OK) return BSTR_ERR; b->data[d] = (unsigned char) c; b->data[d + 1] = (unsigned char) '\0'; b->slen++; return BSTR_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "bconchar", "function_addr": 4274276, "binary_name": "971338c11c703c7316f12234720df93fe2351b819b513d16f4f7f06a46846f52.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_1C], al"], [6, "cmp [rbp+var_18], 0"], [7, "jnz short loc_413883"], [8, "mov eax, 0FFFFFFFFh"], [9, "jmp short locret_4138FF"], [10, "mov rax, [rbp+var_18]"], [11, "mov eax, [rax+4]"], [12, "mov [rbp+var_4], eax"], [13, "mov rax, [rbp+var_18]"], [14, "mov eax, [rax]"], [15, "sub eax, [rbp+var_4]"], [16, "or eax, [rbp+var_4]"], [17, "test eax, eax"], [18, "js short loc_4138B5"], [19, "mov eax, [rbp+var_4]"], [20, "lea edx, [rax+2]"], [21, "mov rax, [rbp+var_18]"], [22, "mov esi, edx"], [23, "mov rdi, rax"], [24, "call balloc"], [25, "test eax, eax"], [26, "jz short loc_4138BC"], [27, "mov eax, 0FFFFFFFFh"], [28, "jmp short locret_4138FF"], [29, "mov rax, [rbp+var_18]"], [30, "mov rdx, [rax+8]"], [31, "mov eax, [rbp+var_4]"], [32, "cdqe"], [33, "add rdx, rax"], [34, "movzx eax, [rbp+var_1C]"], [35, "mov [rdx], al"], [36, "mov rax, [rbp+var_18]"], [37, "mov rdx, [rax+8]"], [38, "mov eax, [rbp+var_4]"], [39, "cdqe"], [40, "add rax, 1"], [41, "add rax, rdx"], [42, "mov byte ptr [rax], 0"], [43, "mov rax, [rbp+var_18]"], [44, "mov eax, [rax+4]"], [45, "lea edx, [rax+1]"], [46, "mov rax, [rbp+var_18]"], [47, "mov [rax+4], edx"], [48, "mov eax, 0"], [49, "leave"], [50, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 6], [10, 3], [11, 10], [12, 11], [13, 3], [14, 13], [15, 14], [15, 12], [16, 12], [16, 15], [17, 16], [18, 17], [19, 12], [20, 19], [21, 3], [22, 20], [23, 21], [25, 24], [26, 25], [29, 3], [30, 29], [31, 12], [33, 30], [33, 31], [34, 5], [35, 33], [35, 34], [36, 3], [37, 36], [37, 35], [38, 12], [40, 38], [41, 40], [41, 37], [42, 41], [43, 3], [44, 42], [44, 43], [45, 37], [45, 42], [45, 44], [46, 3], [47, 46], [47, 45], [50, 27], [50, 48], [50, 8]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/971338c11c703c7316f12234720df93fe2351b819b513d16f4f7f06a46846f52_971338c11c703c7316f12234720df93fe2351b819b513d16f4f7f06a46846f52.jsonl.gz", "strip_func_name": "bconchar", "query": "\n\n\n__int64 __fastcall bconchar(__int64 a1, char a2)\n{\nint v3; // [rsp+1Ch] [rbp-4h]\n\nif ( !a1 )\nreturn 0xFFFFFFFFLL;\nv3 = *(_DWORD *)(a1 + 4);\nif ( (v3 | (*(_DWORD *)a1 - v3)) < 0 || (unsigned int)balloc(a1, v3 + 2) )\nreturn 0xFFFFFFFFLL;\n*(_BYTE *)(v3 + *(_QWORD *)(a1 + 8)) = a2;\n*(_BYTE *)(*(_QWORD *)(a1 + 8) + v3 + 1LL) = 0;\n++*(_DWORD *)(a1 + 4);\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'b', 'a2': 'c', 'v3': 'd'}"}
CleanupChildren
b714b50430dc155167fb13379f4e00d79d775ccac764ece9ad5d0d56db016e15
interkosmos
micropolis
NA
static int CleanupChildren(interp, numPids, pidPtr, errorId) Tcl_Interp *interp; /* Used for error messages. */ int numPids; /* Number of entries in pidPtr array. */ int *pidPtr; /* Array of process ids of children. */ int errorId; /* File descriptor index for file containing * stderr output from pipeline. -1 means * there isn't any stderr output. */ { int result = TCL_OK; int i, pid, length; WAIT_STATUS_TYPE waitStatus; for (i = 0; i < numPids; i++) { pid = Tcl_WaitPids(1, &pidPtr[i], (int *) &waitStatus); if (pid == -1) { Tcl_AppendResult(interp, "error waiting for process to exit: ", Tcl_UnixError(interp), (char *) NULL); continue; } /* * Create error messages for unusual process exits. An * extra newline gets appended to each error message, but * it gets removed below (in the same fashion that an * extra newline in the command's output is removed). */ if (!WIFEXITED(waitStatus) || (WEXITSTATUS(waitStatus) != 0)) { char msg1[20], msg2[20]; result = TCL_ERROR; sprintf(msg1, "%d", pid); if (WIFEXITED(waitStatus)) { sprintf(msg2, "%d", WEXITSTATUS(waitStatus)); Tcl_SetErrorCode(interp, "CHILDSTATUS", msg1, msg2, (char *) NULL); } else if (WIFSIGNALED(waitStatus)) { char *p; p = Tcl_SignalMsg((int) (WTERMSIG(waitStatus))); Tcl_SetErrorCode(interp, "CHILDKILLED", msg1, Tcl_SignalId((int) (WTERMSIG(waitStatus))), p, (char *) NULL); Tcl_AppendResult(interp, "child killed: ", p, "\n", (char *) NULL); } else if (WIFSTOPPED(waitStatus)) { char *p; p = Tcl_SignalMsg((int) (WSTOPSIG(waitStatus))); Tcl_SetErrorCode(interp, "CHILDSUSP", msg1, Tcl_SignalId((int) (WSTOPSIG(waitStatus))), p, (char *) NULL); Tcl_AppendResult(interp, "child suspended: ", p, "\n", (char *) NULL); } else { Tcl_AppendResult(interp, "child wait status didn't make sense\n", (char *) NULL); } } } ckfree((char *) pidPtr); /* * Read the standard error file. If there's anything there, * then return an error and add the file's contents to the result * string. */ if (errorId >= 0) { while (1) { # define BUFFER_SIZE 1000 char buffer[BUFFER_SIZE+1]; int count; count = read(errorId, buffer, BUFFER_SIZE); if (count == 0) { break; } if (count < 0) { Tcl_AppendResult(interp, "error reading stderr output file: ", Tcl_UnixError(interp), (char *) NULL); break; } buffer[count] = 0; Tcl_AppendResult(interp, buffer, (char *) NULL); } close(errorId); } /* * If the last character of interp->result is a newline, then remove * the newline character (the newline would just confuse things). */ length = strlen(interp->result); if ((length > 0) && (interp->result[length-1] == '\n')) { interp->result[length-1] = '\0'; } return result; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_46A047", "function_addr": 4628551, "binary_name": "b714b50430dc155167fb13379f4e00d79d775ccac764ece9ad5d0d56db016e15.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 470h"], [3, "mov [rbp+var_458], rdi"], [4, "mov [rbp+var_45C], esi"], [5, "mov [rbp+ptr], rdx"], [6, "mov [rbp+fd], ecx"], [7, "mov [rbp+var_4], 0"], [8, "mov [rbp+var_8], 0"], [9, "jmp loc_46A2A8"], [10, "mov eax, [rbp+var_8]"], [11, "cdqe"], [12, "lea rdx, ds:0[rax*4]"], [13, "mov rax, [rbp+ptr]"], [14, "lea rcx, [rdx+rax]"], [15, "lea rax, [rbp+var_2C]"], [16, "mov rdx, rax"], [17, "mov rsi, rcx"], [18, "mov edi, 1"], [19, "call sub_46AE61"], [20, "mov [rbp+var_14], eax"], [21, "cmp [rbp+var_14], 0FFFFFFFFh"], [22, "jnz short loc_46A0E9"], [23, "mov rax, [rbp+var_458]"], [24, "mov rdi, rax"], [25, "call sub_46BE10"], [26, "mov rdx, rax"], [27, "mov rax, [rbp+var_458]"], [28, "mov ecx, 0"], [29, "mov esi, offset aErrorWaitingFo"], [30, "mov rdi, rax"], [31, "mov eax, 0"], [32, "call sub_462AC3"], [33, "jmp loc_46A2A4"], [34, "mov eax, [rbp+var_2C]"], [35, "and eax, 7Fh"], [36, "test eax, eax"], [37, "jnz short loc_46A104"], [38, "mov eax, [rbp+var_2C]"], [39, "sar eax, 8"], [40, "movzx eax, al"], [41, "test eax, eax"], [42, "jz loc_46A2A4"], [43, "mov [rbp+var_4], 1"], [44, "mov edx, [rbp+var_14]"], [45, "lea rax, [rbp+s]"], [46, "mov esi, offset aD_18"], [47, "mov rdi, rax"], [48, "mov eax, 0"], [49, "call _sprintf"], [50, "mov eax, [rbp+var_2C]"], [51, "and eax, 7Fh"], [52, "test eax, eax"], [53, "jnz short loc_46A179"], [54, "mov eax, [rbp+var_2C]"], [55, "sar eax, 8"], [56, "movzx edx, al"], [57, "lea rax, [rbp+var_60]"], [58, "mov esi, offset aD_18"], [59, "mov rdi, rax"], [60, "mov eax, 0"], [61, "call _sprintf"], [62, "lea rcx, [rbp+var_60]"], [63, "lea rdx, [rbp+s]"], [64, "mov rax, [rbp+var_458]"], [65, "mov r8d, 0"], [66, "mov esi, offset aChildstatus"], [67, "mov rdi, rax"], [68, "mov eax, 0"], [69, "call sub_462F74"], [70, "jmp loc_46A2A4"], [71, "mov eax, [rbp+var_2C]"], [72, "and eax, 7Fh"], [73, "add eax, 1"], [74, "sar al, 1"], [75, "test al, al"], [76, "jle short loc_46A200"], [77, "mov eax, [rbp+var_2C]"], [78, "and eax, 7Fh"], [79, "mov edi, eax"], [80, "call sub_46A93F"], [81, "mov [rbp+var_28], rax"], [82, "mov eax, [rbp+var_2C]"], [83, "and eax, 7Fh"], [84, "mov edi, eax"], [85, "call sub_46A824"], [86, "mov rcx, rax"], [87, "mov rsi, [rbp+var_28]"], [88, "lea rdx, [rbp+s]"], [89, "mov rax, [rbp+var_458]"], [90, "mov r9d, 0"], [91, "mov r8, rsi"], [92, "mov esi, offset aChildkilled"], [93, "mov rdi, rax"], [94, "mov eax, 0"], [95, "call sub_462F74"], [96, "mov rdx, [rbp+var_28]"], [97, "mov rax, [rbp+var_458]"], [98, "mov r8d, 0"], [99, "mov ecx, offset asc_47C450"], [100, "mov esi, offset aChildKilled"], [101, "mov rdi, rax"], [102, "mov eax, 0"], [103, "call sub_462AC3"], [104, "jmp loc_46A2A4"], [105, "mov eax, [rbp+var_2C]"], [106, "movzx eax, al"], [107, "cmp eax, 7Fh"], [108, "jnz short loc_46A286"], [109, "mov eax, [rbp+var_2C]"], [110, "sar eax, 8"], [111, "movzx eax, al"], [112, "mov edi, eax"], [113, "call sub_46A93F"], [114, "mov [rbp+var_20], rax"], [115, "mov eax, [rbp+var_2C]"], [116, "sar eax, 8"], [117, "movzx eax, al"], [118, "mov edi, eax"], [119, "call sub_46A824"], [120, "mov rcx, rax"], [121, "mov rsi, [rbp+var_20]"], [122, "lea rdx, [rbp+s]"], [123, "mov rax, [rbp+var_458]"], [124, "mov r9d, 0"], [125, "mov r8, rsi"], [126, "mov esi, offset aChildsusp"], [127, "mov rdi, rax"], [128, "mov eax, 0"], [129, "call sub_462F74"], [130, "mov rdx, [rbp+var_20]"], [131, "mov rax, [rbp+var_458]"], [132, "mov r8d, 0"], [133, "mov ecx, offset asc_47C450"], [134, "mov esi, offset aChildSuspended"], [135, "mov rdi, rax"], [136, "mov eax, 0"], [137, "call sub_462AC3"], [138, "jmp short loc_46A2A4"], [139, "mov rax, [rbp+var_458]"], [140, "mov edx, 0"], [141, "mov esi, offset aChildWaitStatu"], [142, "mov rdi, rax"], [143, "mov eax, 0"], [144, "call sub_462AC3"], [145, "add [rbp+var_8], 1"], [146, "mov eax, [rbp+var_8]"], [147, "cmp eax, [rbp+var_45C]"], [148, "jl loc_46A07F"], [149, "mov rax, [rbp+ptr]"], [150, "mov rdi, rax"], [151, "call _free"], [152, "cmp [rbp+fd], 0"], [153, "js loc_46A373"], [154, "lea rcx, [rbp+buf]"], [155, "mov eax, [rbp+fd]"], [156, "mov edx, 3E8h"], [157, "mov rsi, rcx"], [158, "mov edi, eax"], [159, "call _read"], [160, "mov [rbp+var_C], eax"], [161, "cmp [rbp+var_C], 0"], [162, "jz short loc_46A365"], [163, "cmp [rbp+var_C], 0"], [164, "jns short loc_46A330"], [165, "mov rax, [rbp+var_458]"], [166, "mov rdi, rax"], [167, "call sub_46BE10"], [168, "mov rdx, rax"], [169, "mov rax, [rbp+var_458]"], [170, "mov ecx, 0"], [171, "mov esi, offset aErrorReadingSt"], [172, "mov rdi, rax"], [173, "mov eax, 0"], [174, "call sub_462AC3"], [175, "jmp short loc_46A366"], [176, "mov eax, [rbp+var_C]"], [177, "cdqe"], [178, "mov [rbp+rax+buf], 0"], [179, "lea rcx, [rbp+buf]"], [180, "mov rax, [rbp+var_458]"], [181, "mov edx, 0"], [182, "mov rsi, rcx"], [183, "mov rdi, rax"], [184, "mov eax, 0"], [185, "call sub_462AC3"], [186, "jmp loc_46A2D3"], [187, "nop"], [188, "mov eax, [rbp+fd]"], [189, "mov edi, eax"], [190, "call _close"], [191, "mov rax, [rbp+var_458]"], [192, "mov rax, [rax]"], [193, "mov rdi, rax"], [194, "call _strlen"], [195, "mov [rbp+var_10], eax"], [196, "cmp [rbp+var_10], 0"], [197, "jle short loc_46A3C4"], [198, "mov rax, [rbp+var_458]"], [199, "mov rdx, [rax]"], [200, "mov eax, [rbp+var_10]"], [201, "cdqe"], [202, "sub rax, 1"], [203, "add rax, rdx"], [204, "movzx eax, byte ptr [rax]"], [205, "cmp al, 0Ah"], [206, "jnz short loc_46A3C4"], [207, "mov rax, [rbp+var_458]"], [208, "mov rdx, [rax]"], [209, "mov eax, [rbp+var_10]"], [210, "cdqe"], [211, "sub rax, 1"], [212, "add rax, rdx"], [213, "mov byte ptr [rax], 0"], [214, "mov eax, [rbp+var_4]"], [215, "leave"], [216, "retn"]], "data_dep": [[10, 8], [10, 145], [12, 63], [12, 26], [12, 140], [12, 16], [12, 130], [12, 96], [13, 5], [14, 13], [14, 99], [14, 28], [14, 14], [14, 133], [14, 62], [15, 13], [16, 15], [17, 14], [20, 19], [21, 20], [22, 21], [23, 3], [24, 23], [26, 25], [27, 3], [30, 27], [35, 34], [36, 35], [37, 36], [39, 38], [40, 39], [41, 40], [42, 41], [44, 20], [45, 41], [45, 36], [47, 45], [51, 50], [52, 51], [53, 52], [55, 54], [56, 55], [57, 55], [59, 57], [62, 14], [63, 56], [64, 3], [67, 64], [72, 71], [73, 72], [74, 73], [75, 74], [76, 75], [78, 77], [79, 78], [81, 80], [83, 82], [84, 83], [86, 85], [87, 81], [88, 44], [89, 3], [91, 87], [93, 89], [96, 81], [97, 3], [101, 97], [106, 105], [107, 106], [108, 107], [110, 109], [111, 110], [112, 111], [114, 113], [116, 115], [117, 116], [118, 117], [120, 119], [121, 114], [122, 44], [123, 3], [125, 121], [127, 123], [130, 114], [131, 3], [135, 131], [139, 3], [142, 139], [145, 8], [145, 145], [146, 8], [146, 145], [147, 146], [147, 4], [148, 147], [149, 5], [150, 149], [152, 6], [153, 152], [154, 179], [154, 133], [154, 99], [154, 62], [154, 28], [154, 14], [155, 6], [157, 154], [158, 155], [160, 159], [161, 160], [162, 161], [163, 160], [164, 163], [165, 3], [166, 165], [168, 167], [169, 3], [172, 169], [176, 160], [178, 176], [179, 154], [180, 3], [182, 179], [183, 180], [188, 6], [189, 188], [191, 3], [192, 191], [193, 192], [195, 194], [196, 195], [197, 196], [198, 3], [199, 198], [200, 195], [202, 200], [203, 202], [203, 199], [204, 203], [205, 204], [206, 205], [207, 3], [208, 207], [209, 195], [211, 209], [212, 211], [212, 208], [213, 212], [214, 7], [214, 43], [216, 214]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/b714b50430dc155167fb13379f4e00d79d775ccac764ece9ad5d0d56db016e15_b714b50430dc155167fb13379f4e00d79d775ccac764ece9ad5d0d56db016e15.jsonl.gz", "strip_func_name": "sub_46A047", "query": "\n\n\n__int64 __fastcall sub_46A047(const char **a1, int a2, char *a3, int a4)\n{\n__int64 v4; // rax\n__int64 v5; // r8\n__int64 v6; // r9\n__int64 v7; // rcx\n__int64 v8; // r8\n__int64 v9; // r9\n__int64 v10; // r9\n__int64 v11; // rax\n__int64 v12; // r9\n__int64 v13; // rax\n__int64 v14; // r9\n__int64 v15; // r8\n__int64 v16; // r9\n__int64 v17; // rax\n__int64 v18; // r8\n__int64 v19; // r9\nchar buf[1008]; // [rsp+20h] [rbp-450h] BYREF\nchar v24[32]; // [rsp+410h] [rbp-60h] BYREF\nchar s[20]; // [rsp+430h] [rbp-40h] BYREF\nint v26; // [rsp+444h] [rbp-2Ch] BYREF\n__int64 v27; // [rsp+448h] [rbp-28h]\n__int64 v28; // [rsp+450h] [rbp-20h]\nunsigned int v29; // [rsp+45Ch] [rbp-14h]\nint v30; // [rsp+460h] [rbp-10h]\nint v31; // [rsp+464h] [rbp-Ch]\nint i; // [rsp+468h] [rbp-8h]\nunsigned int v33; // [rsp+46Ch] [rbp-4h]\n\nv33 = 0;\nfor ( i = 0; i < a2; ++i )\n{\nv29 = sub_46AE61(1LL, &a3[4 * i], &v26);\nif ( v29 == -1 )\n{\nv4 = sub_46BE10(a1);\nsub_462AC3((__int64)a1, (__int64)\"error waiting for process to exit: \", v4, 0LL, v5, v6);\n}\nelse if ( (v26 & 0x7F) != 0 || BYTE1(v26) )\n{\nv33 = 1;\nsprintf(s, \"%d\", v29);\nif ( (v26 & 0x7F) != 0 )\n{\nif ( (char)((v26 & 0x7F) + 1) >> 1 <= 0 )\n{\nif ( (unsigned __int8)v26 == 127 )\n{\nv28 = sub_46A93F(BYTE1(v26));\nv13 = sub_46A824(BYTE1(v26));\nsub_462F74((__int64)a1, (__int64)\"CHILDSUSP\", (__int64)s, v13, v28, 0LL);\nsub_462AC3((__int64)a1, (__int64)\"child suspended: \", v28, (__int64)\"\\n\", 0LL, v14);\n}\nelse\n{\nsub_462AC3((__int64)a1, (__int64)\"child wait status didn't make sense\\n\", 0LL, v7, v8, v9);\n}\n}\nelse\n{\nv27 = sub_46A93F(v26 & 0x7F);\nv11 = sub_46A824(v26 & 0x7F);\nsub_462F74((__int64)a1, (__int64)\"CHILDKILLED\", (__int64)s, v11, v27, 0LL);\nsub_462AC3((__int64)a1, (__int64)\"child killed: \", v27, (__int64)\"\\n\", 0LL, v12);\n}\n}\nelse\n{\nsprintf(v24, \"%d\", BYTE1(v26));\nsub_462F74((__int64)a1, (__int64)\"CHILDSTATUS\", (__int64)s, (__int64)v24, 0LL, v10);\n}\n}\n}\nfree(a3);\nif ( a4 >= 0 )\n{\nwhile ( 1 )\n{\nv31 = read(a4, buf, 0x3E8uLL);\nif ( !v31 )\nbreak;\nif ( v31 < 0 )\n{\nv17 = sub_46BE10(a1);\nsub_462AC3((__int64)a1, (__int64)\"error reading stderr output file: \", v17, 0LL, v18, v19);\nbreak;\n}\nbuf[v31] = 0;\nsub_462AC3((__int64)a1, (__int64)buf, 0LL, (__int64)buf, v15, v16);\n}\nclose(a4);\n}\nv30 = strlen(*a1);\nif ( v30 > 0 && (*a1)[v30 - 1] == 10 )\n(*a1)[v30 - 1] = 0;\nreturn v33;\n}\n\n\n\nQ:[a3,a4,a1,a2,v7,buf,v24,s,v26,v27,v28,v29,v30,v31,v33,sub_46A047,sub_46AE61,sub_46BE10,sub_462AC3,sub_46A93F,sub_46A824,sub_462F74,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'pidPtr', 'a4': 'errorId', 'a1': 'interp', 'a2': 'numPids', 'v7': 'errorId', 'buf': 'buffer', 'v24': 'msg2', 's': 'msg1', 'v26': 'waitStatus', 'v27': 'p', 'v28': 'p_0', 'v29': 'pid', 'v30': 'length', 'v31': 'count', 'v33': 'result', 'sub_46A047': 'CleanupChildren', 'sub_46AE61': 'Tcl_WaitPids', 'sub_46BE10': 'Tcl_UnixError', 'sub_462AC3': 'Tcl_AppendResult', 'sub_46A93F': 'Tcl_SignalMsg', 'sub_46A824': 'Tcl_SignalId', 'sub_462F74': 'Tcl_SetErrorCode'}"}
client_set_state
16265d36e785b01ab7c4f58b3656e0c6d08390a77bbd0bef82e61eaee743327b
seanpringle
goomwwm
NA
void client_set_state(client *c, Atom state, int on) { if (on) client_add_state(c, state); else client_remove_state(c, state); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407FC7", "function_addr": 4227015, "binary_name": "16265d36e785b01ab7c4f58b3656e0c6d08390a77bbd0bef82e61eaee743327b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_14], edx"], [6, "cmp [rbp+var_14], 0"], [7, "jz short loc_407FF5"], [8, "mov rdx, [rbp+var_10]"], [9, "mov rax, [rbp+var_8]"], [10, "mov rsi, rdx"], [11, "mov rdi, rax"], [12, "call sub_407E34"], [13, "jmp short loc_408008"], [14, "mov rdx, [rbp+var_10]"], [15, "mov rax, [rbp+var_8]"], [16, "mov rsi, rdx"], [17, "mov rdi, rax"], [18, "call sub_407EAF"], [19, "nop"], [20, "leave"], [21, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 4], [9, 3], [10, 8], [11, 9], [14, 4], [15, 3], [16, 14], [17, 15], [21, 12], [21, 18]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/16265d36e785b01ab7c4f58b3656e0c6d08390a77bbd0bef82e61eaee743327b_16265d36e785b01ab7c4f58b3656e0c6d08390a77bbd0bef82e61eaee743327b.jsonl.gz", "strip_func_name": "sub_407FC7", "query": "\n\n\nint __fastcall sub_407FC7(__int64 a1, __int64 a2, int a3)\n{\nint result; // eax\n\nif ( a3 )\nresult = sub_407E34(a1, a2);\nelse\nresult = sub_407EAF(a1, a2);\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_407FC7,sub_407E34,sub_407EAF,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'on', 'a1': 'c', 'a2': 'state', 'sub_407FC7': 'client_set_state', 'sub_407E34': 'client_add_state', 'sub_407EAF': 'client_remove_state'}"}
tcc_set_error_func
b0a9cd2f3e4fb25c6201aa09bcf5782ae37b5367e290f1eed7e0432fa3739c0f
C-Chads
tinycc
NA
LIBTCCAPI void tcc_set_error_func(TCCState *s, void *error_opaque, TCCErrorFunc error_func) { s->error_opaque = error_opaque; s->error_func = error_func; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43BD13", "function_addr": 4439315, "binary_name": "b0a9cd2f3e4fb25c6201aa09bcf5782ae37b5367e290f1eed7e0432fa3739c0f.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_8]"], [6, "mov rdx, [rbp+var_10]"], [7, "mov [rax+108h], rdx"], [8, "mov rax, [rbp+var_8]"], [9, "mov rdx, [rbp+var_18]"], [10, "mov [rax+110h], rdx"], [11, "nop"], [12, "pop rbp"], [13, "retn"]], "data_dep": [[5, 2], [6, 3], [7, 6], [7, 5], [8, 2], [9, 4], [10, 8], [10, 9], [12, 0], [13, 8]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/b0a9cd2f3e4fb25c6201aa09bcf5782ae37b5367e290f1eed7e0432fa3739c0f_b0a9cd2f3e4fb25c6201aa09bcf5782ae37b5367e290f1eed7e0432fa3739c0f.jsonl.gz", "strip_func_name": "sub_43BD13", "query": "\n\n\n__int64 __fastcall sub_43BD13(__int64 a1, __int64 a2, __int64 a3)\n{\n__int64 result; // rax\n\n*(_QWORD *)(a1 + 264) = a2;\nresult = a1;\n*(_QWORD *)(a1 + 272) = a3;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_43BD13,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'error_func', 'a1': 's', 'a2': 'error_opaque', 'sub_43BD13': 'tcc_set_error_func'}"}
AcpiUtPushGenericState
1af1ae2e55417ac009d60b916804817b31888fa80e08f75439dc6c514c24a822
bitdefender
napoca
NA
void AcpiUtPushGenericState ( ACPI_GENERIC_STATE **ListHead, ACPI_GENERIC_STATE *State) { ACPI_FUNCTION_ENTRY (); /* Push the state object onto the front of the list (stack) */ State->Common.Next = *ListHead; *ListHead = State; return; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_48EAC9", "function_addr": 4778697, "binary_name": "1af1ae2e55417ac009d60b916804817b31888fa80e08f75439dc6c514c24a822.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "call sub_4895C9"], [6, "mov rax, [rbp+var_8]"], [7, "mov rdx, [rax]"], [8, "mov rax, [rbp+var_10]"], [9, "mov [rax], rdx"], [10, "mov rax, [rbp+var_8]"], [11, "mov rdx, [rbp+var_10]"], [12, "mov [rax], rdx"], [13, "nop"], [14, "leave"], [15, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 4], [9, 8], [9, 7], [10, 3], [11, 4], [12, 10], [12, 11], [15, 10]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1af1ae2e55417ac009d60b916804817b31888fa80e08f75439dc6c514c24a822_1af1ae2e55417ac009d60b916804817b31888fa80e08f75439dc6c514c24a822.jsonl.gz", "strip_func_name": "sub_48EAC9", "query": "\n\n\n_QWORD *__fastcall sub_48EAC9(_QWORD *a1, _QWORD *a2)\n{\n_QWORD *result; // rax\n\nsub_4895C9();\n*a2 = *a1;\nresult = a1;\n*a1 = a2;\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_48EAC9,sub_4895C9,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ListHead', 'a2': 'State', 'sub_48EAC9': 'AcpiUtPushGenericState', 'sub_4895C9': 'AcpiUtTrackStackPtr'}"}
re_node_set_remove_at
f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83
msysgit
msysgit
NA
static void internal_function re_node_set_remove_at (re_node_set *set, int idx) { if (idx < 0 || idx >= set->nelem) return; --set->nelem; for (; idx < set->nelem; idx++) set->elems[idx] = set->elems[idx + 1]; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_429A8D", "function_addr": 4364941, "binary_name": "f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83.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, "cmp [rbp+var_C], 0"], [5, "js short loc_429B00"], [6, "mov rax, [rbp+var_8]"], [7, "mov eax, [rax+4]"], [8, "cmp [rbp+var_C], eax"], [9, "jge short loc_429B00"], [10, "mov rax, [rbp+var_8]"], [11, "mov eax, [rax+4]"], [12, "lea edx, [rax-1]"], [13, "mov rax, [rbp+var_8]"], [14, "mov [rax+4], edx"], [15, "jmp short loc_429AF2"], [16, "mov rax, [rbp+var_8]"], [17, "mov rdx, [rax+8]"], [18, "mov eax, [rbp+var_C]"], [19, "cdqe"], [20, "add rax, 1"], [21, "shl rax, 2"], [22, "lea rcx, [rdx+rax]"], [23, "mov rax, [rbp+var_8]"], [24, "mov rdx, [rax+8]"], [25, "mov eax, [rbp+var_C]"], [26, "cdqe"], [27, "shl rax, 2"], [28, "add rdx, rax"], [29, "mov eax, [rcx]"], [30, "mov [rdx], eax"], [31, "add [rbp+var_C], 1"], [32, "mov rax, [rbp+var_8]"], [33, "mov eax, [rax+4]"], [34, "cmp [rbp+var_C], eax"], [35, "jl short loc_429ABD"], [36, "jmp short loc_429B01"], [37, "nop"], [38, "pop rbp"], [39, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 2], [7, 6], [8, 3], [8, 7], [9, 8], [10, 2], [11, 10], [12, 11], [13, 2], [14, 13], [14, 12], [16, 2], [17, 30], [17, 14], [17, 16], [18, 31], [18, 3], [20, 18], [21, 20], [22, 14], [22, 22], [22, 21], [22, 30], [23, 2], [24, 30], [24, 14], [24, 23], [25, 31], [25, 3], [27, 25], [28, 24], [28, 27], [29, 14], [29, 22], [29, 30], [30, 29], [30, 28], [31, 31], [31, 3], [32, 2], [33, 14], [33, 32], [33, 30], [34, 31], [34, 3], [34, 33], [35, 34], [38, 0], [39, 33], [39, 7]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83_f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83.jsonl.gz", "strip_func_name": "sub_429A8D", "query": "\n\n\n__int64 __fastcall sub_429A8D(__int64 a1, int a2)\n{\n__int64 result; // rax\nint v3; // [rsp+0h] [rbp-Ch]\n\nv3 = a2;\nif ( a2 >= 0 )\n{\nresult = *(unsigned int *)(a1 + 4);\nif ( a2 < (int)result )\n{\n--*(_DWORD *)(a1 + 4);\nwhile ( 1 )\n{\nresult = *(unsigned int *)(a1 + 4);\nif ( v3 >= (int)result )\nbreak;\n*(_DWORD *)(4LL * v3 + *(_QWORD *)(a1 + 8)) = *(_DWORD *)(*(_QWORD *)(a1 + 8) + 4 * (v3 + 1LL));\n++v3;\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,sub_429A8D,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'set', 'a2': 'idx', 'v3': 'idxa', 'sub_429A8D': 're_node_set_remove_at'}"}
_chart_write_title
2e7195e6bc11902cb1147d429b22ff6f7655de6050b37429b5d7074aaa0727e8
jmcnamara
libxlsxwriter
NA
STATIC void _chart_write_title(lxw_chart *self, lxw_chart_title *title) { if (title->name) { /* Write the c:title element. */ _chart_write_title_rich(self, title); } else if (title->range->formula) { /* Write the c:title element. */ _chart_write_title_formula(self, title); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44F670", "function_addr": 4519536, "binary_name": "2e7195e6bc11902cb1147d429b22ff6f7655de6050b37429b5d7074aaa0727e8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rax, [rbp+var_10]"], [6, "mov rax, [rax]"], [7, "test rax, rax"], [8, "jz short loc_44F6A1"], [9, "mov rdx, [rbp+var_10]"], [10, "mov rax, [rbp+var_8]"], [11, "mov rsi, rdx"], [12, "mov rdi, rax"], [13, "call sub_448046"], [14, "jmp short loc_44F6C4"], [15, "mov rax, [rbp+var_10]"], [16, "mov rax, [rax+20h]"], [17, "mov rax, [rax]"], [18, "test rax, rax"], [19, "jz short loc_44F6C4"], [20, "mov rdx, [rbp+var_10]"], [21, "mov rax, [rbp+var_8]"], [22, "mov rsi, rdx"], [23, "mov rdi, rax"], [24, "call sub_4480B8"], [25, "nop"], [26, "leave"], [27, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 7], [9, 4], [10, 3], [11, 9], [12, 10], [15, 4], [16, 15], [17, 16], [18, 17], [19, 18], [20, 4], [21, 3], [22, 20], [23, 21], [27, 13], [27, 18], [27, 24]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2e7195e6bc11902cb1147d429b22ff6f7655de6050b37429b5d7074aaa0727e8_2e7195e6bc11902cb1147d429b22ff6f7655de6050b37429b5d7074aaa0727e8.jsonl.gz", "strip_func_name": "sub_44F670", "query": "\n\n\nint __fastcall sub_44F670(FILE **a1, __int64 a2)\n{\n__int64 v2; // rax\n\nif ( *(_QWORD *)a2 )\n{\nLODWORD(v2) = sub_448046(a1, a2);\n}\nelse\n{\nv2 = **(_QWORD **)(a2 + 32);\nif ( v2 )\nLODWORD(v2) = sub_4480B8(a1, a2);\n}\nreturn v2;\n}\n\n\n\nQ:[a1,a2,sub_44F670,sub_448046,sub_4480B8,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'self', 'a2': 'title', 'sub_44F670': '_chart_write_title', 'sub_448046': '_chart_write_title_rich', 'sub_4480B8': '_chart_write_title_formula'}"}
as_config_add_host
8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2
aerospike
aerospike-tools-backup
NA
void as_config_add_host(as_config* config, const char* addr, uint16_t port) { add_host(config, cf_strdup(addr), NULL, port); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_414C51", "function_addr": 4279377, "binary_name": "8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 28h"], [4, "mov [rbp+var_18], rdi"], [5, "mov [rbp+var_20], rsi"], [6, "mov eax, edx"], [7, "mov [rbp+var_24], ax"], [8, "movzx ebx, [rbp+var_24]"], [9, "mov rax, [rbp+var_20]"], [10, "mov rdi, rax"], [11, "call sub_4472F3"], [12, "mov rsi, rax"], [13, "mov rax, [rbp+var_18]"], [14, "mov ecx, ebx"], [15, "mov edx, 0"], [16, "mov rdi, rax"], [17, "call sub_414BDC"], [18, "nop"], [19, "mov rbx, [rbp+var_8]"], [20, "leave"], [21, "retn"]], "data_dep": [[7, 6], [8, 7], [9, 5], [10, 9], [12, 11], [13, 4], [14, 8], [16, 13], [21, 17]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2_8e89f9502949c1a463a3dd08a58c3c7a60591689c0f4de603abd6f5993935ae2.jsonl.gz", "strip_func_name": "sub_414C51", "query": "\n\n\n_QWORD *__fastcall sub_414C51(__int64 *a1, __int64 a2, __int16 a3)\n{\n__int64 v4; // rax\n\nv4 = sub_4472F3(a2);\nreturn sub_414BDC(a1, v4, 0LL, a3);\n}\n\n\n\nQ:[a3,a1,a2,sub_414C51,sub_4472F3,sub_414BDC,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'port', 'a1': 'config', 'a2': 'addr', 'sub_414C51': 'as_config_add_host', 'sub_4472F3': 'cf_strdup', 'sub_414BDC': 'add_host'}"}
DecodeThumbBLTargetOperand
23b57fe50de11e692ac0fdc29e161ccb6cbe21a200aecc695b811f04513510b2
tandasat
cs_driver
NA
static DecodeStatus DecodeThumbBLTargetOperand(MCInst *Inst, unsigned Val, uint64_t Address, const void *Decoder) { // Val is passed in as S:J1:J2:imm10:imm11 // Note no trailing zero after imm11. Also the J1 and J2 values are from // the encoded instruction. So here change to I1 and I2 values via: // I1 = NOT(J1 EOR S); // I2 = NOT(J2 EOR S); // and build the imm32 with one trailing zero as documented: // imm32 = SignExtend(S:I1:I2:imm10:imm11:'0', 32); unsigned S = (Val >> 23) & 1; unsigned J1 = (Val >> 22) & 1; unsigned J2 = (Val >> 21) & 1; unsigned I1 = !(J1 ^ S); unsigned I2 = !(J2 ^ S); unsigned tmp = (Val & ~0x600000) | (I1 << 22) | (I2 << 21); int imm32 = SignExtend32(tmp << 1, 25); MCOperand_CreateImm0(Inst, imm32); return MCDisassembler_Success; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43C4FD", "function_addr": 4441341, "binary_name": "23b57fe50de11e692ac0fdc29e161ccb6cbe21a200aecc695b811f04513510b2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_2C], esi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_40], rcx"], [7, "mov eax, [rbp+var_2C]"], [8, "shr eax, 17h"], [9, "and eax, 1"], [10, "mov [rbp+var_4], eax"], [11, "mov eax, [rbp+var_2C]"], [12, "shr eax, 16h"], [13, "and eax, 1"], [14, "mov [rbp+var_8], eax"], [15, "mov eax, [rbp+var_2C]"], [16, "shr eax, 15h"], [17, "and eax, 1"], [18, "mov [rbp+var_C], eax"], [19, "mov eax, [rbp+var_8]"], [20, "cmp eax, [rbp+var_4]"], [21, "setz al"], [22, "movzx eax, al"], [23, "mov [rbp+var_10], eax"], [24, "mov eax, [rbp+var_C]"], [25, "cmp eax, [rbp+var_4]"], [26, "setz al"], [27, "movzx eax, al"], [28, "mov [rbp+var_14], eax"], [29, "mov eax, [rbp+var_2C]"], [30, "and eax, 0FF9FFFFFh"], [31, "mov edx, eax"], [32, "mov eax, [rbp+var_10]"], [33, "shl eax, 16h"], [34, "or edx, eax"], [35, "mov eax, [rbp+var_14]"], [36, "shl eax, 15h"], [37, "or eax, edx"], [38, "mov [rbp+var_18], eax"], [39, "mov eax, [rbp+var_18]"], [40, "add eax, eax"], [41, "mov esi, 19h"], [42, "mov edi, eax"], [43, "call sub_4053AD"], [44, "mov [rbp+var_1C], eax"], [45, "mov eax, [rbp+var_1C]"], [46, "movsxd rdx, eax"], [47, "mov rax, [rbp+var_28]"], [48, "mov rsi, rdx"], [49, "mov rdi, rax"], [50, "call sub_405338"], [51, "mov eax, 3"], [52, "leave"], [53, "retn"]], "data_dep": [[7, 4], [8, 7], [9, 8], [10, 9], [11, 4], [12, 11], [13, 12], [14, 13], [15, 4], [16, 15], [17, 16], [18, 17], [19, 14], [20, 10], [20, 19], [21, 19], [21, 20], [22, 21], [23, 22], [24, 18], [25, 10], [25, 24], [26, 24], [26, 25], [27, 26], [28, 27], [29, 4], [30, 29], [31, 30], [32, 23], [33, 32], [34, 31], [34, 33], [35, 28], [36, 35], [37, 36], [37, 34], [38, 37], [39, 38], [40, 39], [42, 40], [44, 43], [45, 44], [46, 45], [47, 3], [48, 46], [49, 47], [53, 51]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/23b57fe50de11e692ac0fdc29e161ccb6cbe21a200aecc695b811f04513510b2_23b57fe50de11e692ac0fdc29e161ccb6cbe21a200aecc695b811f04513510b2.jsonl.gz", "strip_func_name": "sub_43C4FD", "query": "\n\n\n__int64 __fastcall sub_43C4FD(__int64 a1, unsigned int a2)\n{\nint v3; // [rsp+24h] [rbp-1Ch]\n\nv3 = sub_4053AD(\n2\n* (((((a2 >> 22) & 1) == ((a2 >> 23) & 1)) << 22) | a2 & 0xFF9FFFFF | ((((a2 >> 21) & 1) == ((a2 >> 23) & 1)) << 21)),\n25);\nsub_405338(a1, v3);\nreturn 3LL;\n}\n\n\n\nQ:[a1,a2,sub_43C4FD,sub_4053AD,sub_405338,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'Inst', 'a2': 'Val', 'sub_43C4FD': 'DecodeThumbBLTargetOperand', 'sub_4053AD': 'SignExtend32', 'sub_405338': 'MCOperand_CreateImm0'}"}
str_node__delete
decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08
khadas
linux
NA
static void str_node__delete(struct str_node *snode, bool dupstr) { if (dupstr) zfree((char **)&snode->s); free(snode); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_47CE51", "function_addr": 4705873, "binary_name": "decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+ptr], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_1C], al"], [6, "mov rax, fs:28h"], [7, "mov [rbp+var_8], rax"], [8, "xor eax, eax"], [9, "cmp [rbp+var_1C], 0"], [10, "jz short loc_47CE99"], [11, "mov rax, [rbp+ptr]"], [12, "add rax, 18h"], [13, "mov rax, [rax]"], [14, "mov rdi, rax"], [15, "call _free"], [16, "mov rax, [rbp+ptr]"], [17, "add rax, 18h"], [18, "mov qword ptr [rax], 0"], [19, "mov rax, [rbp+ptr]"], [20, "mov rdi, rax"], [21, "call _free"], [22, "nop"], [23, "mov rax, [rbp+var_8]"], [24, "sub rax, fs:28h"], [25, "jz short locret_47CEBA"], [26, "call ___stack_chk_fail"], [27, "leave"], [28, "retn"]], "data_dep": [[5, 4], [7, 6], [9, 5], [10, 9], [11, 3], [12, 11], [13, 12], [14, 13], [16, 3], [17, 16], [18, 17], [19, 3], [20, 19], [23, 7], [24, 23], [25, 24], [28, 24]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08_decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08.jsonl.gz", "strip_func_name": "sub_47CE51", "query": "\n\n\nunsigned __int64 __fastcall sub_47CE51(void **a1, char a2)\n{\nunsigned __int64 v3; // [rsp+18h] [rbp-8h]\n\nv3 = __readfsqword(0x28u);\nif ( a2 )\n{\nfree(a1[3]);\na1[3] = 0LL;\n}\nfree(a1);\nreturn v3 - __readfsqword(0x28u);\n}\n\n\n\nQ:[a1,a2,sub_47CE51,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'snode', 'a2': 'dupstr', 'sub_47CE51': 'str_node__delete'}"}
print_power_limit_msr
88b297ed3b6e932b99641b5620aeec3cd941b4e06cb37924289772eefa3de8b7
trailofbits
ebpf-verifier
NA
void print_power_limit_msr(int cpu, unsigned long long msr, char *label) { fprintf(outf, "cpu%d: %s: %sabled (%f Watts, %f sec, clamp %sabled)\n", cpu, label, ((msr >> 15) & 1) ? "EN" : "DIS", ((msr >> 0) & 0x7FFF) * rapl_power_units, (1.0 + (((msr >> 22) & 0x3) / 4.0)) * (1 << ((msr >> 17) & 0x1F)) * rapl_time_units, (((msr >> 16) & 1) ? "EN" : "DIS")); return; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4117F1", "function_addr": 4265969, "binary_name": "88b297ed3b6e932b99641b5620aeec3cd941b4e06cb37924289772eefa3de8b7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_4], edi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rax, [rbp+var_10]"], [7, "and eax, 10000h"], [8, "test rax, rax"], [9, "jz short loc_41181A"], [10, "mov r8d, offset aEn"], [11, "jmp short loc_411820"], [12, "mov r8d, offset aDis"], [13, "mov rax, [rbp+var_10]"], [14, "shr rax, 16h"], [15, "and eax, 3"], [16, "test rax, rax"], [17, "js short loc_41183B"], [18, "pxor xmm0, xmm0"], [19, "cvtsi2sd xmm0, rax"], [20, "jmp short loc_411854"], [21, "mov rdx, rax"], [22, "shr rdx, 1"], [23, "and eax, 1"], [24, "or rdx, rax"], [25, "pxor xmm0, xmm0"], [26, "cvtsi2sd xmm0, rdx"], [27, "addsd xmm0, xmm0"], [28, "movsd xmm2, cs:qword_41B5D8"], [29, "movapd xmm1, xmm0"], [30, "divsd xmm1, xmm2"], [31, "movsd xmm0, cs:x"], [32, "addsd xmm1, xmm0"], [33, "mov rax, [rbp+var_10]"], [34, "shr rax, 11h"], [35, "and eax, 1Fh"], [36, "mov edx, 1"], [37, "mov ecx, eax"], [38, "shl edx, cl"], [39, "mov eax, edx"], [40, "pxor xmm0, xmm0"], [41, "cvtsi2sd xmm0, eax"], [42, "mulsd xmm1, xmm0"], [43, "movsd xmm0, cs:qword_421FD8"], [44, "movapd xmm2, xmm1"], [45, "mulsd xmm2, xmm0"], [46, "mov rax, [rbp+var_10]"], [47, "and eax, 7FFFh"], [48, "test rax, rax"], [49, "js short loc_4118BB"], [50, "pxor xmm0, xmm0"], [51, "cvtsi2sd xmm0, rax"], [52, "jmp short loc_4118D4"], [53, "mov rdx, rax"], [54, "shr rdx, 1"], [55, "and eax, 1"], [56, "or rdx, rax"], [57, "pxor xmm0, xmm0"], [58, "cvtsi2sd xmm0, rdx"], [59, "addsd xmm0, xmm0"], [60, "movsd xmm1, cs:qword_421FD0"], [61, "mulsd xmm0, xmm1"], [62, "movq rsi, xmm0"], [63, "mov rax, [rbp+var_10]"], [64, "and eax, 8000h"], [65, "test rax, rax"], [66, "jz short loc_4118FA"], [67, "mov edi, offset aEn"], [68, "jmp short loc_4118FF"], [69, "mov edi, offset aDis"], [70, "mov rax, cs:stream"], [71, "mov rcx, [rbp+var_18]"], [72, "mov edx, [rbp+var_4]"], [73, "mov r9, r8"], [74, "movapd xmm1, xmm2"], [75, "movq xmm0, rsi"], [76, "mov r8, rdi"], [77, "mov esi, offset aCpuDSSabledFWa"], [78, "mov rdi, rax"], [79, "mov eax, 2"], [80, "call _fprintf"], [81, "nop"], [82, "leave"], [83, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 7], [9, 8], [13, 4], [14, 13], [15, 14], [16, 15], [17, 16], [19, 18], [19, 16], [21, 16], [22, 21], [23, 16], [24, 23], [24, 22], [26, 24], [26, 25], [27, 26], [29, 19], [29, 27], [30, 29], [30, 28], [32, 31], [32, 30], [33, 4], [34, 33], [35, 34], [37, 35], [38, 37], [38, 36], [39, 38], [41, 40], [41, 39], [42, 32], [42, 41], [44, 42], [45, 43], [45, 44], [46, 4], [47, 46], [48, 47], [49, 48], [51, 50], [51, 48], [53, 48], [54, 53], [55, 48], [56, 55], [56, 54], [58, 56], [58, 57], [59, 58], [61, 51], [61, 60], [61, 59], [62, 61], [63, 4], [64, 63], [65, 64], [66, 65], [71, 5], [72, 3], [73, 10], [73, 12], [74, 45], [75, 62], [76, 67], [76, 69], [78, 70], [83, 80]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/88b297ed3b6e932b99641b5620aeec3cd941b4e06cb37924289772eefa3de8b7_88b297ed3b6e932b99641b5620aeec3cd941b4e06cb37924289772eefa3de8b7.jsonl.gz", "strip_func_name": "sub_4117F1", "query": "\n\n\nint __fastcall sub_4117F1(unsigned int a1, unsigned __int64 a2, const char *a3)\n{\nconst char *v3; // r8\nconst char *v4; // rdi\n\nif ( (a2 & 0x10000) != 0 )\nv3 = \"EN\";\nelse\nv3 = \"DIS\";\nif ( (a2 & 0x8000) != 0 )\nv4 = \"EN\";\nelse\nv4 = \"DIS\";\nreturn fprintf(\nstream,\n\"cpu%d: %s: %sabled (%f Watts, %f sec, clamp %sabled)\\n\",\na1,\na3,\nv4,\n(double)(a2 & 0x7FFF) * *(double *)&qword_421FD0,\n((double)((a2 >> 22) & 3) / 4.0 + 1.0) * (double)(1 << ((a2 >> 17) & 0x1F)) * *(double *)&qword_421FD8,\nv3);\n}\n\n\n\nQ:[a3,a1,a2,sub_4117F1,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'label', 'a1': 'cpu', 'a2': 'msr', 'sub_4117F1': 'print_power_limit_msr'}"}
xmkpackage
616268ddd6c2eb493b2c54efa19d29a7054ba3644d87315019eb9d0213d39602
dbetz
xlisp
NA
xlValue xmkpackage(void) { xlValue uses; xlVal = getpackagenamearg(); xlVal = xlNewPackage(xlGetString(xlVal)); if (xlGetKeyArg(k_uses,xlNil,&uses)) { xlCPush(uses); for (; xlConsP(uses); uses = xlCdr(uses)) xlUsePackage(nametopackage(xlCar(uses)),xlVal); xlDrop(1); } else { xlUsePackage(xlLispPackage,xlVal); xlUsePackage(xlLispPackage,xlVal); xlUsePackage(xlLispPackage,xlVal); } xlPopArgs(); return xlVal; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41CBF8", "function_addr": 4312056, "binary_name": "616268ddd6c2eb493b2c54efa19d29a7054ba3644d87315019eb9d0213d39602.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 18h"], [4, "call sub_41DAE9"], [5, "mov cs:qword_441AE8, rax"], [6, "mov rax, cs:qword_441AE8"], [7, "mov rax, [rax+10h]"], [8, "mov rdi, rax"], [9, "call sub_402CBD"], [10, "mov cs:qword_441AE8, rax"], [11, "mov rax, cs:qword_441CD8"], [12, "lea rdx, [rbp+var_18]"], [13, "mov esi, 0"], [14, "mov rdi, rax"], [15, "call sub_4215AB"], [16, "test eax, eax"], [17, "jz loc_41CCE7"], [18, "mov rax, cs:qword_441AF0"], [19, "lea rdx, [rax-8]"], [20, "mov rax, cs:qword_441AF8"], [21, "cmp rdx, rax"], [22, "ja short loc_41CC63"], [23, "call sub_409478"], [24, "mov rax, cs:qword_441AF0"], [25, "sub rax, 8"], [26, "mov cs:qword_441AF0, rax"], [27, "mov rax, cs:qword_441AF0"], [28, "mov rdx, [rbp+var_18]"], [29, "mov [rax], rdx"], [30, "jmp short loc_41CCB3"], [31, "mov rbx, cs:qword_441AE8"], [32, "mov rax, [rbp+var_18]"], [33, "mov rax, [rax+8]"], [34, "mov rdi, rax"], [35, "call sub_41DBE3"], [36, "mov rsi, rbx"], [37, "mov rdi, rax"], [38, "call sub_41358B"], [39, "mov rax, [rbp+var_18]"], [40, "mov rax, [rax+10h]"], [41, "mov [rbp+var_18], rax"], [42, "mov rax, [rbp+var_18]"], [43, "test rax, rax"], [44, "jz short loc_41CCD3"], [45, "mov rax, [rbp+var_18]"], [46, "and eax, 1"], [47, "test rax, rax"], [48, "jnz short loc_41CCD3"], [49, "mov rax, [rbp+var_18]"], [50, "movzx eax, byte ptr [rax]"], [51, "cmp al, 1"], [52, "jz short loc_41CC85"], [53, "mov rax, cs:qword_441AF0"], [54, "add rax, 8"], [55, "mov cs:qword_441AF0, rax"], [56, "jmp short loc_41CD32"], [57, "mov rdx, cs:qword_441AE8"], [58, "mov rax, cs:qword_4426D0"], [59, "mov rsi, rdx"], [60, "mov rdi, rax"], [61, "call sub_41358B"], [62, "mov rdx, cs:qword_441AE8"], [63, "mov rax, cs:qword_4426D0"], [64, "mov rsi, rdx"], [65, "mov rdi, rax"], [66, "call sub_41358B"], [67, "mov rdx, cs:qword_441AE8"], [68, "mov rax, cs:qword_4426D0"], [69, "mov rsi, rdx"], [70, "mov rdi, rax"], [71, "call sub_41358B"], [72, "mov rdx, cs:qword_441AF0"], [73, "mov eax, cs:dword_441D74"], [74, "cdqe"], [75, "shl rax, 3"], [76, "add rax, rdx"], [77, "mov cs:qword_441AF0, rax"], [78, "mov rax, cs:qword_441AE8"], [79, "mov rbx, [rbp+var_8]"], [80, "leave"], [81, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 7], [10, 9], [14, 11], [16, 15], [17, 16], [19, 12], [19, 18], [21, 19], [21, 20], [22, 21], [25, 24], [26, 25], [27, 26], [29, 28], [29, 27], [31, 10], [32, 41], [33, 29], [33, 32], [34, 33], [36, 31], [37, 35], [39, 41], [40, 29], [40, 39], [41, 40], [42, 41], [43, 42], [44, 43], [45, 41], [46, 45], [47, 46], [48, 47], [49, 41], [50, 49], [50, 29], [51, 50], [52, 51], [53, 26], [54, 53], [55, 54], [57, 10], [59, 57], [60, 58], [62, 10], [64, 62], [65, 63], [67, 10], [69, 67], [70, 68], [72, 55], [75, 73], [76, 72], [76, 75], [77, 76], [78, 10], [81, 78]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/616268ddd6c2eb493b2c54efa19d29a7054ba3644d87315019eb9d0213d39602_616268ddd6c2eb493b2c54efa19d29a7054ba3644d87315019eb9d0213d39602.jsonl.gz", "strip_func_name": "sub_41CBF8", "query": "\n\n\n__int64 sub_41CBF8()\n{\n__int64 v0; // rdi\nint v1; // ecx\nint v2; // er8\nint v3; // er9\n__int64 v4; // rbx\n__int64 v5; // rax\n__int64 v7; // [rsp+8h] [rbp-18h] BYREF\n\nqword_441AE8 = sub_41DAE9();\nqword_441AE8 = sub_402CBD(*(const char **)(qword_441AE8 + 16));\nv0 = qword_441CD8;\nif ( (unsigned int)sub_4215AB(qword_441CD8, 0LL, &v7) )\n{\nif ( qword_441AF0 - 8 <= (unsigned __int64)qword_441AF8 )\nsub_409478(v0, 0, qword_441AF0 - 8, v1, v2, v3);\nqword_441AF0 -= 8LL;\n*(_QWORD *)qword_441AF0 = v7;\nwhile ( v7 && (v7 & 1) == 0 && *(_BYTE *)v7 == 1 )\n{\nv4 = qword_441AE8;\nv5 = sub_41DBE3(*(_QWORD *)(v7 + 8));\nsub_41358B(v5, v4);\nv7 = *(_QWORD *)(v7 + 16);\n}\nqword_441AF0 += 8LL;\n}\nelse\n{\nsub_41358B(qword_4426D0, qword_441AE8);\nsub_41358B(qword_4426D0, qword_441AE8);\nsub_41358B(qword_4426D0, qword_441AE8);\n}\nqword_441AF0 += 8LL * dword_441D74;\nreturn qword_441AE8;\n}\n\n\n\nQ:[v7,sub_41CBF8,sub_41DAE9,sub_402CBD,sub_4215AB,sub_409478,sub_41DBE3,sub_41358B,]\nAssistant: ", "hints": "[]", "response": "{'v7': 'uses', 'sub_41CBF8': 'xmkpackage', 'sub_41DAE9': 'getpackagenamearg', 'sub_402CBD': 'xlNewPackage', 'sub_4215AB': 'xlGetKeyArg', 'sub_409478': 'xlStkOver', 'sub_41DBE3': 'nametopackage', 'sub_41358B': 'xlUsePackage'}"}
opMVCALL
616268ddd6c2eb493b2c54efa19d29a7054ba3644d87315019eb9d0213d39602
dbetz
xlisp
NA
static void opMVCALL(void) { xlValue argc = xlPop(); xlArgC = (int)xlGetSmallFixnum(argc); call(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4063D7", "function_addr": 4219863, "binary_name": "616268ddd6c2eb493b2c54efa19d29a7054ba3644d87315019eb9d0213d39602.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov rax, cs:qword_441AF0"], [4, "lea rdx, [rax+8]"], [5, "mov cs:qword_441AF0, rdx"], [6, "mov rax, [rax]"], [7, "mov [rbp+var_8], rax"], [8, "mov rax, [rbp+var_8]"], [9, "sar rax, 1"], [10, "mov cs:dword_441D74, eax"], [11, "call sub_40640D"], [12, "nop"], [13, "leave"], [14, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 6], [8, 7], [9, 8], [10, 9], [14, 11]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/616268ddd6c2eb493b2c54efa19d29a7054ba3644d87315019eb9d0213d39602_616268ddd6c2eb493b2c54efa19d29a7054ba3644d87315019eb9d0213d39602.jsonl.gz", "strip_func_name": "sub_4063D7", "query": "\n\n\n__int64 sub_4063D7()\n{\n__int64 *v0; // rax\n\nv0 = (__int64 *)qword_441AF0;\nqword_441AF0 += 8LL;\ndword_441D74 = *v0 >> 1;\nreturn sub_40640D();\n}\n\n\n\nQ:[sub_4063D7,sub_40640D,]\nAssistant: ", "hints": "[]", "response": "{'sub_4063D7': 'opMVCALL', 'sub_40640D': 'call'}"}
vec_add
126b1ee87ff76cc31312622fbeffde9677cca8e6dab1e9c7058b95c2f61a4062
snavely
shapecontext
NA
vec_t vec_add(vec_t u, vec_t v) { vec_t result = { 0, NULL }; int i; if (u.d != v.d) { printf("Error: added vectors must have same dimension\n"); return result; } result = vec_new(u.d); for (i = 0; i < u.d; i++) result.p[i] = u.p[i] + v.p[i]; return result; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43FD4D", "function_addr": 4455757, "binary_name": "126b1ee87ff76cc31312622fbeffde9677cca8e6dab1e9c7058b95c2f61a4062.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 48h"], [4, "mov rax, rsi"], [5, "mov r8d, edi"], [6, "mov rsi, r8"], [7, "mov rdi, r9"], [8, "mov rdi, rax"], [9, "mov [rbp+var_40], rsi"], [10, "mov [rbp+var_38], rdi"], [11, "mov eax, edx"], [12, "mov rdx, rcx"], [13, "mov [rbp+var_50], rax"], [14, "mov [rbp+var_48], rdx"], [15, "mov word ptr [rbp+var_30], 0"], [16, "mov [rbp+var_28], 0"], [17, "movzx edx, word ptr [rbp+var_40]"], [18, "movzx eax, word ptr [rbp+var_50]"], [19, "cmp dx, ax"], [20, "jz short loc_43FDA9"], [21, "mov edi, offset aErrorAddedVect"], [22, "call _puts"], [23, "mov rax, [rbp+var_30]"], [24, "mov rdx, [rbp+var_28]"], [25, "jmp short loc_43FE24"], [26, "movzx eax, word ptr [rbp+var_40]"], [27, "movzx eax, ax"], [28, "mov edi, eax"], [29, "call sub_43FCA4"], [30, "mov ecx, eax"], [31, "mov rax, rdx"], [32, "mov dword ptr [rbp+var_30], ecx"], [33, "mov [rbp+var_28], rax"], [34, "mov [rbp+var_14], 0"], [35, "jmp short loc_43FE10"], [36, "mov rdx, [rbp+var_38]"], [37, "mov eax, [rbp+var_14]"], [38, "cdqe"], [39, "shl rax, 3"], [40, "add rax, rdx"], [41, "movsd xmm1, qword ptr [rax]"], [42, "mov rdx, [rbp+var_48]"], [43, "mov eax, [rbp+var_14]"], [44, "cdqe"], [45, "shl rax, 3"], [46, "add rax, rdx"], [47, "movsd xmm0, qword ptr [rax]"], [48, "mov rdx, [rbp+var_28]"], [49, "mov eax, [rbp+var_14]"], [50, "cdqe"], [51, "shl rax, 3"], [52, "add rax, rdx"], [53, "addsd xmm0, xmm1"], [54, "movsd qword ptr [rax], xmm0"], [55, "add [rbp+var_14], 1"], [56, "movzx eax, word ptr [rbp+var_40]"], [57, "movzx eax, ax"], [58, "cmp [rbp+var_14], eax"], [59, "jl short loc_43FDCC"], [60, "mov rax, [rbp+var_30]"], [61, "mov rdx, [rbp+var_28]"], [62, "mov rcx, rax"], [63, "mov rbx, rdx"], [64, "mov eax, ecx"], [65, "mov rbx, [rbp+var_8]"], [66, "leave"], [67, "retn"]], "data_dep": [[6, 5], [8, 4], [9, 6], [10, 8], [13, 11], [14, 12], [17, 9], [18, 13], [19, 18], [19, 17], [20, 19], [23, 15], [24, 16], [26, 9], [27, 26], [28, 27], [30, 29], [31, 17], [32, 30], [33, 31], [36, 10], [37, 55], [37, 34], [39, 37], [40, 36], [40, 39], [41, 40], [41, 54], [42, 14], [43, 55], [43, 34], [45, 43], [46, 42], [46, 45], [47, 46], [47, 54], [48, 33], [49, 34], [49, 55], [51, 49], [52, 51], [52, 48], [53, 41], [53, 47], [54, 52], [54, 53], [55, 34], [55, 55], [56, 9], [57, 56], [58, 34], [58, 55], [58, 57], [59, 58], [60, 32], [61, 33], [62, 23], [62, 60], [63, 61], [63, 24], [64, 62], [67, 64]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/126b1ee87ff76cc31312622fbeffde9677cca8e6dab1e9c7058b95c2f61a4062_126b1ee87ff76cc31312622fbeffde9677cca8e6dab1e9c7058b95c2f61a4062.jsonl.gz", "strip_func_name": "sub_43FD4D", "query": "\n\n\n__int64 __fastcall sub_43FD4D(unsigned __int16 a1, __int64 a2, __int16 a3, __int64 a4)\n{\n__int64 result; // rax\n__int64 v5; // rdx\nint v7; // [rsp+20h] [rbp-30h]\nint v8; // [rsp+20h] [rbp-30h]\nint i; // [rsp+3Ch] [rbp-14h]\n\nLOWORD(v7) = 0;\nif ( a1 == a3 )\n{\nv8 = sub_43FCA4(a1);\nfor ( i = 0; i < a1; ++i )\n*(double *)(v5 + 8LL * i) = *(double *)(a4 + 8LL * i) + *(double *)(a2 + 8LL * i);\nLODWORD(result) = v8;\n}\nelse\n{\nputs(\"Error: added vectors must have same dimension\");\nLODWORD(result) = v7;\n}\nreturn (unsigned int)result;\n}\n\n\n\nQ:[v7,sub_43FD4D,sub_43FCA4,]\nAssistant: ", "hints": "[]", "response": "{'v7': 'result', 'sub_43FD4D': 'vec_add', 'sub_43FCA4': 'vec_new'}"}
handle_auth_challenge
24a2637591f28727b21989feacd6e39416a2c11ff374047913dc0e05514c7835
AonCyberLabs
D-Modem
NA
static pj_status_t handle_auth_challenge(pj_stun_session *sess, const pj_stun_tx_data *request, const pj_stun_msg *response, const pj_sockaddr_t *src_addr, unsigned src_addr_len, pj_bool_t *notify_user) { const pj_stun_errcode_attr *ea; *notify_user = PJ_TRUE; if (response==NULL) return PJ_SUCCESS; if (sess->auth_type != PJ_STUN_AUTH_LONG_TERM) return PJ_SUCCESS; if (!PJ_STUN_IS_ERROR_RESPONSE(response->hdr.type)) { sess->auth_retry = 0; return PJ_SUCCESS; } ea = (const pj_stun_errcode_attr*) pj_stun_msg_find_attr(response, PJ_STUN_ATTR_ERROR_CODE, 0); if (!ea) { PJ_LOG(4,(SNAME(sess), "Invalid error response: no ERROR-CODE" " attribute")); *notify_user = PJ_FALSE; return PJNATH_EINSTUNMSG; } if (ea->err_code == PJ_STUN_SC_UNAUTHORIZED || ea->err_code == PJ_STUN_SC_STALE_NONCE) { const pj_stun_nonce_attr *anonce; const pj_stun_realm_attr *arealm; pj_stun_tx_data *tdata; unsigned i; pj_status_t status; anonce = (const pj_stun_nonce_attr*) pj_stun_msg_find_attr(response, PJ_STUN_ATTR_NONCE, 0); if (!anonce) { PJ_LOG(4,(SNAME(sess), "Invalid response: missing NONCE")); *notify_user = PJ_FALSE; return PJNATH_EINSTUNMSG; } /* Bail out if we've supplied the correct nonce */ if (pj_strcmp(&anonce->value, &sess->next_nonce)==0) { return PJ_SUCCESS; } /* Bail out if we've tried too many */ if (++sess->auth_retry > 3) { PJ_LOG(4,(SNAME(sess), "Error: authentication failed (too " "many retries)")); return PJ_STATUS_FROM_STUN_CODE(401); } /* Save next_nonce */ pj_strdup(sess->pool, &sess->next_nonce, &anonce->value); /* Copy the realm from the response */ arealm = (pj_stun_realm_attr*) pj_stun_msg_find_attr(response, PJ_STUN_ATTR_REALM, 0); if (arealm) { pj_strdup(sess->pool, &sess->server_realm, &arealm->value); while (sess->server_realm.slen && !sess->server_realm.ptr[sess->server_realm.slen-1]) { --sess->server_realm.slen; } } /* Create new request */ status = pj_stun_session_create_req(sess, request->msg->hdr.type, request->msg->hdr.magic, NULL, &tdata); if (status != PJ_SUCCESS) return status; /* Duplicate all the attributes in the old request, except * USERNAME, REALM, M-I, and NONCE, which will be filled in * later. */ for (i=0; i<request->msg->attr_count; ++i) { const pj_stun_attr_hdr *asrc = request->msg->attr[i]; if (asrc->type == PJ_STUN_ATTR_USERNAME || asrc->type == PJ_STUN_ATTR_REALM || asrc->type == PJ_STUN_ATTR_MESSAGE_INTEGRITY || asrc->type == PJ_STUN_ATTR_NONCE) { continue; } tdata->msg->attr[tdata->msg->attr_count++] = pj_stun_attr_clone(tdata->pool, asrc); } /* Will retry the request with authentication, no need to * notify user. */ *notify_user = PJ_FALSE; PJ_LOG(4,(SNAME(sess), "Retrying request with new authentication")); /* Retry the request */ status = pj_stun_session_send_msg(sess, request->token, PJ_TRUE, request->retransmit, src_addr, src_addr_len, tdata); } else { sess->auth_retry = 0; } return PJ_SUCCESS; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41548C", "function_addr": 4281484, "binary_name": "24a2637591f28727b21989feacd6e39416a2c11ff374047913dc0e05514c7835.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r12"], [3, "push rbx"], [4, "sub rsp, 70h"], [5, "mov [rbp+var_58], rdi"], [6, "mov [rbp+var_60], rsi"], [7, "mov [rbp+var_68], rdx"], [8, "mov [rbp+var_70], rcx"], [9, "mov [rbp+var_74], r8d"], [10, "mov [rbp+var_80], r9"], [11, "mov rax, [rbp+var_80]"], [12, "mov dword ptr [rax], 1"], [13, "cmp [rbp+var_68], 0"], [14, "jnz short loc_4154CA"], [15, "mov eax, 0"], [16, "jmp loc_4158A7"], [17, "mov rax, [rbp+var_58]"], [18, "mov eax, [rax+43Ch]"], [19, "cmp eax, 2"], [20, "jz short loc_4154E3"], [21, "mov eax, 0"], [22, "jmp loc_4158A7"], [23, "mov rax, [rbp+var_68]"], [24, "movzx eax, word ptr [rax]"], [25, "movzx eax, ax"], [26, "and eax, 110h"], [27, "cmp eax, 110h"], [28, "jz short loc_415511"], [29, "mov rax, [rbp+var_58]"], [30, "mov dword ptr [rax+490h], 0"], [31, "mov eax, 0"], [32, "jmp loc_4158A7"], [33, "mov rax, [rbp+var_68]"], [34, "mov edx, 0"], [35, "mov esi, 9"], [36, "mov rdi, rax"], [37, "call sub_40B253"], [38, "mov [rbp+var_20], rax"], [39, "cmp [rbp+var_20], 0"], [40, "jnz short loc_41556E"], [41, "call sub_433007"], [42, "cmp eax, 3"], [43, "jle short loc_41555A"], [44, "mov rax, [rbp+var_58]"], [45, "mov rax, [rax+8]"], [46, "add rax, 10h"], [47, "mov esi, offset aInvalidErrorRe"], [48, "mov rdi, rax"], [49, "mov eax, 0"], [50, "call sub_43397B"], [51, "mov rax, [rbp+var_80]"], [52, "mov dword ptr [rax], 0"], [53, "mov eax, 5A551h"], [54, "jmp loc_4158A7"], [55, "mov rax, [rbp+var_20]"], [56, "mov eax, [rax+4]"], [57, "cmp eax, 191h"], [58, "jz short loc_41558E"], [59, "mov rax, [rbp+var_20]"], [60, "mov eax, [rax+4]"], [61, "cmp eax, 1B6h"], [62, "jnz loc_415894"], [63, "mov rax, [rbp+var_68]"], [64, "mov edx, 0"], [65, "mov esi, 15h"], [66, "mov rdi, rax"], [67, "call sub_40B253"], [68, "mov [rbp+var_28], rax"], [69, "cmp [rbp+var_28], 0"], [70, "jnz short loc_4155EB"], [71, "call sub_433007"], [72, "cmp eax, 3"], [73, "jle short loc_4155D7"], [74, "mov rax, [rbp+var_58]"], [75, "mov rax, [rax+8]"], [76, "add rax, 10h"], [77, "mov esi, offset aInvalidRespons"], [78, "mov rdi, rax"], [79, "mov eax, 0"], [80, "call sub_43397B"], [81, "mov rax, [rbp+var_80]"], [82, "mov dword ptr [rax], 0"], [83, "mov eax, 5A551h"], [84, "jmp loc_4158A7"], [85, "mov rax, [rbp+var_58]"], [86, "lea rdx, [rax+498h]"], [87, "mov rax, [rbp+var_28]"], [88, "add rax, 8"], [89, "mov rsi, rdx"], [90, "mov rdi, rax"], [91, "call sub_4400C7"], [92, "test eax, eax"], [93, "jnz short loc_415617"], [94, "mov eax, 0"], [95, "jmp loc_4158A7"], [96, "mov rax, [rbp+var_58]"], [97, "mov eax, [rax+490h]"], [98, "lea edx, [rax+1]"], [99, "mov rax, [rbp+var_58]"], [100, "mov [rax+490h], edx"], [101, "mov rax, [rbp+var_58]"], [102, "mov eax, [rax+490h]"], [103, "cmp eax, 3"], [104, "jle short loc_41566F"], [105, "call sub_433007"], [106, "cmp eax, 3"], [107, "jle short loc_415665"], [108, "mov rax, [rbp+var_58]"], [109, "mov rax, [rax+8]"], [110, "add rax, 10h"], [111, "mov esi, offset aErrorAuthentic"], [112, "mov rdi, rax"], [113, "mov eax, 0"], [114, "call sub_43397B"], [115, "mov eax, 5A6E1h"], [116, "jmp loc_4158A7"], [117, "mov rax, [rbp+var_28]"], [118, "lea rdx, [rax+8]"], [119, "mov rax, [rbp+var_58]"], [120, "lea rcx, [rax+498h]"], [121, "mov rax, [rbp+var_58]"], [122, "mov rax, [rax+8]"], [123, "mov rsi, rcx"], [124, "mov rdi, rax"], [125, "call sub_43FC2A"], [126, "mov rax, [rbp+var_68]"], [127, "mov edx, 0"], [128, "mov esi, 14h"], [129, "mov rdi, rax"], [130, "call sub_40B253"], [131, "mov [rbp+var_30], rax"], [132, "cmp [rbp+var_30], 0"], [133, "jz short loc_41572C"], [134, "mov rax, [rbp+var_30]"], [135, "lea rdx, [rax+8]"], [136, "mov rax, [rbp+var_58]"], [137, "lea rcx, [rax+4A8h]"], [138, "mov rax, [rbp+var_58]"], [139, "mov rax, [rax+8]"], [140, "mov rsi, rcx"], [141, "mov rdi, rax"], [142, "call sub_43FC2A"], [143, "jmp short loc_4156F8"], [144, "mov rax, [rbp+var_58]"], [145, "mov rax, [rax+4B0h]"], [146, "lea rdx, [rax-1]"], [147, "mov rax, [rbp+var_58]"], [148, "mov [rax+4B0h], rdx"], [149, "mov rax, [rbp+var_58]"], [150, "mov rax, [rax+4B0h]"], [151, "test rax, rax"], [152, "jz short loc_41572C"], [153, "mov rax, [rbp+var_58]"], [154, "mov rdx, [rax+4A8h]"], [155, "mov rax, [rbp+var_58]"], [156, "mov rax, [rax+4B0h]"], [157, "sub rax, 1"], [158, "add rax, rdx"], [159, "movzx eax, byte ptr [rax]"], [160, "test al, al"], [161, "jz short loc_4156DE"], [162, "mov rax, [rbp+var_60]"], [163, "mov rax, [rax+20h]"], [164, "mov edx, [rax+4]"], [165, "mov rax, [rbp+var_60]"], [166, "mov rax, [rax+20h]"], [167, "movzx eax, word ptr [rax]"], [168, "movzx esi, ax"], [169, "lea rcx, [rbp+var_48]"], [170, "mov rax, [rbp+var_58]"], [171, "mov r8, rcx"], [172, "mov ecx, 0"], [173, "mov rdi, rax"], [174, "call sub_41637E"], [175, "mov [rbp+var_34], eax"], [176, "cmp [rbp+var_34], 0"], [177, "jz short loc_41576E"], [178, "mov eax, [rbp+var_34]"], [179, "jmp loc_4158A7"], [180, "mov [rbp+var_14], 0"], [181, "jmp loc_41580C"], [182, "mov rax, [rbp+var_60]"], [183, "mov rax, [rax+20h]"], [184, "mov edx, [rbp+var_14]"], [185, "add rdx, 2"], [186, "mov rax, [rax+rdx*8+8]"], [187, "mov [rbp+var_40], rax"], [188, "mov rax, [rbp+var_40]"], [189, "movzx eax, word ptr [rax]"], [190, "cmp ax, 6"], [191, "jz short loc_415807"], [192, "mov rax, [rbp+var_40]"], [193, "movzx eax, word ptr [rax]"], [194, "cmp ax, 14h"], [195, "jz short loc_415807"], [196, "mov rax, [rbp+var_40]"], [197, "movzx eax, word ptr [rax]"], [198, "cmp ax, 8"], [199, "jz short loc_415807"], [200, "mov rax, [rbp+var_40]"], [201, "movzx eax, word ptr [rax]"], [202, "cmp ax, 15h"], [203, "jz short loc_415807"], [204, "mov rax, [rbp+var_48]"], [205, "mov rdx, [rax+10h]"], [206, "mov rax, [rbp+var_48]"], [207, "mov rbx, [rax+20h]"], [208, "mov rax, [rbp+var_48]"], [209, "mov rax, [rax+20h]"], [210, "mov r12d, [rax+14h]"], [211, "lea ecx, [r12+1]"], [212, "mov [rax+14h], ecx"], [213, "mov rax, [rbp+var_40]"], [214, "mov rsi, rax"], [215, "mov rdi, rdx"], [216, "call sub_40B2D7"], [217, "mov edx, r12d"], [218, "add rdx, 2"], [219, "mov [rbx+rdx*8+8], rax"], [220, "jmp short loc_415808"], [221, "nop"], [222, "add [rbp+var_14], 1"], [223, "mov rax, [rbp+var_60]"], [224, "mov rax, [rax+20h]"], [225, "mov eax, [rax+14h]"], [226, "cmp [rbp+var_14], eax"], [227, "jb loc_41577A"], [228, "mov rax, [rbp+var_80]"], [229, "mov dword ptr [rax], 0"], [230, "call sub_433007"], [231, "cmp eax, 3"], [232, "jle short loc_415852"], [233, "mov rax, [rbp+var_58]"], [234, "mov rax, [rax+8]"], [235, "add rax, 10h"], [236, "mov esi, offset aRetryingReques"], [237, "mov rdi, rax"], [238, "mov eax, 0"], [239, "call sub_43397B"], [240, "mov rcx, [rbp+var_48]"], [241, "mov rax, [rbp+var_60]"], [242, "mov edx, [rax+38h]"], [243, "mov rax, [rbp+var_60]"], [244, "mov rsi, [rax+28h]"], [245, "mov r8d, [rbp+var_74]"], [246, "mov rdi, [rbp+var_70]"], [247, "mov rax, [rbp+var_58]"], [248, "sub rsp, 8"], [249, "push rcx"], [250, "mov r9d, r8d"], [251, "mov r8, rdi"], [252, "mov ecx, edx"], [253, "mov edx, 1"], [254, "mov rdi, rax"], [255, "call sub_41696A"], [256, "add rsp, 10h"], [257, "mov [rbp+var_34], eax"], [258, "jmp short loc_4158A2"], [259, "mov rax, [rbp+var_58]"], [260, "mov dword ptr [rax+490h], 0"], [261, "mov eax, 0"], [262, "lea rsp, [rbp-10h]"], [263, "pop rbx"], [264, "pop r12"], [265, "pop rbp"], [266, "retn"]], "data_dep": [[11, 10], [12, 11], [13, 7], [14, 13], [17, 5], [18, 17], [18, 12], [19, 18], [20, 19], [23, 7], [24, 12], [24, 23], [25, 24], [26, 25], [27, 26], [28, 27], [29, 5], [30, 29], [33, 7], [36, 33], [38, 37], [39, 38], [40, 39], [42, 41], [43, 42], [44, 5], [45, 12], [45, 44], [46, 45], [48, 46], [51, 10], [52, 51], [55, 38], [56, 12], [56, 55], [57, 56], [58, 57], [59, 38], [60, 59], [60, 12], [61, 60], [62, 61], [63, 7], [66, 63], [68, 67], [69, 68], [70, 69], [72, 71], [73, 72], [74, 5], [75, 12], [75, 74], [76, 75], [78, 76], [81, 10], [82, 81], [85, 5], [86, 12], [86, 85], [86, 64], [87, 68], [88, 87], [89, 86], [90, 88], [92, 91], [93, 92], [96, 5], [97, 12], [97, 96], [97, 100], [98, 97], [98, 100], [98, 86], [98, 12], [99, 5], [100, 99], [100, 98], [101, 5], [102, 101], [102, 100], [103, 102], [104, 103], [106, 105], [107, 106], [108, 5], [109, 12], [109, 100], [109, 108], [110, 109], [112, 110], [117, 68], [118, 117], [118, 98], [118, 100], [118, 12], [119, 5], [120, 12], [120, 119], [120, 100], [121, 5], [122, 12], [122, 100], [122, 121], [123, 120], [124, 122], [126, 7], [129, 126], [131, 130], [132, 131], [133, 132], [134, 131], [135, 127], [135, 134], [135, 12], [135, 100], [136, 5], [137, 120], [137, 100], [137, 12], [137, 136], [138, 5], [139, 138], [139, 100], [139, 12], [140, 137], [141, 139], [144, 5], [145, 144], [145, 148], [145, 100], [145, 12], [146, 12], [146, 100], [146, 145], [146, 154], [146, 148], [147, 5], [148, 147], [148, 146], [149, 5], [150, 149], [150, 148], [150, 100], [150, 12], [151, 150], [152, 151], [153, 5], [154, 12], [154, 153], [154, 148], [154, 100], [155, 5], [156, 148], [156, 12], [156, 100], [156, 155], [157, 156], [158, 154], [158, 157], [159, 158], [159, 148], [159, 100], [159, 12], [160, 159], [161, 160], [162, 6], [163, 148], [163, 100], [163, 12], [163, 162], [164, 163], [164, 148], [164, 12], [164, 100], [165, 6], [166, 148], [166, 12], [166, 100], [166, 165], [167, 148], [167, 166], [167, 12], [167, 100], [168, 167], [169, 120], [169, 137], [170, 5], [171, 169], [173, 170], [175, 174], [176, 175], [177, 176], [178, 175], [182, 6], [183, 219], [183, 182], [183, 148], [183, 12], [183, 100], [183, 212], [184, 180], [184, 222], [185, 184], [186, 219], [186, 148], [186, 12], [186, 100], [186, 212], [186, 183], [187, 186], [188, 187], [189, 219], [189, 148], [189, 12], [189, 100], [189, 212], [189, 188], [190, 189], [191, 190], [192, 187], [193, 148], [193, 12], [193, 100], [193, 212], [193, 192], [193, 219], [194, 193], [195, 194], [196, 187], [197, 219], [197, 196], [197, 148], [197, 12], [197, 100], [197, 212], [198, 197], [199, 198], [200, 187], [201, 148], [201, 12], [201, 100], [201, 212], [201, 219], [201, 200], [202, 201], [203, 202], [205, 219], [205, 204], [205, 148], [205, 100], [205, 212], [205, 12], [207, 148], [207, 12], [207, 100], [207, 212], [207, 206], [207, 219], [209, 12], [209, 208], [209, 100], [209, 212], [209, 219], [209, 148], [210, 209], [210, 148], [210, 12], [210, 100], [210, 212], [210, 219], [211, 210], [211, 219], [211, 172], [211, 148], [211, 12], [211, 100], [211, 212], [211, 211], [212, 211], [212, 209], [213, 187], [214, 213], [215, 205], [217, 210], [218, 217], [219, 207], [219, 216], [222, 180], [222, 222], [223, 6], [224, 219], [224, 223], [224, 148], [224, 12], [224, 100], [224, 212], [225, 100], [225, 212], [225, 224], [225, 219], [225, 148], [225, 12], [226, 180], [226, 222], [226, 225], [227, 226], [228, 10], [229, 228], [231, 230], [232, 231], [233, 5], [234, 148], [234, 12], [234, 100], [234, 212], [234, 229], [234, 233], [234, 219], [235, 234], [237, 235], [241, 6], [242, 148], [242, 241], [242, 12], [242, 100], [242, 212], [242, 229], [242, 219], [243, 6], [244, 100], [244, 212], [244, 243], [244, 229], [244, 219], [244, 148], [244, 12], [245, 9], [246, 8], [247, 5], [248, 4], [249, 240], [250, 245], [251, 246], [252, 242], [254, 247], [256, 248], [257, 255], [259, 5], [260, 259], [262, 256], [262, 4], [263, 3], [264, 2], [265, 0], [266, 115], [266, 94], [266, 53], [266, 178], [266, 15], [266, 261], [266, 21], [266, 83], [266, 31]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/24a2637591f28727b21989feacd6e39416a2c11ff374047913dc0e05514c7835_24a2637591f28727b21989feacd6e39416a2c11ff374047913dc0e05514c7835.jsonl.gz", "strip_func_name": "sub_41548C", "query": "\n\n\n__int64 __fastcall sub_41548C(__int64 a1, __int64 a2, _WORD *a3, int a4, int a5, _DWORD *a6)\n{\nint v7; // edx\nint v8; // ecx\nint v9; // er8\nint v10; // er9\nint v11; // edx\nint v12; // ecx\nint v13; // er8\nint v14; // er9\n__int64 v15; // rdi\nint v16; // edx\nint v17; // ecx\nint v18; // er8\nint v19; // er9\n__int64 v20; // rdi\n__int64 v21; // rdx\n__int64 v22; // rbx\nunsigned int v23; // er12\nint v24; // edx\nint v25; // ecx\nint v26; // er8\nint v27; // er9\n__int64 v33; // [rsp+38h] [rbp-48h] BYREF\nunsigned __int16 *v34; // [rsp+40h] [rbp-40h]\nunsigned int v35; // [rsp+4Ch] [rbp-34h]\n__int64 v36; // [rsp+50h] [rbp-30h]\n__int64 v37; // [rsp+58h] [rbp-28h]\n__int64 v38; // [rsp+60h] [rbp-20h]\nunsigned int i; // [rsp+6Ch] [rbp-14h]\n\n*a6 = 1;\nif ( !a3 )\nreturn 0LL;\nif ( *(_DWORD *)(a1 + 1084) != 2 )\nreturn 0LL;\nif ( (*a3 & 0x110) != 272 )\n{\n*(_DWORD *)(a1 + 1168) = 0;\nreturn 0LL;\n}\nv38 = sub_40B253((__int64)a3, 9, 0);\nif ( !v38 )\n{\nif ( (int)sub_433007(a3) > 3 )\nsub_43397B(\n*(_DWORD *)(a1 + 8) + 16,\n(unsigned int)\"Invalid error response: no ERROR-CODE attribute\",\nv7,\nv8,\nv9,\nv10);\n*a6 = 0;\nreturn 370001LL;\n}\nif ( *(_DWORD *)(v38 + 4) != 401 && *(_DWORD *)(v38 + 4) != 438 )\n{\n*(_DWORD *)(a1 + 1168) = 0;\nreturn 0LL;\n}\nv37 = sub_40B253((__int64)a3, 21, 0);\nif ( !v37 )\n{\nif ( (int)sub_433007(a3) > 3 )\nsub_43397B(*(_DWORD *)(a1 + 8) + 16, (unsigned int)\"Invalid response: missing NONCE\", v11, v12, v13, v14);\n*a6 = 0;\nreturn 370001LL;\n}\nv15 = v37 + 8;\nif ( !(unsigned int)sub_4400C7(v37 + 8, a1 + 1176) )\nreturn 0LL;\nif ( (int)++*(_DWORD *)(a1 + 1168) <= 3 )\n{\nsub_43FC2A(*(_QWORD *)(a1 + 8), a1 + 1176, v37 + 8);\nv36 = sub_40B253((__int64)a3, 20, 0);\nif ( v36 )\n{\nsub_43FC2A(*(_QWORD *)(a1 + 8), a1 + 1192, v36 + 8);\nwhile ( *(_QWORD *)(a1 + 1200) && !*(_BYTE *)(*(_QWORD *)(a1 + 1192) + *(_QWORD *)(a1 + 1200) - 1LL) )\n--*(_QWORD *)(a1 + 1200);\n}\nv20 = a1;\nv35 = sub_41637E(a1, **(unsigned __int16 **)(a2 + 32), *(unsigned int *)(*(_QWORD *)(a2 + 32) + 4LL), 0LL, &v33);\nif ( v35 )\nreturn v35;\nfor ( i = 0; i < *(_DWORD *)(*(_QWORD *)(a2 + 32) + 20LL); ++i )\n{\nv34 = *(unsigned __int16 **)(*(_QWORD *)(a2 + 32) + 8 * (i + 2LL) + 8);\nif ( *v34 != 6 && *v34 != 20 && *v34 != 8 && *v34 != 21 )\n{\nv21 = *(_QWORD *)(v33 + 16);\nv22 = *(_QWORD *)(v33 + 32);\nv23 = *(_DWORD *)(v22 + 20);\n*(_DWORD *)(v22 + 20) = v23 + 1;\nv20 = v21;\n*(_QWORD *)(v22 + 8 * (v23 + 2LL) + 8) = sub_40B2D7(v21, v34);\n}\n}\n*a6 = 0;\nif ( (int)sub_433007(v20) > 3 )\nsub_43397B(*(_DWORD *)(a1 + 8) + 16, (unsigned int)\"Retrying request with new authentication\", v24, v25, v26, v27);\nv35 = sub_41696A(a1, *(_QWORD *)(a2 + 40), 1, *(_DWORD *)(a2 + 56), a4, a5, v33);\nreturn 0LL;\n}\nif ( (int)sub_433007(v15) > 3 )\nsub_43397B(\n*(_DWORD *)(a1 + 8) + 16,\n(unsigned int)\"Error: authentication failed (too many retries)\",\nv16,\nv17,\nv18,\nv19);\nreturn 370401LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,v12,v13,v10,v15,v33,v34,v35,v36,v37,v38,sub_41548C,sub_40B253,sub_433007,sub_43397B,sub_4400C7,sub_43FC2A,sub_41637E,sub_40B2D7,sub_41696A,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'response', 'a4': 'src_addr', 'a1': 'sess', 'a2': 'request', 'a5': 'src_addr_len', 'a6': 'notify_user', 'v12': 'src_addr', 'v13': 'src_addr_len', 'v10': 'notify_user', 'v15': 'sess', 'v33': 'tdata', 'v34': 'asrc', 'v35': 'status', 'v36': 'arealm', 'v37': 'anonce', 'v38': 'ea', 'sub_41548C': 'handle_auth_challenge', 'sub_40B253': 'pj_stun_msg_find_attr', 'sub_433007': 'pj_log_get_level', 'sub_43397B': 'pj_log_4', 'sub_4400C7': 'pj_strcmp', 'sub_43FC2A': 'pj_strdup', 'sub_41637E': 'pj_stun_session_create_req', 'sub_40B2D7': 'pj_stun_attr_clone', 'sub_41696A': 'pj_stun_session_send_msg'}"}
CLEANUP_output_show_open
5a624d8d514e5e32cdeca29df98b8a01acc2e5dae4f5e11178902b3cb5c9d86c
bi-zone
masscan-ng
NA
static void CLEANUP_output_show_open(struct Masscan *masscan, const char *name) { UNUSEDPARM(name); UNUSEDPARM(masscan); return; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40C4DD", "function_addr": 4244701, "binary_name": "5a624d8d514e5e32cdeca29df98b8a01acc2e5dae4f5e11178902b3cb5c9d86c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_10], rsi"], [4, "nop"], [5, "pop rbp"], [6, "retn"]], "data_dep": [[5, 0]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5a624d8d514e5e32cdeca29df98b8a01acc2e5dae4f5e11178902b3cb5c9d86c_5a624d8d514e5e32cdeca29df98b8a01acc2e5dae4f5e11178902b3cb5c9d86c.jsonl.gz", "strip_func_name": "sub_40C4DD", "query": "\n\n\nvoid sub_40C4DD()\n{\n;\n}\n\n\n\nQ:[sub_40C4DD,]\nAssistant: ", "hints": "[]", "response": "{'sub_40C4DD': 'CLEANUP_output_show_open'}"}
AL_Dpb_ReleaseDisplayBuffer
5e2a239e524ee6c8d1db011c62e19bf6e5a376e8054688e7b0fce1f13117e67f
Xilinx
vcu-ctrl-sw
NA
uint8_t AL_Dpb_ReleaseDisplayBuffer(AL_TDpb* pDpb) { DPB_GET_MUTEX(pDpb); uint8_t uFrmID = DispFifo_Dequeue(&pDpb->DispFifo); AL_TDpbCallback* cb = &pDpb->tCallbacks; if(uFrmID != UndefID) cb->pfnDecrementFrmBuf(cb->pUserParam, uFrmID); DPB_RELEASE_MUTEX(pDpb); return uFrmID; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_444825", "function_addr": 4474917, "binary_name": "5e2a239e524ee6c8d1db011c62e19bf6e5a376e8054688e7b0fce1f13117e67f.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+8B0h]"], [6, "mov rdi, rax"], [7, "call sub_4280D3"], [8, "mov rax, [rbp+var_18]"], [9, "add rax, 6E8h"], [10, "mov rdi, rax"], [11, "call sub_4421C5"], [12, "mov [rbp+var_1], al"], [13, "mov rax, [rbp+var_18]"], [14, "add rax, 0A80h"], [15, "mov [rbp+var_10], rax"], [16, "cmp [rbp+var_1], 0FFh"], [17, "jz short loc_444888"], [18, "mov rax, [rbp+var_10]"], [19, "mov rcx, [rax+8]"], [20, "movzx edx, [rbp+var_1]"], [21, "mov rax, [rbp+var_10]"], [22, "mov rax, [rax+28h]"], [23, "mov esi, edx"], [24, "mov rdi, rax"], [25, "call rcx"], [26, "mov rax, [rbp+var_18]"], [27, "mov rax, [rax+8B0h]"], [28, "mov rdi, rax"], [29, "call sub_428113"], [30, "movzx eax, [rbp+var_1]"], [31, "leave"], [32, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [8, 3], [9, 8], [10, 9], [12, 11], [13, 3], [14, 13], [15, 14], [16, 12], [17, 16], [18, 15], [19, 18], [20, 12], [21, 15], [22, 21], [23, 20], [24, 22], [25, 19], [26, 3], [27, 26], [28, 27], [30, 12], [32, 30]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5e2a239e524ee6c8d1db011c62e19bf6e5a376e8054688e7b0fce1f13117e67f_5e2a239e524ee6c8d1db011c62e19bf6e5a376e8054688e7b0fce1f13117e67f.jsonl.gz", "strip_func_name": "sub_444825", "query": "\n\n\n__int64 __fastcall sub_444825(__int64 a1)\n{\nunsigned __int8 v2; // [rsp+1Fh] [rbp-1h]\n\nsub_4280D3(*(pthread_mutex_t **)(a1 + 2224));\nv2 = sub_4421C5(a1 + 1768);\nif ( v2 != 0xFF )\n(*(void (__fastcall **)(_QWORD, _QWORD))(a1 + 2696))(*(_QWORD *)(a1 + 2728), v2);\nsub_428113(*(pthread_mutex_t **)(a1 + 2224));\nreturn v2;\n}\n\n\n\nQ:[a1,v2,sub_444825,sub_4280D3,sub_4421C5,sub_428113,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pDpb', 'v2': 'uFrmID', 'sub_444825': 'AL_Dpb_ReleaseDisplayBuffer', 'sub_4280D3': 'Rtos_GetMutex', 'sub_4421C5': 'DispFifo_Dequeue', 'sub_428113': 'Rtos_ReleaseMutex'}"}
print_line_count
f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83
msysgit
msysgit
NA
static void print_line_count(FILE *file, int count) { switch (count) { case 0: fprintf(file, "0,0"); break; case 1: fprintf(file, "1"); break; default: fprintf(file, "1,%d", count); break; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_47399D", "function_addr": 4667805, "binary_name": "f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+s], rdi"], [4, "mov [rbp+var_C], esi"], [5, "cmp [rbp+var_C], 0"], [6, "jz short loc_4739BA"], [7, "cmp [rbp+var_C], 1"], [8, "jz short loc_4739D7"], [9, "jmp short loc_4739EA"], [10, "mov rax, [rbp+s]"], [11, "mov rcx, rax"], [12, "mov edx, 3"], [13, "mov esi, 1"], [14, "mov edi, offset a00"], [15, "call _fwrite"], [16, "jmp short loc_473A04"], [17, "mov rax, [rbp+s]"], [18, "mov rsi, rax"], [19, "mov edi, 31h "], [20, "call _fputc"], [21, "jmp short loc_473A04"], [22, "mov edx, [rbp+var_C]"], [23, "mov rax, [rbp+s]"], [24, "mov esi, offset a1D"], [25, "mov rdi, rax"], [26, "mov eax, 0"], [27, "call _fprintf"], [28, "nop"], [29, "nop"], [30, "leave"], [31, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 4], [8, 7], [10, 3], [11, 10], [17, 3], [18, 17], [22, 4], [23, 3], [25, 23], [31, 27], [31, 20], [31, 15]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83_f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83.jsonl.gz", "strip_func_name": "sub_47399D", "query": "\n\n\nint __fastcall sub_47399D(FILE *a1, unsigned int a2)\n{\nif ( !a2 )\nreturn fwrite(\"0,0\", 1uLL, 3uLL, a1);\nif ( a2 == 1 )\nreturn fputc(49, a1);\nreturn fprintf(a1, \"1,%d\", a2);\n}\n\n\n\nQ:[a1,a2,sub_47399D,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'file', 'a2': 'count', 'sub_47399D': 'print_line_count'}"}
asm_parse_numeric_reg
827407bc4b54c18411de29380a852137fa0a765e5473dda1980d82ef7496637e
vlang
tcc
NA
static int asm_parse_numeric_reg(int t, unsigned int *type) { int reg = -1; if (t >= TOK_IDENT && t < tok_ident) { const char *s = table_ident[t - TOK_IDENT]->str; char c; *type = OP_REG64; if (*s == 'c') { s++; *type = OP_CR; } if (*s++ != 'r') return -1; /* Don't allow leading '0'. */ if ((c = *s++) >= '1' && c <= '9') reg = c - '0'; else return -1; if ((c = *s) >= '0' && c <= '5') s++, reg = reg * 10 + c - '0'; if (reg > 15) return -1; if ((c = *s) == 0) ; else if (*type != OP_REG64) return -1; else if (c == 'b' && !s[1]) *type = OP_REG8; else if (c == 'w' && !s[1]) *type = OP_REG16; else if (c == 'd' && !s[1]) *type = OP_REG32; else return -1; } return reg; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_426D8B", "function_addr": 4353419, "binary_name": "827407bc4b54c18411de29380a852137fa0a765e5473dda1980d82ef7496637e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_24], edi"], [3, "mov [rbp+var_30], rsi"], [4, "mov [rbp+var_4], 0FFFFFFFFh"], [5, "cmp [rbp+var_24], 0FFh"], [6, "jle loc_426F23"], [7, "mov eax, cs:dword_4443A0"], [8, "cmp [rbp+var_24], eax"], [9, "jge loc_426F23"], [10, "mov rdx, cs:qword_4443A8"], [11, "mov eax, [rbp+var_24]"], [12, "cdqe"], [13, "shl rax, 3"], [14, "sub rax, 800h"], [15, "add rax, rdx"], [16, "mov rax, [rax]"], [17, "add rax, 30h "], [18, "mov [rbp+var_10], rax"], [19, "mov rax, [rbp+var_30]"], [20, "mov dword ptr [rax], 8"], [21, "mov rax, [rbp+var_10]"], [22, "movzx eax, byte ptr [rax]"], [23, "cmp al, 63h "], [24, "jnz short loc_426E01"], [25, "add [rbp+var_10], 1"], [26, "mov rax, [rbp+var_30]"], [27, "mov dword ptr [rax], 40h "], [28, "mov rax, [rbp+var_10]"], [29, "lea rdx, [rax+1]"], [30, "mov [rbp+var_10], rdx"], [31, "movzx eax, byte ptr [rax]"], [32, "cmp al, 72h "], [33, "jz short loc_426E1E"], [34, "mov eax, 0FFFFFFFFh"], [35, "jmp loc_426F26"], [36, "mov rax, [rbp+var_10]"], [37, "lea rdx, [rax+1]"], [38, "mov [rbp+var_10], rdx"], [39, "movzx eax, byte ptr [rax]"], [40, "mov [rbp+var_11], al"], [41, "cmp [rbp+var_11], 30h "], [42, "jle short loc_426E58"], [43, "cmp [rbp+var_11], 39h "], [44, "jg short loc_426E58"], [45, "movsx eax, [rbp+var_11]"], [46, "sub eax, 30h "], [47, "mov [rbp+var_4], eax"], [48, "mov rax, [rbp+var_10]"], [49, "movzx eax, byte ptr [rax]"], [50, "mov [rbp+var_11], al"], [51, "cmp [rbp+var_11], 2Fh "], [52, "jg short loc_426E62"], [53, "jmp short loc_426E87"], [54, "mov eax, 0FFFFFFFFh"], [55, "jmp loc_426F26"], [56, "cmp [rbp+var_11], 35h "], [57, "jg short loc_426E87"], [58, "add [rbp+var_10], 1"], [59, "mov edx, [rbp+var_4]"], [60, "mov eax, edx"], [61, "shl eax, 2"], [62, "add eax, edx"], [63, "add eax, eax"], [64, "mov edx, eax"], [65, "movsx eax, [rbp+var_11]"], [66, "add eax, edx"], [67, "sub eax, 30h "], [68, "mov [rbp+var_4], eax"], [69, "cmp [rbp+var_4], 0Fh"], [70, "jle short loc_426E97"], [71, "mov eax, 0FFFFFFFFh"], [72, "jmp loc_426F26"], [73, "mov rax, [rbp+var_10]"], [74, "movzx eax, byte ptr [rax]"], [75, "mov [rbp+var_11], al"], [76, "cmp [rbp+var_11], 0"], [77, "jz short loc_426F23"], [78, "mov rax, [rbp+var_30]"], [79, "mov eax, [rax]"], [80, "cmp eax, 8"], [81, "jz short loc_426EB9"], [82, "mov eax, 0FFFFFFFFh"], [83, "jmp short loc_426F26"], [84, "cmp [rbp+var_11], 62h "], [85, "jnz short loc_426EDA"], [86, "mov rax, [rbp+var_10]"], [87, "add rax, 1"], [88, "movzx eax, byte ptr [rax]"], [89, "test al, al"], [90, "jnz short loc_426EDA"], [91, "mov rax, [rbp+var_30]"], [92, "mov dword ptr [rax], 1"], [93, "jmp short loc_426F23"], [94, "cmp [rbp+var_11], 77h "], [95, "jnz short loc_426EFB"], [96, "mov rax, [rbp+var_10]"], [97, "add rax, 1"], [98, "movzx eax, byte ptr [rax]"], [99, "test al, al"], [100, "jnz short loc_426EFB"], [101, "mov rax, [rbp+var_30]"], [102, "mov dword ptr [rax], 2"], [103, "jmp short loc_426F23"], [104, "cmp [rbp+var_11], 64h "], [105, "jnz short loc_426F1C"], [106, "mov rax, [rbp+var_10]"], [107, "add rax, 1"], [108, "movzx eax, byte ptr [rax]"], [109, "test al, al"], [110, "jnz short loc_426F1C"], [111, "mov rax, [rbp+var_30]"], [112, "mov dword ptr [rax], 4"], [113, "jmp short loc_426F23"], [114, "mov eax, 0FFFFFFFFh"], [115, "jmp short loc_426F26"], [116, "mov eax, [rbp+var_4]"], [117, "pop rbp"], [118, "retn"]], "data_dep": [[5, 2], [6, 5], [8, 2], [8, 7], [9, 8], [11, 2], [13, 11], [14, 13], [15, 14], [15, 10], [16, 15], [17, 16], [18, 17], [19, 3], [20, 19], [21, 18], [22, 21], [22, 20], [23, 22], [24, 23], [25, 18], [26, 3], [27, 26], [28, 18], [28, 25], [29, 27], [29, 20], [29, 10], [29, 28], [30, 29], [31, 28], [31, 20], [31, 27], [32, 31], [33, 32], [36, 30], [37, 27], [37, 36], [37, 20], [37, 29], [38, 37], [39, 27], [39, 20], [39, 36], [40, 39], [41, 40], [42, 41], [43, 40], [44, 43], [45, 40], [46, 45], [47, 46], [48, 38], [49, 48], [49, 27], [49, 20], [50, 49], [51, 50], [52, 51], [56, 50], [57, 56], [58, 38], [59, 47], [60, 59], [61, 60], [62, 59], [62, 61], [63, 62], [64, 63], [65, 50], [66, 64], [66, 65], [67, 66], [68, 67], [69, 68], [69, 47], [70, 69], [73, 38], [73, 58], [74, 73], [74, 27], [74, 20], [75, 74], [76, 75], [77, 76], [78, 3], [79, 78], [79, 27], [79, 20], [80, 79], [81, 80], [84, 75], [85, 84], [86, 38], [86, 58], [87, 86], [88, 87], [88, 27], [88, 20], [89, 88], [90, 89], [91, 3], [92, 91], [94, 75], [95, 94], [96, 58], [96, 38], [97, 96], [98, 27], [98, 20], [98, 97], [99, 98], [100, 99], [101, 3], [102, 101], [104, 75], [105, 104], [106, 38], [106, 58], [107, 106], [108, 20], [108, 107], [108, 27], [109, 108], [110, 109], [111, 3], [112, 111], [116, 47], [116, 4], [116, 68], [117, 0], [118, 71], [118, 34], [118, 82], [118, 114], [118, 116], [118, 54]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/827407bc4b54c18411de29380a852137fa0a765e5473dda1980d82ef7496637e_827407bc4b54c18411de29380a852137fa0a765e5473dda1980d82ef7496637e.jsonl.gz", "strip_func_name": "sub_426D8B", "query": "\n\n\n__int64 __fastcall sub_426D8B(int a1, _DWORD *a2)\n{\n_BYTE *v2; // rax\nchar *v4; // rax\nchar v5; // [rsp+1Fh] [rbp-11h]\nchar v6; // [rsp+1Fh] [rbp-11h]\nchar v7; // [rsp+1Fh] [rbp-11h]\n_BYTE *v8; // [rsp+20h] [rbp-10h]\nchar *v9; // [rsp+20h] [rbp-10h]\nchar *v10; // [rsp+20h] [rbp-10h]\nint v11; // [rsp+2Ch] [rbp-4h]\n\nv11 = -1;\nif ( a1 > 255 && a1 < dword_4443A0 )\n{\nv8 = (_BYTE *)(*(_QWORD *)(qword_4443A8 + 8LL * a1 - 2048) + 48LL);\n*a2 = 8;\nif ( *v8 == 99 )\n{\n++v8;\n*a2 = 64;\n}\nv2 = v8;\nv9 = v8 + 1;\nif ( *v2 != 114 )\nreturn 0xFFFFFFFFLL;\nv4 = v9;\nv10 = v9 + 1;\nv5 = *v4;\nif ( *v4 <= 48 || v5 > 57 )\nreturn 0xFFFFFFFFLL;\nv11 = v5 - 48;\nv6 = *v10;\nif ( *v10 > 47 && v6 <= 53 )\n{\n++v10;\nv11 = 10 * v11 + v6 - 48;\n}\nif ( v11 > 15 )\nreturn 0xFFFFFFFFLL;\nv7 = *v10;\nif ( *v10 )\n{\nif ( *a2 != 8 )\nreturn 0xFFFFFFFFLL;\nif ( v7 != 98 || v10[1] )\n{\nif ( v7 != 119 || v10[1] )\n{\nif ( v7 != 100 || v10[1] )\nreturn 0xFFFFFFFFLL;\n*a2 = 4;\n}\nelse\n{\n*a2 = 2;\n}\n}\nelse\n{\n*a2 = 1;\n}\n}\n}\nreturn (unsigned int)v11;\n}\n\n\n\nQ:[a1,a2,v6,v8,v11,sub_426D8B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 't', 'a2': 'type', 'v6': 'ca', 'v8': 's', 'v11': 'reg', 'sub_426D8B': 'asm_parse_numeric_reg'}"}
sb_getenc
5b6938bad03d81d7259ab119b0f98b7e32e338e7e13a62d83a386dfdf4ee2b55
goodform
RediSearch
NA
static stemmer_encoding_t sb_getenc(const char * charenc) { struct stemmer_encoding * encoding; if (charenc == NULL) return ENC_UTF_8; for (encoding = encodings; encoding->name != 0; encoding++) { if (strcmp(encoding->name, charenc) == 0) break; } if (encoding->name == NULL) return ENC_UNKNOWN; return encoding->enc; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401964", "function_addr": 4200804, "binary_name": "5b6938bad03d81d7259ab119b0f98b7e32e338e7e13a62d83a386dfdf4ee2b55.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+s2], rdi"], [4, "cmp [rbp+s2], 0"], [5, "jnz short loc_40197E"], [6, "mov eax, 4"], [7, "jmp short locret_4019D0"], [8, "mov [rbp+var_8], offset off_4690E0"], [9, "jmp short loc_4019A7"], [10, "mov rax, [rbp+var_8]"], [11, "mov rax, [rax]"], [12, "mov rdx, [rbp+s2]"], [13, "mov rsi, rdx"], [14, "mov rdi, rax"], [15, "call _strcmp"], [16, "test eax, eax"], [17, "jz short loc_4019B5"], [18, "add [rbp+var_8], 10h"], [19, "mov rax, [rbp+var_8]"], [20, "mov rax, [rax]"], [21, "test rax, rax"], [22, "jnz short loc_401988"], [23, "jmp short loc_4019B6"], [24, "nop"], [25, "mov rax, [rbp+var_8]"], [26, "mov rax, [rax]"], [27, "test rax, rax"], [28, "jnz short loc_4019C9"], [29, "mov eax, 0"], [30, "jmp short locret_4019D0"], [31, "mov rax, [rbp+var_8]"], [32, "mov eax, [rax+8]"], [33, "leave"], [34, "retn"]], "data_dep": [[4, 3], [5, 4], [10, 18], [10, 8], [11, 10], [12, 3], [13, 12], [14, 11], [16, 15], [17, 16], [18, 18], [18, 8], [19, 18], [19, 8], [20, 19], [21, 20], [22, 21], [25, 18], [25, 8], [26, 25], [27, 26], [28, 27], [31, 8], [31, 18], [32, 31], [34, 6], [34, 29], [34, 32]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5b6938bad03d81d7259ab119b0f98b7e32e338e7e13a62d83a386dfdf4ee2b55_5b6938bad03d81d7259ab119b0f98b7e32e338e7e13a62d83a386dfdf4ee2b55.jsonl.gz", "strip_func_name": "sub_401964", "query": "\n\n\n__int64 __fastcall sub_401964(const char *a1)\n{\n__int64 result; // rax\nchar **i; // [rsp+18h] [rbp-8h]\n\nif ( !a1 )\nreturn 4LL;\nfor ( i = &off_4690E0; *i && strcmp(*i, a1); i += 2 )\n;\nif ( *i )\nresult = *((unsigned int *)i + 2);\nelse\nresult = 0LL;\nreturn result;\n}\n\n\n\nQ:[a1,i,sub_401964,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'charenc', 'i': 'encoding', 'sub_401964': 'sb_getenc'}"}
parse_args
329c3cadee189a95e5f50a83f07f1c01882f7ec39708ae42a195f395fc38ceb3
ChenThread
candyk-psx
NA
int parse_args(settings_t* settings, int argc, char** argv) { int c; while ((c = getopt(argc, argv, "t:f:b:c:F:C:")) != -1) { switch (c) { case 't': { if (strcmp(optarg, "xa") == 0) { settings->format = FORMAT_XA; } else if (strcmp(optarg, "xacd") == 0) { settings->format = FORMAT_XACD; } else if (strcmp(optarg, "spu") == 0) { settings->format = FORMAT_SPU; } else if (strcmp(optarg, "str2") == 0) { settings->format = FORMAT_STR2; } else { fprintf(stderr, "Invalid format: %s\n", optarg); return -1; } } break; case 'f': { settings->frequency = atoi(optarg); } break; case 'b': { settings->bits_per_sample = atoi(optarg); if (settings->bits_per_sample != 4) { fprintf(stderr, "Invalid bit depth: %d\n", settings->frequency); return -1; } } break; case 'c': { int ch = atoi(optarg); if (ch <= 0 || ch > 2) { fprintf(stderr, "Invalid channel count: %d\n", ch); return -1; } settings->stereo = (ch == 2 ? 1 : 0); } break; case 'F': { settings->file_number = atoi(optarg); if (settings->file_number < 0 || settings->file_number > 255) { fprintf(stderr, "Invalid file number: %d\n", settings->file_number); return -1; } } break; case 'C': { settings->channel_number = atoi(optarg); if (settings->channel_number < 0 || settings->channel_number > 31) { fprintf(stderr, "Invalid channel number: %d\n", settings->channel_number); return -1; } } break; case '?': case 'h': { print_help(); return -1; } break; } } if (settings->format == FORMAT_XA || settings->format == FORMAT_XACD) { if (settings->frequency != PSX_AUDIO_XA_FREQ_SINGLE && settings->frequency != PSX_AUDIO_XA_FREQ_DOUBLE) { fprintf(stderr, "Invalid frequency: %d Hz\n", settings->frequency); return -1; } } if (settings->format == FORMAT_SPU) { settings->stereo = false; } return optind; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405425", "function_addr": 4215845, "binary_name": "329c3cadee189a95e5f50a83f07f1c01882f7ec39708ae42a195f395fc38ceb3.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+argc], esi"], [5, "mov [rbp+argv], rdx"], [6, "jmp def_405456"], [7, "mov eax, [rbp+var_4]"], [8, "sub eax, 3Fh "], [9, "cmp eax, 35h"], [10, "ja def_405456"], [11, "mov eax, eax"], [12, "mov rax, ds:jpt_405456[rax*8]"], [13, "jmp rax"], [14, "mov rax, cs:optarg"], [15, "mov esi, offset s2"], [16, "mov rdi, rax"], [17, "call _strcmp"], [18, "test eax, eax"], [19, "jnz short loc_40547F"], [20, "mov rax, [rbp+var_18]"], [21, "mov dword ptr [rax], 0"], [22, "jmp def_405456"], [23, "mov rax, cs:optarg"], [24, "mov esi, offset aXacd"], [25, "mov rdi, rax"], [26, "call _strcmp"], [27, "test eax, eax"], [28, "jnz short loc_4054A6"], [29, "mov rax, [rbp+var_18]"], [30, "mov dword ptr [rax], 1"], [31, "jmp def_405456"], [32, "mov rax, cs:optarg"], [33, "mov esi, offset aSpu"], [34, "mov rdi, rax"], [35, "call _strcmp"], [36, "test eax, eax"], [37, "jnz short loc_4054CD"], [38, "mov rax, [rbp+var_18]"], [39, "mov dword ptr [rax], 2"], [40, "jmp def_405456"], [41, "mov rax, cs:optarg"], [42, "mov esi, offset aStr2"], [43, "mov rdi, rax"], [44, "call _strcmp"], [45, "test eax, eax"], [46, "jnz short loc_4054F4"], [47, "mov rax, [rbp+var_18]"], [48, "mov dword ptr [rax], 3"], [49, "jmp def_405456"], [50, "mov rdx, cs:optarg"], [51, "mov rax, cs:stderr"], [52, "mov esi, offset aInvalidFormatS"], [53, "mov rdi, rax"], [54, "mov eax, 0"], [55, "call _fprintf"], [56, "mov eax, 0FFFFFFFFh"], [57, "jmp locret_405737"], [58, "mov rax, cs:optarg"], [59, "mov rdi, rax"], [60, "call _atoi"], [61, "mov rdx, [rbp+var_18]"], [62, "mov [rdx+8], eax"], [63, "jmp def_405456"], [64, "mov rax, cs:optarg"], [65, "mov rdi, rax"], [66, "call _atoi"], [67, "mov rdx, [rbp+var_18]"], [68, "mov [rdx+0Ch], eax"], [69, "mov rax, [rbp+var_18]"], [70, "mov eax, [rax+0Ch]"], [71, "cmp eax, 4"], [72, "jz def_405456"], [73, "mov rax, [rbp+var_18]"], [74, "mov edx, [rax+8]"], [75, "mov rax, cs:stderr"], [76, "mov esi, offset aInvalidBitDept"], [77, "mov rdi, rax"], [78, "mov eax, 0"], [79, "call _fprintf"], [80, "mov eax, 0FFFFFFFFh"], [81, "jmp locret_405737"], [82, "mov rax, cs:optarg"], [83, "mov rdi, rax"], [84, "call _atoi"], [85, "mov [rbp+var_8], eax"], [86, "cmp [rbp+var_8], 0"], [87, "jle short loc_4055A7"], [88, "cmp [rbp+var_8], 2"], [89, "jle short loc_4055CD"], [90, "mov rax, cs:stderr"], [91, "mov edx, [rbp+var_8]"], [92, "mov esi, offset aInvalidChannel"], [93, "mov rdi, rax"], [94, "mov eax, 0"], [95, "call _fprintf"], [96, "mov eax, 0FFFFFFFFh"], [97, "jmp locret_405737"], [98, "cmp [rbp+var_8], 2"], [99, "setz dl"], [100, "mov rax, [rbp+var_18]"], [101, "mov [rax+4], dl"], [102, "jmp def_405456"], [103, "mov rax, cs:optarg"], [104, "mov rdi, rax"], [105, "call _atoi"], [106, "mov rdx, [rbp+var_18]"], [107, "mov [rdx+10h], eax"], [108, "mov rax, [rbp+var_18]"], [109, "mov eax, [rax+10h]"], [110, "test eax, eax"], [111, "js short loc_405613"], [112, "mov rax, [rbp+var_18]"], [113, "mov eax, [rax+10h]"], [114, "cmp eax, 0FFh"], [115, "jle def_405456"], [116, "mov rax, [rbp+var_18]"], [117, "mov edx, [rax+10h]"], [118, "mov rax, cs:stderr"], [119, "mov esi, offset aInvalidFileNum"], [120, "mov rdi, rax"], [121, "mov eax, 0"], [122, "call _fprintf"], [123, "mov eax, 0FFFFFFFFh"], [124, "jmp locret_405737"], [125, "mov rax, cs:optarg"], [126, "mov rdi, rax"], [127, "call _atoi"], [128, "mov rdx, [rbp+var_18]"], [129, "mov [rdx+14h], eax"], [130, "mov rax, [rbp+var_18]"], [131, "mov eax, [rax+14h]"], [132, "test eax, eax"], [133, "js short loc_40566A"], [134, "mov rax, [rbp+var_18]"], [135, "mov eax, [rax+14h]"], [136, "cmp eax, 1Fh"], [137, "jle short def_405456"], [138, "mov rax, [rbp+var_18]"], [139, "mov edx, [rax+14h]"], [140, "mov rax, cs:stderr"], [141, "mov esi, offset aInvalidChannel_0"], [142, "mov rdi, rax"], [143, "mov eax, 0"], [144, "call _fprintf"], [145, "mov eax, 0FFFFFFFFh"], [146, "jmp locret_405737"], [147, "call sub_4052D4"], [148, "mov eax, 0FFFFFFFFh"], [149, "jmp locret_405737"], [150, "mov rcx, [rbp+argv]"], [151, "mov eax, [rbp+argc]"], [152, "mov edx, offset shortopts"], [153, "mov rsi, rcx"], [154, "mov edi, eax"], [155, "call _getopt"], [156, "mov [rbp+var_4], eax"], [157, "cmp [rbp+var_4], 0FFFFFFFFh"], [158, "jnz loc_40543D"], [159, "mov rax, [rbp+var_18]"], [160, "mov eax, [rax]"], [161, "test eax, eax"], [162, "jz short loc_4056DB"], [163, "mov rax, [rbp+var_18]"], [164, "mov eax, [rax]"], [165, "cmp eax, 1"], [166, "jnz short loc_40571E"], [167, "mov rax, [rbp+var_18]"], [168, "mov eax, [rax+8]"], [169, "cmp eax, 49D4h"], [170, "jz short loc_40571E"], [171, "mov rax, [rbp+var_18]"], [172, "mov eax, [rax+8]"], [173, "cmp eax, 93A8h"], [174, "jz short loc_40571E"], [175, "mov rax, [rbp+var_18]"], [176, "mov edx, [rax+8]"], [177, "mov rax, cs:stderr"], [178, "mov esi, offset aInvalidFrequen"], [179, "mov rdi, rax"], [180, "mov eax, 0"], [181, "call _fprintf"], [182, "mov eax, 0FFFFFFFFh"], [183, "jmp short locret_405737"], [184, "mov rax, [rbp+var_18]"], [185, "mov eax, [rax]"], [186, "cmp eax, 2"], [187, "jnz short loc_405731"], [188, "mov rax, [rbp+var_18]"], [189, "mov byte ptr [rax+4], 0"], [190, "mov eax, cs:optind"], [191, "leave"], [192, "retn"]], "data_dep": [[7, 156], [8, 7], [9, 8], [10, 9], [11, 8], [13, 12], [16, 14], [18, 17], [19, 18], [20, 3], [21, 20], [25, 23], [27, 26], [28, 27], [29, 3], [30, 29], [34, 32], [36, 35], [37, 36], [38, 3], [39, 38], [43, 41], [45, 44], [46, 45], [47, 3], [48, 47], [53, 51], [59, 58], [61, 3], [62, 60], [62, 61], [65, 64], [67, 3], [68, 66], [68, 67], [69, 3], [70, 68], [70, 69], [71, 70], [72, 71], [73, 3], [74, 73], [74, 48], [74, 68], [74, 107], [74, 129], [74, 101], [74, 21], [74, 30], [74, 39], [74, 62], [77, 75], [83, 82], [85, 84], [86, 85], [87, 86], [88, 85], [89, 88], [91, 85], [93, 90], [98, 85], [99, 152], [99, 98], [100, 3], [101, 99], [101, 100], [104, 103], [106, 3], [107, 106], [107, 105], [108, 3], [109, 108], [109, 107], [110, 109], [111, 110], [112, 3], [113, 101], [113, 21], [113, 30], [113, 39], [113, 62], [113, 48], [113, 112], [113, 68], [113, 107], [113, 129], [114, 113], [115, 114], [116, 3], [117, 101], [117, 21], [117, 30], [117, 39], [117, 48], [117, 62], [117, 68], [117, 107], [117, 116], [117, 129], [120, 118], [126, 125], [128, 3], [129, 128], [129, 127], [130, 3], [131, 129], [131, 130], [132, 131], [133, 132], [134, 3], [135, 129], [135, 62], [135, 101], [135, 21], [135, 30], [135, 39], [135, 48], [135, 107], [135, 68], [135, 134], [136, 135], [137, 136], [138, 3], [139, 62], [139, 101], [139, 21], [139, 30], [139, 39], [139, 48], [139, 107], [139, 68], [139, 129], [139, 138], [142, 140], [150, 5], [151, 4], [153, 150], [154, 151], [156, 155], [157, 156], [158, 157], [159, 3], [160, 21], [160, 30], [160, 39], [160, 48], [160, 107], [160, 68], [160, 159], [160, 129], [160, 62], [160, 101], [161, 160], [162, 161], [163, 3], [164, 101], [164, 21], [164, 30], [164, 39], [164, 48], [164, 107], [164, 68], [164, 129], [164, 163], [164, 62], [165, 164], [166, 165], [167, 3], [168, 107], [168, 68], [168, 129], [168, 62], [168, 101], [168, 21], [168, 30], [168, 39], [168, 48], [168, 167], [169, 168], [170, 169], [171, 3], [172, 68], [172, 129], [172, 62], [172, 101], [172, 21], [172, 30], [172, 39], [172, 48], [172, 107], [172, 171], [173, 172], [174, 173], [175, 3], [176, 30], [176, 39], [176, 48], [176, 107], [176, 68], [176, 175], [176, 129], [176, 62], [176, 101], [176, 21], [179, 177], [184, 3], [185, 107], [185, 68], [185, 184], [185, 129], [185, 21], [185, 62], [185, 101], [185, 30], [185, 39], [185, 48], [186, 185], [187, 186], [188, 3], [189, 188], [192, 145], [192, 56], [192, 190], [192, 96], [192, 80], [192, 148], [192, 123], [192, 182]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/329c3cadee189a95e5f50a83f07f1c01882f7ec39708ae42a195f395fc38ceb3_329c3cadee189a95e5f50a83f07f1c01882f7ec39708ae42a195f395fc38ceb3.jsonl.gz", "strip_func_name": "sub_405425", "query": "\n\n\n__int64 __fastcall sub_405425(__int64 a1, int a2, char *const *a3)\n{\nint v3; // eax\n__int64 result; // rax\nint v6; // [rsp+28h] [rbp-8h]\n\nv3 = getopt(a2, a3, \"t:f:b:c:F:C:\");\nwhile ( v3 != -1 )\n{\nswitch ( v3 )\n{\ncase '?':\ncase 'h':\nsub_4052D4();\nreturn 0xFFFFFFFFLL;\ncase 'C':\n*(_DWORD *)(a1 + 20) = atoi(optarg);\nif ( *(int *)(a1 + 20) >= 0 && *(int *)(a1 + 20) <= 31 )\ngoto LABEL_26;\nfprintf(stderr, \"Invalid channel number: %d\\n\", *(unsigned int *)(a1 + 20));\nreturn 0xFFFFFFFFLL;\ncase 'F':\n*(_DWORD *)(a1 + 16) = atoi(optarg);\nif ( *(int *)(a1 + 16) >= 0 && *(int *)(a1 + 16) <= 255 )\ngoto LABEL_26;\nfprintf(stderr, \"Invalid file number: %d\\n\", *(unsigned int *)(a1 + 16));\nreturn 0xFFFFFFFFLL;\ncase 'b':\n*(_DWORD *)(a1 + 12) = atoi(optarg);\nif ( *(_DWORD *)(a1 + 12) == 4 )\ngoto LABEL_26;\nfprintf(stderr, \"Invalid bit depth: %d\\n\", *(unsigned int *)(a1 + 8));\nreturn 0xFFFFFFFFLL;\ncase 'c':\nv6 = atoi(optarg);\nif ( v6 > 0 && v6 <= 2 )\n{\n*(_BYTE *)(a1 + 4) = v6 == 2;\ngoto LABEL_26;\n}\nfprintf(stderr, \"Invalid channel count: %d\\n\", (unsigned int)v6);\nreturn 0xFFFFFFFFLL;\ncase 'f':\n*(_DWORD *)(a1 + 8) = atoi(optarg);\ngoto LABEL_26;\ncase 't':\nif ( !strcmp(optarg, \"xa\") )\n{\n*(_DWORD *)a1 = 0;\n}\nelse if ( !strcmp(optarg, \"xacd\") )\n{\n*(_DWORD *)a1 = 1;\n}\nelse if ( !strcmp(optarg, \"spu\") )\n{\n*(_DWORD *)a1 = 2;\n}\nelse\n{\nif ( strcmp(optarg, \"str2\") )\n{\nfprintf(stderr, \"Invalid format: %s\\n\", optarg);\nreturn 0xFFFFFFFFLL;\n}\n*(_DWORD *)a1 = 3;\n}\nLABEL_26:\nv3 = getopt(a2, a3, \"t:f:b:c:F:C:\");\nbreak;\ndefault:\ngoto LABEL_26;\n}\n}\nif ( *(_DWORD *)a1 && *(_DWORD *)a1 != 1 || *(_DWORD *)(a1 + 8) == 18900 || *(_DWORD *)(a1 + 8) == 37800 )\n{\nif ( *(_DWORD *)a1 == 2 )\n*(_BYTE *)(a1 + 4) = 0;\nresult = (unsigned int)optind;\n}\nelse\n{\nfprintf(stderr, \"Invalid frequency: %d Hz\\n\", *(unsigned int *)(a1 + 8));\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v3,v6,sub_405425,sub_4052D4,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'argv', 'a1': 'settings', 'a2': 'argc', 'v3': 'result', 'v6': 'ch_0', 'sub_405425': 'parse_args', 'sub_4052D4': 'print_help'}"}
write_table
3ece931a62f518c5d6d2aba459c770497c790e221ea4fac41a6f026c92b6a264
darwin-on-arm
darwin-sdk
NA
static void write_table(def) definition *def; { version_list *vp; proc_list *proc; int current; int expected; char progvers[100]; int warning; for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { warning = 0; s_print(progvers, "%s_%s", locase(def->def_name), vp->vers_num); /* print the table header */ f_print(fout, tbl_hdr, progvers); if (nullproc(vp->procs)) { expected = 0; } else { expected = 1; f_print(fout, "%s", null_entry); } for (proc = vp->procs; proc != NULL; proc = proc->next) { if (expected != 0) f_print(fout, "\n"); current = atoi(proc->proc_num); if (current != expected++) { f_print(fout, "/*\n * WARNING: table out of order\n */\n\n"); if (warning == 0) { f_print(stderr, "WARNING %s table is out of order\n", progvers); warning = 1; nonfatalerrors = 1; } expected = current + 1; } f_print(fout, "\t(char *(*)())RPCGEN_ACTION("); /* routine to invoke */ if (!newstyle) pvname_svc(proc->proc_name, vp->vers_num); else { if (newstyle) f_print(fout, "_"); /* calls internal func */ pvname(proc->proc_name, vp->vers_num); } f_print(fout, "),\n"); /* argument info */ if (proc->arg_num > 1) printit((char *) NULL, proc->args.argname); else /* do we have to do something special for * newstyle */ printit(proc->args.decls->decl.prefix, proc->args.decls->decl.type); /* result info */ printit(proc->res_prefix, proc->res_type); } /* print the table trailer */ f_print(fout, "%s", tbl_end); f_print(fout, tbl_nproc, progvers, progvers, progvers); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40CC3B", "function_addr": 4246587, "binary_name": "3ece931a62f518c5d6d2aba459c770497c790e221ea4fac41a6f026c92b6a264.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 98h"], [4, "mov [rbp+var_98], rdi"], [5, "mov rax, [rbp+var_98]"], [6, "mov rax, [rax+18h]"], [7, "mov [rbp+var_18], rax"], [8, "jmp loc_40CF06"], [9, "mov [rbp+var_28], 0"], [10, "mov rax, [rbp+var_18]"], [11, "mov rbx, [rax+8]"], [12, "mov rax, [rbp+var_98]"], [13, "mov rax, [rax]"], [14, "mov rdi, rax"], [15, "call sub_40D443"], [16, "mov rdx, rax"], [17, "lea rax, [rbp+s]"], [18, "mov rcx, rbx"], [19, "mov esi, offset aSS_5"], [20, "mov rdi, rax"], [21, "mov eax, 0"], [22, "call _sprintf"], [23, "mov rax, cs:stream"], [24, "lea rdx, [rbp+s]"], [25, "mov esi, offset aStructRpcgenTa_0"], [26, "mov rdi, rax"], [27, "mov eax, 0"], [28, "call _fprintf"], [29, "mov rax, [rbp+var_18]"], [30, "mov rax, [rax+10h]"], [31, "mov rdi, rax"], [32, "call sub_40B01F"], [33, "test eax, eax"], [34, "jz short loc_40CCDF"], [35, "mov [rbp+var_24], 0"], [36, "jmp short loc_40CCFA"], [37, "mov [rbp+var_24], 1"], [38, "mov rax, cs:stream"], [39, "mov rsi, rax"], [40, "mov edi, offset aChar0XdrprocTX"], [41, "call _fputs"], [42, "mov rax, [rbp+var_18]"], [43, "mov rax, [rax+10h]"], [44, "mov [rbp+var_20], rax"], [45, "jmp loc_40CEAA"], [46, "cmp [rbp+var_24], 0"], [47, "jz short loc_40CD25"], [48, "mov rax, cs:stream"], [49, "mov rsi, rax"], [50, "mov edi, 0Ah"], [51, "call _fputc"], [52, "mov rax, [rbp+var_20]"], [53, "mov rax, [rax+8]"], [54, "mov rdi, rax"], [55, "call _atoi"], [56, "mov [rbp+var_2C], eax"], [57, "mov eax, [rbp+var_24]"], [58, "lea edx, [rax+1]"], [59, "mov [rbp+var_24], edx"], [60, "cmp [rbp+var_2C], eax"], [61, "jz short loc_40CDA4"], [62, "mov rax, cs:stream"], [63, "mov rcx, rax"], [64, "mov edx, 27h "], [65, "mov esi, 1"], [66, "mov edi, offset aWarningTableOu"], [67, "call _fwrite"], [68, "cmp [rbp+var_28], 0"], [69, "jnz short loc_40CD9B"], [70, "mov rax, cs:stderr"], [71, "lea rdx, [rbp+s]"], [72, "mov esi, offset aWarningSTableI"], [73, "mov rdi, rax"], [74, "mov eax, 0"], [75, "call _fprintf"], [76, "mov [rbp+var_28], 1"], [77, "mov cs:status, 1"], [78, "mov eax, [rbp+var_2C]"], [79, "add eax, 1"], [80, "mov [rbp+var_24], eax"], [81, "mov rax, cs:stream"], [82, "mov rcx, rax"], [83, "mov edx, 1Ch"], [84, "mov esi, 1"], [85, "mov edi, offset aCharRpcgenActi"], [86, "call _fwrite"], [87, "mov eax, cs:dword_4158C4"], [88, "test eax, eax"], [89, "jnz short loc_40CDE8"], [90, "mov rax, [rbp+var_18]"], [91, "mov rdx, [rax+8]"], [92, "mov rax, [rbp+var_20]"], [93, "mov rax, [rax]"], [94, "mov rsi, rdx"], [95, "mov rdi, rax"], [96, "call sub_40D4A4"], [97, "jmp short loc_40CE20"], [98, "mov eax, cs:dword_4158C4"], [99, "test eax, eax"], [100, "jz short loc_40CE06"], [101, "mov rax, cs:stream"], [102, "mov rsi, rax"], [103, "mov edi, 5Fh "], [104, "call _fputc"], [105, "mov rax, [rbp+var_18]"], [106, "mov rdx, [rax+8]"], [107, "mov rax, [rbp+var_20]"], [108, "mov rax, [rax]"], [109, "mov rsi, rdx"], [110, "mov rdi, rax"], [111, "call sub_40D4E9"], [112, "mov rax, cs:stream"], [113, "mov rcx, rax"], [114, "mov edx, 3"], [115, "mov esi, 1"], [116, "mov edi, offset asc_411C7F"], [117, "call _fwrite"], [118, "mov rax, [rbp+var_20]"], [119, "mov eax, [rax+20h]"], [120, "cmp eax, 1"], [121, "jle short loc_40CE61"], [122, "mov rax, [rbp+var_20]"], [123, "mov rax, [rax+10h]"], [124, "mov rsi, rax"], [125, "mov edi, 0"], [126, "call sub_40CF19"], [127, "jmp short loc_40CE83"], [128, "mov rax, [rbp+var_20]"], [129, "mov rax, [rax+18h]"], [130, "mov rdx, [rax+8]"], [131, "mov rax, [rbp+var_20]"], [132, "mov rax, [rax+18h]"], [133, "mov rax, [rax]"], [134, "mov rsi, rdx"], [135, "mov rdi, rax"], [136, "call sub_40CF19"], [137, "mov rax, [rbp+var_20]"], [138, "mov rdx, [rax+28h]"], [139, "mov rax, [rbp+var_20]"], [140, "mov rax, [rax+30h]"], [141, "mov rsi, rdx"], [142, "mov rdi, rax"], [143, "call sub_40CF19"], [144, "mov rax, [rbp+var_20]"], [145, "mov rax, [rax+38h]"], [146, "mov [rbp+var_20], rax"], [147, "cmp [rbp+var_20], 0"], [148, "jnz loc_40CD0B"], [149, "mov rax, cs:stream"], [150, "mov rsi, rax"], [151, "mov edi, offset asc_415564"], [152, "call _fputs"], [153, "mov rax, cs:stream"], [154, "lea rsi, [rbp+s]"], [155, "lea rcx, [rbp+s]"], [156, "lea rdx, [rbp+s]"], [157, "mov r8, rsi"], [158, "mov esi, offset aIntSNprocSizeo"], [159, "mov rdi, rax"], [160, "mov eax, 0"], [161, "call _fprintf"], [162, "mov rax, [rbp+var_18]"], [163, "mov rax, [rax+18h]"], [164, "mov [rbp+var_18], rax"], [165, "cmp [rbp+var_18], 0"], [166, "jnz loc_40CC62"], [167, "nop"], [168, "nop"], [169, "mov rbx, [rbp+var_8]"], [170, "leave"], [171, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [10, 164], [10, 7], [11, 10], [12, 4], [13, 12], [14, 13], [16, 15], [17, 15], [18, 11], [20, 17], [24, 16], [26, 23], [29, 164], [29, 7], [30, 29], [31, 30], [33, 32], [34, 33], [39, 38], [42, 164], [42, 7], [43, 42], [44, 43], [46, 59], [46, 35], [46, 37], [46, 80], [47, 46], [49, 48], [52, 44], [52, 146], [53, 52], [54, 53], [56, 55], [57, 59], [57, 35], [57, 37], [57, 80], [58, 24], [58, 138], [58, 57], [59, 58], [60, 57], [60, 56], [61, 60], [63, 62], [68, 76], [68, 9], [69, 68], [71, 64], [73, 70], [78, 56], [79, 78], [80, 79], [82, 81], [88, 87], [89, 88], [90, 7], [90, 164], [91, 90], [92, 44], [92, 146], [93, 92], [94, 91], [95, 93], [99, 98], [100, 99], [102, 101], [105, 164], [105, 7], [106, 105], [107, 44], [107, 146], [108, 107], [109, 106], [110, 108], [113, 112], [118, 44], [118, 146], [119, 118], [120, 119], [121, 120], [122, 44], [122, 146], [123, 122], [124, 123], [128, 44], [128, 146], [129, 128], [130, 129], [131, 44], [131, 146], [132, 131], [133, 132], [134, 130], [135, 133], [137, 44], [137, 146], [138, 137], [139, 44], [139, 146], [140, 139], [141, 138], [142, 140], [144, 44], [144, 146], [145, 144], [146, 145], [147, 146], [147, 44], [148, 147], [150, 149], [154, 150], [155, 18], [155, 113], [156, 24], [156, 138], [157, 154], [159, 153], [162, 7], [162, 164], [163, 162], [164, 163], [165, 7], [165, 164], [166, 165], [171, 6], [171, 163]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3ece931a62f518c5d6d2aba459c770497c790e221ea4fac41a6f026c92b6a264_3ece931a62f518c5d6d2aba459c770497c790e221ea4fac41a6f026c92b6a264.jsonl.gz", "strip_func_name": "sub_40CC3B", "query": "\n\n\n_QWORD *__fastcall sub_40CC3B(_QWORD *a1)\n{\n_QWORD *result; // rax\nconst char *v2; // rbx\nconst char *v3; // rax\nint v4; // eax\nchar s[100]; // [rsp+10h] [rbp-90h] BYREF\nint v6; // [rsp+74h] [rbp-2Ch]\nint v7; // [rsp+78h] [rbp-28h]\nint v8; // [rsp+7Ch] [rbp-24h]\nint *j; // [rsp+80h] [rbp-20h]\n_QWORD *i; // [rsp+88h] [rbp-18h]\n\nresult = (_QWORD *)a1[3];\nfor ( i = result; i; i = result )\n{\nv7 = 0;\nv2 = (const char *)i[1];\nv3 = (const char *)sub_40D443(*a1);\nsprintf(s, \"%s_%s\", v3, v2);\nfprintf(stream, \"struct rpcgen_table %s_table[] = {\\n\", s);\nif ( (unsigned int)sub_40B01F(i[2]) )\n{\nv8 = 0;\n}\nelse\n{\nv8 = 1;\nfputs(aChar0XdrprocTX, stream);\n}\nfor ( j = (int *)i[2]; j; j = (int *)*((_QWORD *)j + 7) )\n{\nif ( v8 )\nfputc(10, stream);\nv6 = atoi(*((const char **)j + 1));\nv4 = v8++;\nif ( v6 != v4 )\n{\nfwrite(\"/*\\n * WARNING: table out of order\\n */\\n\\n\", 1uLL, 0x27uLL, stream);\nif ( !v7 )\n{\nfprintf(stderr, \"WARNING %s table is out of order\\n\", s);\nv7 = 1;\nstatus = 1;\n}\nv8 = v6 + 1;\n}\nfwrite(\"\\t(char *(*)())RPCGEN_ACTION(\", 1uLL, 0x1CuLL, stream);\nif ( dword_4158C4 )\n{\nfputc(95, stream);\nsub_40D4E9(*(_QWORD *)j, i[1]);\n}\nelse\n{\nsub_40D4A4(*(_QWORD *)j, i[1]);\n}\nfwrite(\"),\\n\", 1uLL, 3uLL, stream);\nif ( j[8] <= 1 )\nsub_40CF19(**((_QWORD **)j + 3), *(_QWORD *)(*((_QWORD *)j + 3) + 8LL));\nelse\nsub_40CF19(0LL, *((_QWORD *)j + 2));\nsub_40CF19(*((_QWORD *)j + 6), *((_QWORD *)j + 5));\n}\nfputs(asc_415564, stream);\nfprintf(stream, \"int %s_nproc =\\n\\tsizeof(%s_table)/sizeof(%s_table[0]);\\n\\n\", s, s, s);\nresult = (_QWORD *)i[3];\n}\nreturn result;\n}\n\n\n\nQ:[a1,s,v6,v7,v8,j,i,sub_40CC3B,sub_40D443,sub_40B01F,sub_40D4E9,sub_40D4A4,sub_40CF19,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'def', 's': 'progvers', 'v6': 'current', 'v7': 'warning', 'v8': 'expected', 'j': 'proc', 'i': 'vp', 'sub_40CC3B': 'write_table', 'sub_40D443': 'locase', 'sub_40B01F': 'nullproc', 'sub_40D4E9': 'pvname', 'sub_40D4A4': 'pvname_svc', 'sub_40CF19': 'printit'}"}
btstack_memory_pool_create
0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb
bluekitchen
btstack
NA
void btstack_memory_pool_create(btstack_memory_pool_t *pool, void * storage, int count, int block_size){ node_t *free_blocks = (node_t*) pool; char *mem_ptr = (char *) storage; int i; // create singly linked list of all available blocks free_blocks->next = NULL; for (i = 0 ; i < count ; i++){ btstack_memory_pool_free(pool, mem_ptr); mem_ptr += block_size; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A4BC", "function_addr": 4236476, "binary_name": "0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb.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_38], ecx"], [7, "mov rax, [rbp+var_28]"], [8, "mov [rbp+var_18], rax"], [9, "mov rax, [rbp+var_30]"], [10, "mov [rbp+var_8], rax"], [11, "mov rax, [rbp+var_18]"], [12, "mov qword ptr [rax], 0"], [13, "mov [rbp+var_C], 0"], [14, "jmp short loc_40A516"], [15, "mov rdx, [rbp+var_8]"], [16, "mov rax, [rbp+var_28]"], [17, "mov rsi, rdx"], [18, "mov rdi, rax"], [19, "call sub_40A564"], [20, "mov eax, [rbp+var_38]"], [21, "cdqe"], [22, "add [rbp+var_8], rax"], [23, "add [rbp+var_C], 1"], [24, "mov eax, [rbp+var_C]"], [25, "cmp eax, [rbp+var_34]"], [26, "jl short loc_40A4F6"], [27, "nop"], [28, "nop"], [29, "leave"], [30, "retn"]], "data_dep": [[7, 3], [8, 7], [9, 4], [10, 9], [11, 8], [12, 11], [15, 10], [15, 22], [16, 3], [17, 15], [18, 16], [20, 6], [22, 20], [22, 10], [22, 22], [23, 13], [23, 23], [24, 23], [24, 13], [25, 24], [25, 5], [26, 25], [30, 24]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb_0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb.jsonl.gz", "strip_func_name": "sub_40A4BC", "query": "\n\n\n__int64 __fastcall sub_40A4BC(_QWORD *a1, __int64 a2, int a3, int a4)\n{\n__int64 result; // rax\nunsigned int i; // [rsp+34h] [rbp-Ch]\n\n*a1 = 0LL;\nfor ( i = 0; ; ++i )\n{\nresult = i;\nif ( (int)i >= a3 )\nbreak;\nsub_40A564(a1, a2);\na2 += a4;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,sub_40A4BC,sub_40A564,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'count', 'a4': 'block_size', 'a1': 'pool', 'a2': 'storage', 'sub_40A4BC': 'btstack_memory_pool_create', 'sub_40A564': 'btstack_memory_pool_free'}"}
gt_output_map_gprint_map_list
507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69
smarco
gem3-mapper
NA
GT_INLINE gt_status gt_output_map_gprint_map_list( gt_generic_printer* const gprinter,gt_vector* const maps,gt_output_map_attributes* output_map_attributes) { GT_GENERIC_PRINTER_CHECK(gprinter); GT_VECTOR_CHECK(maps); GT_OUTPUT_MAP_CHECK_ATTRIBUTES(output_map_attributes); gt_status error_code = 0; GT_VECTOR_ITERATE(maps,map,map_pos,gt_map*) { error_code |= gt_output_map_gprint_map_(gprinter,*map,output_map_attributes,output_map_attributes->print_scores,true,true); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_433D4B", "function_addr": 4406603, "binary_name": "507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69.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_48], rdx"], [6, "mov rax, [rbp+var_38]"], [7, "mov eax, [rax]"], [8, "cmp eax, 4"], [9, "ja short def_433D8A"], [10, "mov eax, eax"], [11, "lea rdx, ds:0[rax*4]"], [12, "lea rax, jpt_433D8A"], [13, "mov eax, ds:(jpt_433D8A - 451AF8h)[rdx+rax]"], [14, "cdqe"], [15, "lea rdx, jpt_433D8A"], [16, "add rax, rdx"], [17, "jmp rax"], [18, "nop"], [19, "cmp [rbp+var_48], 0"], [20, "jnz short loc_433DA8"], [21, "lea rax, [rbp+var_30]"], [22, "mov rdi, rax"], [23, "call sub_431FEE"], [24, "lea rax, [rbp+var_30]"], [25, "mov [rbp+var_48], rax"], [26, "mov [rbp+var_4], 0"], [27, "mov rax, [rbp+var_40]"], [28, "mov rax, [rax]"], [29, "mov [rbp+var_18], rax"], [30, "mov [rbp+var_10], 0"], [31, "jmp short loc_433DFF"], [32, "mov rax, [rbp+var_48]"], [33, "movzx eax, byte ptr [rax+3]"], [34, "movzx ecx, al"], [35, "mov rax, [rbp+var_18]"], [36, "mov rsi, [rax]"], [37, "mov rdx, [rbp+var_48]"], [38, "mov rax, [rbp+var_38]"], [39, "mov r9d, 1"], [40, "mov r8d, 1"], [41, "mov rdi, rax"], [42, "call sub_432C63"], [43, "or [rbp+var_4], eax"], [44, "add [rbp+var_18], 8"], [45, "add [rbp+var_10], 1"], [46, "mov rax, [rbp+var_40]"], [47, "mov rax, [rax+8]"], [48, "cmp [rbp+var_10], rax"], [49, "jb short loc_433DC4"], [50, "mov eax, [rbp+var_4]"], [51, "leave"], [52, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 8], [10, 7], [12, 10], [15, 11], [16, 13], [16, 15], [17, 16], [19, 5], [20, 19], [21, 16], [21, 7], [22, 21], [24, 23], [25, 24], [27, 4], [28, 27], [29, 28], [32, 5], [32, 25], [33, 32], [34, 33], [35, 29], [35, 44], [36, 35], [37, 5], [37, 25], [38, 3], [41, 38], [43, 43], [43, 42], [43, 26], [44, 29], [44, 44], [45, 30], [45, 45], [46, 4], [47, 46], [48, 30], [48, 45], [48, 47], [49, 48], [50, 43], [50, 26], [52, 50]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69_507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69.jsonl.gz", "strip_func_name": "sub_433D4B", "query": "\n\n\n__int64 __fastcall sub_433D4B(__int64 a1, __int64 a2, char *a3)\n{\nint v3; // eax\nchar *v5; // [rsp+8h] [rbp-48h]\nchar v6[24]; // [rsp+20h] [rbp-30h] BYREF\n__int64 *v7; // [rsp+38h] [rbp-18h]\nunsigned __int64 i; // [rsp+40h] [rbp-10h]\nunsigned int v9; // [rsp+4Ch] [rbp-4h]\n\nv5 = a3;\nif ( !a3 )\n{\nsub_431FEE((__int64)v6);\nv5 = v6;\n}\nv9 = 0;\nv7 = *(__int64 **)a2;\nfor ( i = 0LL; i < *(_QWORD *)(a2 + 8); ++i )\n{\nv3 = sub_432C63(a1, *v7, (__int64)v5, v5[3]);\nv9 |= v3;\n++v7;\n}\nreturn v9;\n}\n\n\n\nQ:[a3,a1,a2,v5,v6,v7,i,v9,sub_433D4B,sub_431FEE,sub_432C63,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'output_map_attributes', 'a1': 'gprinter', 'a2': 'maps', 'v5': 'output_map_attributesa', 'v6': '__output_map_attributes', 'v7': 'map', 'i': 'map_pos', 'v9': 'error_code', 'sub_433D4B': 'gt_output_map_gprint_map_list', 'sub_431FEE': 'gt_output_map_attributes_reset_defaults', 'sub_432C63': 'gt_output_map_gprint_map_'}"}
mbedtls_asn1_write_oid
dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84
FreeRTOS
coreMQTT-Agent-Demos
NA
int mbedtls_asn1_write_oid( unsigned char **p, unsigned char *start, const char *oid, size_t oid_len ) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t len = 0; MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( p, start, (const unsigned char *) oid, oid_len ) ); MBEDTLS_ASN1_CHK_ADD( len , mbedtls_asn1_write_len( p, start, len ) ); MBEDTLS_ASN1_CHK_ADD( len , mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_OID ) ); return( (int) len ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_473D30", "function_addr": 4668720, "binary_name": "dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov [rbp+var_30], rcx"], [7, "mov [rbp+var_4], 0FFFFFF92h"], [8, "mov [rbp+var_10], 0"], [9, "mov rcx, [rbp+var_30]"], [10, "mov rdx, [rbp+var_28]"], [11, "mov rsi, [rbp+var_20]"], [12, "mov rax, [rbp+var_18]"], [13, "mov rdi, rax"], [14, "call sub_473ACE"], [15, "mov [rbp+var_4], eax"], [16, "cmp [rbp+var_4], 0"], [17, "jns short loc_473D7D"], [18, "mov eax, [rbp+var_4]"], [19, "jmp short locret_473DE7"], [20, "mov eax, [rbp+var_4]"], [21, "cdqe"], [22, "add [rbp+var_10], rax"], [23, "mov rdx, [rbp+var_10]"], [24, "mov rcx, [rbp+var_20]"], [25, "mov rax, [rbp+var_18]"], [26, "mov rsi, rcx"], [27, "mov rdi, rax"], [28, "call sub_47377D"], [29, "mov [rbp+var_4], eax"], [30, "cmp [rbp+var_4], 0"], [31, "jns short loc_473DAB"], [32, "mov eax, [rbp+var_4]"], [33, "jmp short locret_473DE7"], [34, "mov eax, [rbp+var_4]"], [35, "cdqe"], [36, "add [rbp+var_10], rax"], [37, "mov rcx, [rbp+var_20]"], [38, "mov rax, [rbp+var_18]"], [39, "mov edx, 6"], [40, "mov rsi, rcx"], [41, "mov rdi, rax"], [42, "call sub_473A80"], [43, "mov [rbp+var_4], eax"], [44, "cmp [rbp+var_4], 0"], [45, "jns short loc_473DDA"], [46, "mov eax, [rbp+var_4]"], [47, "jmp short locret_473DE7"], [48, "mov eax, [rbp+var_4]"], [49, "cdqe"], [50, "add [rbp+var_10], rax"], [51, "mov rax, [rbp+var_10]"], [52, "leave"], [53, "retn"]], "data_dep": [[9, 6], [10, 5], [11, 4], [12, 3], [13, 12], [15, 14], [16, 15], [17, 16], [18, 15], [20, 15], [22, 8], [22, 20], [23, 22], [24, 4], [25, 3], [26, 24], [27, 25], [29, 28], [30, 29], [31, 30], [32, 29], [34, 29], [36, 22], [36, 34], [37, 4], [38, 3], [40, 37], [41, 38], [43, 42], [44, 43], [45, 44], [46, 43], [48, 43], [50, 36], [50, 48], [51, 50], [53, 32], [53, 46], [53, 18], [53, 51]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84_dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84.jsonl.gz", "strip_func_name": "sub_473D30", "query": "\n\n\n__int64 __fastcall sub_473D30(void **a1, unsigned __int64 a2, const void *a3, size_t a4)\n{\n__int64 result; // rax\n__int64 v5; // [rsp+20h] [rbp-10h]\n__int64 v6; // [rsp+20h] [rbp-10h]\nint v7; // [rsp+2Ch] [rbp-4h]\nint v8; // [rsp+2Ch] [rbp-4h]\nint v9; // [rsp+2Ch] [rbp-4h]\n\nv7 = sub_473ACE(a1, a2, a3, a4);\nif ( v7 < 0 )\nreturn (unsigned int)v7;\nv5 = v7;\nv8 = sub_47377D(a1, a2, v7);\nif ( v8 < 0 )\nreturn (unsigned int)v8;\nv6 = v8 + v5;\nv9 = sub_473A80(a1, a2, 6);\nif ( v9 >= 0 )\nresult = v9 + v6;\nelse\nresult = (unsigned int)v9;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v5,v9,sub_473D30,sub_473ACE,sub_47377D,sub_473A80,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'oid', 'a4': 'oid_len', 'a1': 'p', 'a2': 'start', 'v5': 'lena', 'v9': 'retb', 'sub_473D30': 'mbedtls_asn1_write_oid', 'sub_473ACE': 'mbedtls_asn1_write_raw_buffer', 'sub_47377D': 'mbedtls_asn1_write_len', 'sub_473A80': 'mbedtls_asn1_write_tag'}"}
init_permute_piece
9e5ed998603d4a4bec6a0155dac36698df46b941b6fa147e44fcff659a57d6e8
syzygy1
tb
NA
uint64_t init_permute_piece(int *pcs, int *pt) { int i, j, k, m, l; uint64_t factor[TBPIECES]; int tidx[16]; for (i = 0, k = 0; i < 16; i++) if (pcs[i]) type[k++] = i; num_types = k; for (i = 0, k = 0; i < 16; i++) if (pcs[i] == 1) k++; if (k >= 3) entry_piece.enc_type = 0; else if (k == 2) entry_piece.enc_type = 2; else { /* only possible for suicide chess */ k = 16; for (i = 0; i < 16; i++) if (pcs[i] < k && pcs[i] > 1) k = pcs[i]; entry_piece.enc_type = 1 + k; } entry_piece.num = 0; for (i = 0; i < 16; i++) entry_piece.num += pcs[i]; generate_type_perms(num_types); for (i = 0; i < num_types; i++) { for (j = 0; j < entry_piece.num; j++) if (pt[j] == type[i]) break; tidx[type[i]] = j; } if (entry_piece.enc_type == 0) { /* 111 */ for (i = 0; i < num_type_perms;) { for (j = num_types - 3; j >= 0; j--) if (pcs[type_perm_list[i][j]] == 1 && pcs[type_perm_list[i][j + 1]] == 1 && pcs[type_perm_list[i][j + 2]] == 1) break; if (j < 0) { num_type_perms--; for (k = 0; k < num_types; k++) type_perm_list[i][k] = type_perm_list[num_type_perms][k]; } else { piece_perm_list[i][2] = tidx[type_perm_list[i][j]]; piece_perm_list[i][1] = tidx[type_perm_list[i][j + 1]]; piece_perm_list[i][0] = tidx[type_perm_list[i][j + 2]]; for (k = 0, m = 3; k < num_types;) if (k != j) { for (l = 0; l < pcs[type_perm_list[i][k]]; l++) piece_perm_list[i][m++] = tidx[type_perm_list[i][k]] + l; k++; } else k += 3; order_list[i] = j; i++; } } } else if (entry_piece.enc_type == 2) { /* KK or 11 */ for (i = 0; i < num_type_perms;) { for (j = num_types - 2; j >= 0; j--) if (pcs[type_perm_list[i][j]] == 1 && pcs[type_perm_list[i][j + 1]] == 1) break; if (j < 0) { num_type_perms--; for (k = 0; k < num_types; k++) type_perm_list[i][k] = type_perm_list[num_type_perms][k]; } else { piece_perm_list[i][1] = tidx[type_perm_list[i][j]]; piece_perm_list[i][0] = tidx[type_perm_list[i][j + 1]]; for (k = 0, m = 2; k < num_types;) if (k != j) { for (l = 0; l < pcs[type_perm_list[i][k]]; l++) piece_perm_list[i][m++] = tidx[type_perm_list[i][k]] + l; k++; } else k += 2; order_list[i] = j; i++; } } } else { /* 2, or 3, or 4, or higher; only possible for suicide chess */ int p = entry_piece.enc_type - 1; for (i = 0; i < num_type_perms;) { for (j = num_types - 1; j >= 0; j--) if (pcs[type_perm_list[i][j]] == p) break; for (k = 0; k < p; k++) piece_perm_list[i][k] = tidx[type_perm_list[i][j]] + k; for (k = 0, m = p; k < num_types; k++) if (k != j) { for (l = 0; l < pcs[type_perm_list[i][k]]; l++) piece_perm_list[i][m++] = tidx[type_perm_list[i][k]] + l; } order_list[i] = j; i++; } } for (i = 0; i < num_type_perms; i++) for (j = i + 1; j < num_type_perms; j++) { for (k = 0; k < num_types; k++) if (pcs[type_perm_list[i][k]] != pcs[type_perm_list[j][k]]) break; if (k < num_types && pcs[type_perm_list[i][k]] > pcs[type_perm_list[j][k]]) { uint8_t tmp; for (k = 0; k < num_types; k++) { tmp = type_perm_list[i][k]; type_perm_list[i][k] = type_perm_list[j][k]; type_perm_list[j][k] = tmp; } for (k = 0; k < entry_piece.num; k++) { tmp = piece_perm_list[i][k]; piece_perm_list[i][k] = piece_perm_list[j][k]; piece_perm_list[j][k] = tmp; } tmp = order_list[i]; order_list[i] = order_list[j]; order_list[j] = tmp; } } for (i = 0; i < num_type_perms; i++) for (j = 0; j < entry_piece.num; j++) pidx_list[i][piece_perm_list[i][j]] = j; uint8_t norm[TBPIECES]; int order[TBPIECES]; p_set_norm_piece(pcs, type_perm_list[0], norm, order_list[0]); calc_order_piece(entry_piece.num, order_list[0], order, norm); tb_size = calc_factors_piece(factor, entry_piece.num, order_list[0], norm, entry_piece.enc_type); printf("tb_size = %"PRIu64"\n", tb_size); generate_test_list(tb_size, entry_piece.num); init_0x40(entry_piece.num); work_convert = create_work(total_work, tb_size, 0); return tb_size; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_417894", "function_addr": 4290708, "binary_name": "9e5ed998603d4a4bec6a0155dac36698df46b941b6fa147e44fcff659a57d6e8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0E0h"], [3, "mov [rbp+var_D8], rdi"], [4, "mov [rbp+var_E0], rsi"], [5, "mov [rbp+var_4], 0"], [6, "mov [rbp+var_C], 0"], [7, "jmp short loc_4178F2"], [8, "mov eax, [rbp+var_4]"], [9, "cdqe"], [10, "lea rdx, ds:0[rax*4]"], [11, "mov rax, [rbp+var_D8]"], [12, "add rax, rdx"], [13, "mov eax, [rax]"], [14, "test eax, eax"], [15, "jz short loc_4178EE"], [16, "mov eax, [rbp+var_C]"], [17, "lea edx, [rax+1]"], [18, "mov [rbp+var_C], edx"], [19, "mov edx, [rbp+var_4]"], [20, "cdqe"], [21, "mov ds:byte_603318[rax], dl"], [22, "add [rbp+var_4], 1"], [23, "cmp [rbp+var_4], 0Fh"], [24, "jle short loc_4178BD"], [25, "mov eax, [rbp+var_C]"], [26, "mov cs:dword_603310, eax"], [27, "mov [rbp+var_4], 0"], [28, "mov [rbp+var_C], 0"], [29, "jmp short loc_417937"], [30, "mov eax, [rbp+var_4]"], [31, "cdqe"], [32, "lea rdx, ds:0[rax*4]"], [33, "mov rax, [rbp+var_D8]"], [34, "add rax, rdx"], [35, "mov eax, [rax]"], [36, "cmp eax, 1"], [37, "jnz short loc_417933"], [38, "add [rbp+var_C], 1"], [39, "add [rbp+var_4], 1"], [40, "cmp [rbp+var_4], 0Fh"], [41, "jle short loc_417911"], [42, "cmp [rbp+var_C], 2"], [43, "jle short loc_41794F"], [44, "mov cs:byte_5EF490, 0"], [45, "jmp loc_4179DC"], [46, "cmp [rbp+var_C], 2"], [47, "jnz short loc_41795E"], [48, "mov cs:byte_5EF490, 2"], [49, "jmp short loc_4179DC"], [50, "mov [rbp+var_C], 10h"], [51, "mov [rbp+var_4], 0"], [52, "jmp short loc_4179CA"], [53, "mov eax, [rbp+var_4]"], [54, "cdqe"], [55, "lea rdx, ds:0[rax*4]"], [56, "mov rax, [rbp+var_D8]"], [57, "add rax, rdx"], [58, "mov eax, [rax]"], [59, "cmp [rbp+var_C], eax"], [60, "jle short loc_4179C6"], [61, "mov eax, [rbp+var_4]"], [62, "cdqe"], [63, "lea rdx, ds:0[rax*4]"], [64, "mov rax, [rbp+var_D8]"], [65, "add rax, rdx"], [66, "mov eax, [rax]"], [67, "cmp eax, 1"], [68, "jle short loc_4179C6"], [69, "mov eax, [rbp+var_4]"], [70, "cdqe"], [71, "lea rdx, ds:0[rax*4]"], [72, "mov rax, [rbp+var_D8]"], [73, "add rax, rdx"], [74, "mov eax, [rax]"], [75, "mov [rbp+var_C], eax"], [76, "add [rbp+var_4], 1"], [77, "cmp [rbp+var_4], 0Fh"], [78, "jle short loc_41796E"], [79, "mov eax, [rbp+var_C]"], [80, "add eax, 1"], [81, "mov cs:byte_5EF490, al"], [82, "mov cs:byte_5EF48D, 0"], [83, "mov [rbp+var_4], 0"], [84, "jmp short loc_417A18"], [85, "movzx edx, cs:byte_5EF48D"], [86, "mov eax, [rbp+var_4]"], [87, "cdqe"], [88, "lea rcx, ds:0[rax*4]"], [89, "mov rax, [rbp+var_D8]"], [90, "add rax, rcx"], [91, "mov eax, [rax]"], [92, "add eax, edx"], [93, "mov cs:byte_5EF48D, al"], [94, "add [rbp+var_4], 1"], [95, "cmp [rbp+var_4], 0Fh"], [96, "jle short loc_4179EC"], [97, "mov eax, cs:dword_603310"], [98, "mov edi, eax"], [99, "call sub_417189"], [100, "mov [rbp+var_4], 0"], [101, "jmp short loc_417A9E"], [102, "mov [rbp+var_8], 0"], [103, "jmp short loc_417A6D"], [104, "mov eax, [rbp+var_8]"], [105, "cdqe"], [106, "lea rdx, ds:0[rax*4]"], [107, "mov rax, [rbp+var_E0]"], [108, "add rax, rdx"], [109, "mov edx, [rax]"], [110, "mov eax, [rbp+var_4]"], [111, "cdqe"], [112, "movzx eax, ds:byte_603318[rax]"], [113, "movzx eax, al"], [114, "cmp edx, eax"], [115, "jz short loc_417A7E"], [116, "add [rbp+var_8], 1"], [117, "movzx eax, cs:byte_5EF48D"], [118, "movzx eax, al"], [119, "cmp [rbp+var_8], eax"], [120, "jl short loc_417A3D"], [121, "jmp short loc_417A7F"], [122, "nop"], [123, "mov eax, [rbp+var_4]"], [124, "cdqe"], [125, "movzx eax, ds:byte_603318[rax]"], [126, "movzx eax, al"], [127, "cdqe"], [128, "mov edx, [rbp+var_8]"], [129, "mov [rbp+rax*4+var_A0], edx"], [130, "add [rbp+var_4], 1"], [131, "mov eax, cs:dword_603310"], [132, "cmp [rbp+var_4], eax"], [133, "jl short loc_417A34"], [134, "movzx eax, cs:byte_5EF490"], [135, "test al, al"], [136, "jnz loc_417E0D"], [137, "mov [rbp+var_4], 0"], [138, "jmp loc_417DF9"], [139, "mov eax, cs:dword_603310"], [140, "sub eax, 3"], [141, "mov [rbp+var_8], eax"], [142, "jmp loc_417B9D"], [143, "mov eax, [rbp+var_8]"], [144, "movsxd rcx, eax"], [145, "mov eax, [rbp+var_4]"], [146, "movsxd rdx, eax"], [147, "mov rax, rdx"], [148, "shl rax, 3"], [149, "sub rax, rdx"], [150, "add rax, rcx"], [151, "add rax, 603320h"], [152, "movzx eax, byte ptr [rax]"], [153, "movzx eax, al"], [154, "lea rdx, ds:0[rax*4]"], [155, "mov rax, [rbp+var_D8]"], [156, "add rax, rdx"], [157, "mov eax, [rax]"], [158, "cmp eax, 1"], [159, "jnz loc_417B99"], [160, "mov eax, [rbp+var_8]"], [161, "add eax, 1"], [162, "movsxd rcx, eax"], [163, "mov eax, [rbp+var_4]"], [164, "movsxd rdx, eax"], [165, "mov rax, rdx"], [166, "shl rax, 3"], [167, "sub rax, rdx"], [168, "add rax, rcx"], [169, "add rax, 603320h"], [170, "movzx eax, byte ptr [rax]"], [171, "movzx eax, al"], [172, "lea rdx, ds:0[rax*4]"], [173, "mov rax, [rbp+var_D8]"], [174, "add rax, rdx"], [175, "mov eax, [rax]"], [176, "cmp eax, 1"], [177, "jnz short loc_417B99"], [178, "mov eax, [rbp+var_8]"], [179, "add eax, 2"], [180, "movsxd rcx, eax"], [181, "mov eax, [rbp+var_4]"], [182, "movsxd rdx, eax"], [183, "mov rax, rdx"], [184, "shl rax, 3"], [185, "sub rax, rdx"], [186, "add rax, rcx"], [187, "add rax, 603320h"], [188, "movzx eax, byte ptr [rax]"], [189, "movzx eax, al"], [190, "lea rdx, ds:0[rax*4]"], [191, "mov rax, [rbp+var_D8]"], [192, "add rax, rdx"], [193, "mov eax, [rax]"], [194, "cmp eax, 1"], [195, "jz short loc_417BA9"], [196, "sub [rbp+var_8], 1"], [197, "cmp [rbp+var_8], 0"], [198, "jns loc_417AD5"], [199, "jmp short loc_417BAA"], [200, "nop"], [201, "cmp [rbp+var_8], 0"], [202, "jns short loc_417C22"], [203, "mov eax, cs:dword_603314"], [204, "sub eax, 1"], [205, "mov cs:dword_603314, eax"], [206, "mov [rbp+var_C], 0"], [207, "jmp short loc_417C12"], [208, "mov eax, cs:dword_603314"], [209, "mov edx, [rbp+var_C]"], [210, "movsxd rcx, edx"], [211, "movsxd rdx, eax"], [212, "mov rax, rdx"], [213, "shl rax, 3"], [214, "sub rax, rdx"], [215, "add rax, rcx"], [216, "add rax, 603320h"], [217, "movzx edx, byte ptr [rax]"], [218, "mov eax, [rbp+var_C]"], [219, "movsxd rsi, eax"], [220, "mov eax, [rbp+var_4]"], [221, "movsxd rcx, eax"], [222, "mov rax, rcx"], [223, "shl rax, 3"], [224, "sub rax, rcx"], [225, "add rax, rsi"], [226, "add rax, 603320h"], [227, "mov [rax], dl"], [228, "add [rbp+var_C], 1"], [229, "mov eax, cs:dword_603310"], [230, "cmp [rbp+var_C], eax"], [231, "jl short loc_417BC8"], [232, "jmp loc_417DF9"], [233, "mov eax, [rbp+var_8]"], [234, "movsxd rcx, eax"], [235, "mov eax, [rbp+var_4]"], [236, "movsxd rdx, eax"], [237, "mov rax, rdx"], [238, "shl rax, 3"], [239, "sub rax, rdx"], [240, "add rax, rcx"], [241, "add rax, 603320h"], [242, "movzx eax, byte ptr [rax]"], [243, "movzx eax, al"], [244, "cdqe"], [245, "mov eax, [rbp+rax*4+var_A0]"], [246, "mov ecx, eax"], [247, "mov eax, [rbp+var_4]"], [248, "movsxd rdx, eax"], [249, "mov rax, rdx"], [250, "shl rax, 3"], [251, "sub rax, rdx"], [252, "add rax, 5F1F62h"], [253, "mov [rax], cl"], [254, "mov eax, [rbp+var_8]"], [255, "add eax, 1"], [256, "movsxd rcx, eax"], [257, "mov eax, [rbp+var_4]"], [258, "movsxd rdx, eax"], [259, "mov rax, rdx"], [260, "shl rax, 3"], [261, "sub rax, rdx"], [262, "add rax, rcx"], [263, "add rax, 603320h"], [264, "movzx eax, byte ptr [rax]"], [265, "movzx eax, al"], [266, "cdqe"], [267, "mov eax, [rbp+rax*4+var_A0]"], [268, "mov ecx, eax"], [269, "mov eax, [rbp+var_4]"], [270, "movsxd rdx, eax"], [271, "mov rax, rdx"], [272, "shl rax, 3"], [273, "sub rax, rdx"], [274, "add rax, 5F1F61h"], [275, "mov [rax], cl"], [276, "mov eax, [rbp+var_8]"], [277, "add eax, 2"], [278, "movsxd rcx, eax"], [279, "mov eax, [rbp+var_4]"], [280, "movsxd rdx, eax"], [281, "mov rax, rdx"], [282, "shl rax, 3"], [283, "sub rax, rdx"], [284, "add rax, rcx"], [285, "add rax, 603320h"], [286, "movzx eax, byte ptr [rax]"], [287, "movzx eax, al"], [288, "cdqe"], [289, "mov eax, [rbp+rax*4+var_A0]"], [290, "mov ecx, eax"], [291, "mov eax, [rbp+var_4]"], [292, "movsxd rdx, eax"], [293, "mov rax, rdx"], [294, "shl rax, 3"], [295, "sub rax, rdx"], [296, "add rax, 5F1F60h"], [297, "mov [rax], cl"], [298, "mov [rbp+var_C], 0"], [299, "mov [rbp+var_10], 3"], [300, "jmp loc_417DD6"], [301, "mov eax, [rbp+var_C]"], [302, "cmp eax, [rbp+var_8]"], [303, "jz loc_417DD2"], [304, "mov [rbp+var_14], 0"], [305, "jmp short loc_417D8A"], [306, "mov eax, [rbp+var_C]"], [307, "movsxd rcx, eax"], [308, "mov eax, [rbp+var_4]"], [309, "movsxd rdx, eax"], [310, "mov rax, rdx"], [311, "shl rax, 3"], [312, "sub rax, rdx"], [313, "add rax, rcx"], [314, "add rax, 603320h"], [315, "movzx eax, byte ptr [rax]"], [316, "movzx eax, al"], [317, "cdqe"], [318, "mov eax, [rbp+rax*4+var_A0]"], [319, "mov esi, eax"], [320, "mov eax, [rbp+var_14]"], [321, "mov ecx, eax"], [322, "mov eax, [rbp+var_10]"], [323, "lea edx, [rax+1]"], [324, "mov [rbp+var_10], edx"], [325, "add ecx, esi"], [326, "movsxd rsi, eax"], [327, "mov eax, [rbp+var_4]"], [328, "movsxd rdx, eax"], [329, "mov rax, rdx"], [330, "shl rax, 3"], [331, "sub rax, rdx"], [332, "add rax, rsi"], [333, "add rax, 5F1F60h"], [334, "mov [rax], cl"], [335, "add [rbp+var_14], 1"], [336, "mov eax, [rbp+var_C]"], [337, "movsxd rcx, eax"], [338, "mov eax, [rbp+var_4]"], [339, "movsxd rdx, eax"], [340, "mov rax, rdx"], [341, "shl rax, 3"], [342, "sub rax, rdx"], [343, "add rax, rcx"], [344, "add rax, 603320h"], [345, "movzx eax, byte ptr [rax]"], [346, "movzx eax, al"], [347, "lea rdx, ds:0[rax*4]"], [348, "mov rax, [rbp+var_D8]"], [349, "add rax, rdx"], [350, "mov eax, [rax]"], [351, "cmp [rbp+var_14], eax"], [352, "jl loc_417D28"], [353, "add [rbp+var_C], 1"], [354, "jmp short loc_417DD6"], [355, "add [rbp+var_C], 3"], [356, "mov eax, cs:dword_603310"], [357, "cmp [rbp+var_C], eax"], [358, "jl loc_417D13"], [359, "mov eax, [rbp+var_8]"], [360, "mov edx, eax"], [361, "mov eax, [rbp+var_4]"], [362, "cdqe"], [363, "mov ds:byte_5EF7E0[rax], dl"], [364, "add [rbp+var_4], 1"], [365, "mov eax, cs:dword_603314"], [366, "cmp [rbp+var_4], eax"], [367, "jl loc_417AC4"], [368, "jmp loc_4182C3"], [369, "movzx eax, cs:byte_5EF490"], [370, "cmp al, 2"], [371, "jnz loc_4180E1"], [372, "mov [rbp+var_4], 0"], [373, "jmp loc_4180CD"], [374, "mov eax, cs:dword_603310"], [375, "sub eax, 2"], [376, "mov [rbp+var_8], eax"], [377, "jmp loc_417EBC"], [378, "mov eax, [rbp+var_8]"], [379, "movsxd rcx, eax"], [380, "mov eax, [rbp+var_4]"], [381, "movsxd rdx, eax"], [382, "mov rax, rdx"], [383, "shl rax, 3"], [384, "sub rax, rdx"], [385, "add rax, rcx"], [386, "add rax, 603320h"], [387, "movzx eax, byte ptr [rax]"], [388, "movzx eax, al"], [389, "lea rdx, ds:0[rax*4]"], [390, "mov rax, [rbp+var_D8]"], [391, "add rax, rdx"], [392, "mov eax, [rax]"], [393, "cmp eax, 1"], [394, "jnz short loc_417EB8"], [395, "mov eax, [rbp+var_8]"], [396, "add eax, 1"], [397, "movsxd rcx, eax"], [398, "mov eax, [rbp+var_4]"], [399, "movsxd rdx, eax"], [400, "mov rax, rdx"], [401, "shl rax, 3"], [402, "sub rax, rdx"], [403, "add rax, rcx"], [404, "add rax, 603320h"], [405, "movzx eax, byte ptr [rax]"], [406, "movzx eax, al"], [407, "lea rdx, ds:0[rax*4]"], [408, "mov rax, [rbp+var_D8]"], [409, "add rax, rdx"], [410, "mov eax, [rax]"], [411, "cmp eax, 1"], [412, "jz short loc_417EC8"], [413, "sub [rbp+var_8], 1"], [414, "cmp [rbp+var_8], 0"], [415, "jns loc_417E39"], [416, "jmp short loc_417EC9"], [417, "nop"], [418, "cmp [rbp+var_8], 0"], [419, "jns short loc_417F41"], [420, "mov eax, cs:dword_603314"], [421, "sub eax, 1"], [422, "mov cs:dword_603314, eax"], [423, "mov [rbp+var_C], 0"], [424, "jmp short loc_417F31"], [425, "mov eax, cs:dword_603314"], [426, "mov edx, [rbp+var_C]"], [427, "movsxd rcx, edx"], [428, "movsxd rdx, eax"], [429, "mov rax, rdx"], [430, "shl rax, 3"], [431, "sub rax, rdx"], [432, "add rax, rcx"], [433, "add rax, 603320h"], [434, "movzx edx, byte ptr [rax]"], [435, "mov eax, [rbp+var_C]"], [436, "movsxd rsi, eax"], [437, "mov eax, [rbp+var_4]"], [438, "movsxd rcx, eax"], [439, "mov rax, rcx"], [440, "shl rax, 3"], [441, "sub rax, rcx"], [442, "add rax, rsi"], [443, "add rax, 603320h"], [444, "mov [rax], dl"], [445, "add [rbp+var_C], 1"], [446, "mov eax, cs:dword_603310"], [447, "cmp [rbp+var_C], eax"], [448, "jl short loc_417EE7"], [449, "jmp loc_4180CD"], [450, "mov eax, [rbp+var_8]"], [451, "movsxd rcx, eax"], [452, "mov eax, [rbp+var_4]"], [453, "movsxd rdx, eax"], [454, "mov rax, rdx"], [455, "shl rax, 3"], [456, "sub rax, rdx"], [457, "add rax, rcx"], [458, "add rax, 603320h"], [459, "movzx eax, byte ptr [rax]"], [460, "movzx eax, al"], [461, "cdqe"], [462, "mov eax, [rbp+rax*4+var_A0]"], [463, "mov ecx, eax"], [464, "mov eax, [rbp+var_4]"], [465, "movsxd rdx, eax"], [466, "mov rax, rdx"], [467, "shl rax, 3"], [468, "sub rax, rdx"], [469, "add rax, 5F1F61h"], [470, "mov [rax], cl"], [471, "mov eax, [rbp+var_8]"], [472, "add eax, 1"], [473, "movsxd rcx, eax"], [474, "mov eax, [rbp+var_4]"], [475, "movsxd rdx, eax"], [476, "mov rax, rdx"], [477, "shl rax, 3"], [478, "sub rax, rdx"], [479, "add rax, rcx"], [480, "add rax, 603320h"], [481, "movzx eax, byte ptr [rax]"], [482, "movzx eax, al"], [483, "cdqe"], [484, "mov eax, [rbp+rax*4+var_A0]"], [485, "mov ecx, eax"], [486, "mov eax, [rbp+var_4]"], [487, "movsxd rdx, eax"], [488, "mov rax, rdx"], [489, "shl rax, 3"], [490, "sub rax, rdx"], [491, "add rax, 5F1F60h"], [492, "mov [rax], cl"], [493, "mov [rbp+var_C], 0"], [494, "mov [rbp+var_10], 2"], [495, "jmp loc_4180AA"], [496, "mov eax, [rbp+var_C]"], [497, "cmp eax, [rbp+var_8]"], [498, "jz loc_4180A6"], [499, "mov [rbp+var_14], 0"], [500, "jmp short loc_41805E"], [501, "mov eax, [rbp+var_C]"], [502, "movsxd rcx, eax"], [503, "mov eax, [rbp+var_4]"], [504, "movsxd rdx, eax"], [505, "mov rax, rdx"], [506, "shl rax, 3"], [507, "sub rax, rdx"], [508, "add rax, rcx"], [509, "add rax, 603320h"], [510, "movzx eax, byte ptr [rax]"], [511, "movzx eax, al"], [512, "cdqe"], [513, "mov eax, [rbp+rax*4+var_A0]"], [514, "mov esi, eax"], [515, "mov eax, [rbp+var_14]"], [516, "mov ecx, eax"], [517, "mov eax, [rbp+var_10]"], [518, "lea edx, [rax+1]"], [519, "mov [rbp+var_10], edx"], [520, "add ecx, esi"], [521, "movsxd rsi, eax"], [522, "mov eax, [rbp+var_4]"], [523, "movsxd rdx, eax"], [524, "mov rax, rdx"], [525, "shl rax, 3"], [526, "sub rax, rdx"], [527, "add rax, rsi"], [528, "add rax, 5F1F60h"], [529, "mov [rax], cl"], [530, "add [rbp+var_14], 1"], [531, "mov eax, [rbp+var_C]"], [532, "movsxd rcx, eax"], [533, "mov eax, [rbp+var_4]"], [534, "movsxd rdx, eax"], [535, "mov rax, rdx"], [536, "shl rax, 3"], [537, "sub rax, rdx"], [538, "add rax, rcx"], [539, "add rax, 603320h"], [540, "movzx eax, byte ptr [rax]"], [541, "movzx eax, al"], [542, "lea rdx, ds:0[rax*4]"], [543, "mov rax, [rbp+var_D8]"], [544, "add rax, rdx"], [545, "mov eax, [rax]"], [546, "cmp [rbp+var_14], eax"], [547, "jl loc_417FFC"], [548, "add [rbp+var_C], 1"], [549, "jmp short loc_4180AA"], [550, "add [rbp+var_C], 2"], [551, "mov eax, cs:dword_603310"], [552, "cmp [rbp+var_C], eax"], [553, "jl loc_417FE7"], [554, "mov eax, [rbp+var_8]"], [555, "mov edx, eax"], [556, "mov eax, [rbp+var_4]"], [557, "cdqe"], [558, "mov ds:byte_5EF7E0[rax], dl"], [559, "add [rbp+var_4], 1"], [560, "mov eax, cs:dword_603314"], [561, "cmp [rbp+var_4], eax"], [562, "jl loc_417E28"], [563, "jmp loc_4182C3"], [564, "movzx eax, cs:byte_5EF490"], [565, "movzx eax, al"], [566, "sub eax, 1"], [567, "mov [rbp+var_18], eax"], [568, "mov [rbp+var_4], 0"], [569, "jmp loc_4182B4"], [570, "mov eax, cs:dword_603310"], [571, "sub eax, 1"], [572, "mov [rbp+var_8], eax"], [573, "jmp short loc_41814D"], [574, "mov eax, [rbp+var_8]"], [575, "movsxd rcx, eax"], [576, "mov eax, [rbp+var_4]"], [577, "movsxd rdx, eax"], [578, "mov rax, rdx"], [579, "shl rax, 3"], [580, "sub rax, rdx"], [581, "add rax, rcx"], [582, "add rax, 603320h"], [583, "movzx eax, byte ptr [rax]"], [584, "movzx eax, al"], [585, "lea rdx, ds:0[rax*4]"], [586, "mov rax, [rbp+var_D8]"], [587, "add rax, rdx"], [588, "mov eax, [rax]"], [589, "cmp [rbp+var_18], eax"], [590, "jz short loc_418155"], [591, "sub [rbp+var_8], 1"], [592, "cmp [rbp+var_8], 0"], [593, "jns short loc_41810B"], [594, "jmp short loc_418156"], [595, "nop"], [596, "mov [rbp+var_C], 0"], [597, "jmp short loc_4181BA"], [598, "mov eax, [rbp+var_8]"], [599, "movsxd rcx, eax"], [600, "mov eax, [rbp+var_4]"], [601, "movsxd rdx, eax"], [602, "mov rax, rdx"], [603, "shl rax, 3"], [604, "sub rax, rdx"], [605, "add rax, rcx"], [606, "add rax, 603320h"], [607, "movzx eax, byte ptr [rax]"], [608, "movzx eax, al"], [609, "cdqe"], [610, "mov eax, [rbp+rax*4+var_A0]"], [611, "mov edx, eax"], [612, "mov eax, [rbp+var_C]"], [613, "lea ecx, [rdx+rax]"], [614, "mov eax, [rbp+var_C]"], [615, "movsxd rsi, eax"], [616, "mov eax, [rbp+var_4]"], [617, "movsxd rdx, eax"], [618, "mov rax, rdx"], [619, "shl rax, 3"], [620, "sub rax, rdx"], [621, "add rax, rsi"], [622, "add rax, 5F1F60h"], [623, "mov [rax], cl"], [624, "add [rbp+var_C], 1"], [625, "mov eax, [rbp+var_C]"], [626, "cmp eax, [rbp+var_18]"], [627, "jl short loc_41815F"], [628, "mov [rbp+var_C], 0"], [629, "mov eax, [rbp+var_18]"], [630, "mov [rbp+var_10], eax"], [631, "jmp loc_418291"], [632, "mov eax, [rbp+var_C]"], [633, "cmp eax, [rbp+var_8]"], [634, "jz loc_41828D"], [635, "mov [rbp+var_14], 0"], [636, "jmp short loc_41824B"], [637, "mov eax, [rbp+var_C]"], [638, "movsxd rcx, eax"], [639, "mov eax, [rbp+var_4]"], [640, "movsxd rdx, eax"], [641, "mov rax, rdx"], [642, "shl rax, 3"], [643, "sub rax, rdx"], [644, "add rax, rcx"], [645, "add rax, 603320h"], [646, "movzx eax, byte ptr [rax]"], [647, "movzx eax, al"], [648, "cdqe"], [649, "mov eax, [rbp+rax*4+var_A0]"], [650, "mov esi, eax"], [651, "mov eax, [rbp+var_14]"], [652, "mov ecx, eax"], [653, "mov eax, [rbp+var_10]"], [654, "lea edx, [rax+1]"], [655, "mov [rbp+var_10], edx"], [656, "add ecx, esi"], [657, "movsxd rsi, eax"], [658, "mov eax, [rbp+var_4]"], [659, "movsxd rdx, eax"], [660, "mov rax, rdx"], [661, "shl rax, 3"], [662, "sub rax, rdx"], [663, "add rax, rsi"], [664, "add rax, 5F1F60h"], [665, "mov [rax], cl"], [666, "add [rbp+var_14], 1"], [667, "mov eax, [rbp+var_C]"], [668, "movsxd rcx, eax"], [669, "mov eax, [rbp+var_4]"], [670, "movsxd rdx, eax"], [671, "mov rax, rdx"], [672, "shl rax, 3"], [673, "sub rax, rdx"], [674, "add rax, rcx"], [675, "add rax, 603320h"], [676, "movzx eax, byte ptr [rax]"], [677, "movzx eax, al"], [678, "lea rdx, ds:0[rax*4]"], [679, "mov rax, [rbp+var_D8]"], [680, "add rax, rdx"], [681, "mov eax, [rax]"], [682, "cmp [rbp+var_14], eax"], [683, "jl loc_4181E9"], [684, "add [rbp+var_C], 1"], [685, "mov eax, cs:dword_603310"], [686, "cmp [rbp+var_C], eax"], [687, "jl loc_4181D4"], [688, "mov eax, [rbp+var_8]"], [689, "mov edx, eax"], [690, "mov eax, [rbp+var_4]"], [691, "cdqe"], [692, "mov ds:byte_5EF7E0[rax], dl"], [693, "add [rbp+var_4], 1"], [694, "mov eax, cs:dword_603314"], [695, "cmp [rbp+var_4], eax"], [696, "jl loc_4180FD"], [697, "mov [rbp+var_4], 0"], [698, "jmp loc_4185A5"], [699, "mov eax, [rbp+var_4]"], [700, "add eax, 1"], [701, "mov [rbp+var_8], eax"], [702, "jmp loc_418592"], [703, "mov [rbp+var_C], 0"], [704, "jmp short loc_418360"], [705, "mov eax, [rbp+var_C]"], [706, "movsxd rcx, eax"], [707, "mov eax, [rbp+var_4]"], [708, "movsxd rdx, eax"], [709, "mov rax, rdx"], [710, "shl rax, 3"], [711, "sub rax, rdx"], [712, "add rax, rcx"], [713, "add rax, 603320h"], [714, "movzx eax, byte ptr [rax]"], [715, "movzx eax, al"], [716, "lea rdx, ds:0[rax*4]"], [717, "mov rax, [rbp+var_D8]"], [718, "add rax, rdx"], [719, "mov ecx, [rax]"], [720, "mov eax, [rbp+var_C]"], [721, "movsxd rsi, eax"], [722, "mov eax, [rbp+var_8]"], [723, "movsxd rdx, eax"], [724, "mov rax, rdx"], [725, "shl rax, 3"], [726, "sub rax, rdx"], [727, "add rax, rsi"], [728, "add rax, 603320h"], [729, "movzx eax, byte ptr [rax]"], [730, "movzx eax, al"], [731, "lea rdx, ds:0[rax*4]"], [732, "mov rax, [rbp+var_D8]"], [733, "add rax, rdx"], [734, "mov eax, [rax]"], [735, "cmp ecx, eax"], [736, "jnz short loc_418371"], [737, "add [rbp+var_C], 1"], [738, "mov eax, cs:dword_603310"], [739, "cmp [rbp+var_C], eax"], [740, "jl loc_4182E6"], [741, "jmp short loc_418372"], [742, "nop"], [743, "mov eax, cs:dword_603310"], [744, "cmp [rbp+var_C], eax"], [745, "jge loc_41858E"], [746, "mov eax, [rbp+var_C]"], [747, "movsxd rcx, eax"], [748, "mov eax, [rbp+var_4]"], [749, "movsxd rdx, eax"], [750, "mov rax, rdx"], [751, "shl rax, 3"], [752, "sub rax, rdx"], [753, "add rax, rcx"], [754, "add rax, 603320h"], [755, "movzx eax, byte ptr [rax]"], [756, "movzx eax, al"], [757, "lea rdx, ds:0[rax*4]"], [758, "mov rax, [rbp+var_D8]"], [759, "add rax, rdx"], [760, "mov ecx, [rax]"], [761, "mov eax, [rbp+var_C]"], [762, "movsxd rsi, eax"], [763, "mov eax, [rbp+var_8]"], [764, "movsxd rdx, eax"], [765, "mov rax, rdx"], [766, "shl rax, 3"], [767, "sub rax, rdx"], [768, "add rax, rsi"], [769, "add rax, 603320h"], [770, "movzx eax, byte ptr [rax]"], [771, "movzx eax, al"], [772, "lea rdx, ds:0[rax*4]"], [773, "mov rax, [rbp+var_D8]"], [774, "add rax, rdx"], [775, "mov eax, [rax]"], [776, "cmp ecx, eax"], [777, "jle loc_41858E"], [778, "mov [rbp+var_C], 0"], [779, "jmp loc_418499"], [780, "mov eax, [rbp+var_C]"], [781, "movsxd rcx, eax"], [782, "mov eax, [rbp+var_4]"], [783, "movsxd rdx, eax"], [784, "mov rax, rdx"], [785, "shl rax, 3"], [786, "sub rax, rdx"], [787, "add rax, rcx"], [788, "add rax, 603320h"], [789, "movzx eax, byte ptr [rax]"], [790, "mov [rbp+var_19], al"], [791, "mov eax, [rbp+var_C]"], [792, "movsxd rcx, eax"], [793, "mov eax, [rbp+var_8]"], [794, "movsxd rdx, eax"], [795, "mov rax, rdx"], [796, "shl rax, 3"], [797, "sub rax, rdx"], [798, "add rax, rcx"], [799, "add rax, 603320h"], [800, "movzx edx, byte ptr [rax]"], [801, "mov eax, [rbp+var_C]"], [802, "movsxd rsi, eax"], [803, "mov eax, [rbp+var_4]"], [804, "movsxd rcx, eax"], [805, "mov rax, rcx"], [806, "shl rax, 3"], [807, "sub rax, rcx"], [808, "add rax, rsi"], [809, "add rax, 603320h"], [810, "mov [rax], dl"], [811, "mov eax, [rbp+var_C]"], [812, "movsxd rcx, eax"], [813, "mov eax, [rbp+var_8]"], [814, "movsxd rdx, eax"], [815, "mov rax, rdx"], [816, "shl rax, 3"], [817, "sub rax, rdx"], [818, "add rax, rcx"], [819, "lea rdx, unk_603320[rax]"], [820, "movzx eax, [rbp+var_19]"], [821, "mov [rdx], al"], [822, "add [rbp+var_C], 1"], [823, "mov eax, cs:dword_603310"], [824, "cmp [rbp+var_C], eax"], [825, "jl loc_418407"], [826, "mov [rbp+var_C], 0"], [827, "jmp loc_418546"], [828, "mov eax, [rbp+var_C]"], [829, "movsxd rcx, eax"], [830, "mov eax, [rbp+var_4]"], [831, "movsxd rdx, eax"], [832, "mov rax, rdx"], [833, "shl rax, 3"], [834, "sub rax, rdx"], [835, "add rax, rcx"], [836, "add rax, 5F1F60h"], [837, "movzx eax, byte ptr [rax]"], [838, "mov [rbp+var_19], al"], [839, "mov eax, [rbp+var_C]"], [840, "movsxd rcx, eax"], [841, "mov eax, [rbp+var_8]"], [842, "movsxd rdx, eax"], [843, "mov rax, rdx"], [844, "shl rax, 3"], [845, "sub rax, rdx"], [846, "add rax, rcx"], [847, "add rax, 5F1F60h"], [848, "movzx edx, byte ptr [rax]"], [849, "mov eax, [rbp+var_C]"], [850, "movsxd rsi, eax"], [851, "mov eax, [rbp+var_4]"], [852, "movsxd rcx, eax"], [853, "mov rax, rcx"], [854, "shl rax, 3"], [855, "sub rax, rcx"], [856, "add rax, rsi"], [857, "add rax, 5F1F60h"], [858, "mov [rax], dl"], [859, "mov eax, [rbp+var_C]"], [860, "movsxd rcx, eax"], [861, "mov eax, [rbp+var_8]"], [862, "movsxd rdx, eax"], [863, "mov rax, rdx"], [864, "shl rax, 3"], [865, "sub rax, rdx"], [866, "add rax, rcx"], [867, "lea rdx, unk_5F1F60[rax]"], [868, "movzx eax, [rbp+var_19]"], [869, "mov [rdx], al"], [870, "add [rbp+var_C], 1"], [871, "movzx eax, cs:byte_5EF48D"], [872, "movzx eax, al"], [873, "cmp [rbp+var_C], eax"], [874, "jl loc_4184B4"], [875, "mov eax, [rbp+var_4]"], [876, "cdqe"], [877, "movzx eax, ds:byte_5EF7E0[rax]"], [878, "mov [rbp+var_19], al"], [879, "mov eax, [rbp+var_8]"], [880, "cdqe"], [881, "movzx edx, ds:byte_5EF7E0[rax]"], [882, "mov eax, [rbp+var_4]"], [883, "cdqe"], [884, "mov ds:byte_5EF7E0[rax], dl"], [885, "mov eax, [rbp+var_8]"], [886, "cdqe"], [887, "movzx edx, [rbp+var_19]"], [888, "mov ds:byte_5EF7E0[rax], dl"], [889, "add [rbp+var_8], 1"], [890, "mov eax, cs:dword_603314"], [891, "cmp [rbp+var_8], eax"], [892, "jl loc_4182DD"], [893, "add [rbp+var_4], 1"], [894, "mov eax, cs:dword_603314"], [895, "cmp [rbp+var_4], eax"], [896, "jl loc_4182CF"], [897, "mov [rbp+var_4], 0"], [898, "jmp short loc_418625"], [899, "mov [rbp+var_8], 0"], [900, "jmp short loc_418612"], [901, "mov eax, [rbp+var_8]"], [902, "movsxd rcx, eax"], [903, "mov eax, [rbp+var_4]"], [904, "movsxd rdx, eax"], [905, "mov rax, rdx"], [906, "shl rax, 3"], [907, "sub rax, rdx"], [908, "add rax, rcx"], [909, "add rax, 5F1F60h"], [910, "movzx eax, byte ptr [rax]"], [911, "movzx eax, al"], [912, "mov edx, [rbp+var_8]"], [913, "mov ecx, edx"], [914, "movsxd rsi, eax"], [915, "mov eax, [rbp+var_4]"], [916, "movsxd rdx, eax"], [917, "mov rax, rdx"], [918, "shl rax, 3"], [919, "sub rax, rdx"], [920, "add rax, rsi"], [921, "add rax, 5FA940h"], [922, "mov [rax], cl"], [923, "add [rbp+var_8], 1"], [924, "movzx eax, cs:byte_5EF48D"], [925, "movzx eax, al"], [926, "cmp [rbp+var_8], eax"], [927, "jl short loc_4185C6"], [928, "add [rbp+var_4], 1"], [929, "mov eax, cs:dword_603314"], [930, "cmp [rbp+var_4], eax"], [931, "jl short loc_4185BD"], [932, "movzx eax, cs:byte_5EF7E0"], [933, "movzx ecx, al"], [934, "lea rdx, [rbp+var_A7]"], [935, "mov rax, [rbp+var_D8]"], [936, "mov esi, offset unk_603320"], [937, "mov rdi, rax"], [938, "call sub_417513"], [939, "movzx eax, cs:byte_5EF7E0"], [940, "movzx esi, al"], [941, "movzx eax, cs:byte_5EF48D"], [942, "movzx eax, al"], [943, "lea rcx, [rbp+var_A7]"], [944, "lea rdx, [rbp+var_D0]"], [945, "mov edi, eax"], [946, "call sub_404036"], [947, "movzx eax, cs:byte_5EF490"], [948, "movzx edi, al"], [949, "movzx eax, cs:byte_5EF7E0"], [950, "movzx edx, al"], [951, "movzx eax, cs:byte_5EF48D"], [952, "movzx esi, al"], [953, "lea rcx, [rbp+var_A7]"], [954, "lea rax, [rbp+var_60]"], [955, "mov r8d, edi"], [956, "mov rdi, rax"], [957, "call sub_405AC4"], [958, "mov cs:qword_615BC0, rax"], [959, "mov rax, cs:qword_615BC0"], [960, "mov rsi, rax"], [961, "mov edi, offset aTbSizeLu"], [962, "mov eax, 0"], [963, "call _printf"], [964, "movzx eax, cs:byte_5EF48D"], [965, "movzx edx, al"], [966, "mov rax, cs:qword_615BC0"], [967, "mov esi, edx"], [968, "mov rdi, rax"], [969, "call sub_41729F"], [970, "movzx eax, cs:byte_5EF48D"], [971, "movzx eax, al"], [972, "mov edi, eax"], [973, "call sub_4177D2"], [974, "mov rcx, cs:qword_615BC0"], [975, "mov eax, cs:dword_96D2D90"], [976, "mov edx, 0"], [977, "mov rsi, rcx"], [978, "mov edi, eax"], [979, "call sub_429DF9"], [980, "mov cs:qword_5EF460, rax"], [981, "mov rax, cs:qword_615BC0"], [982, "leave"], [983, "retn"]], "data_dep": [[8, 22], [8, 5], [10, 10], [10, 19], [11, 3], [12, 11], [12, 10], [13, 12], [14, 13], [15, 14], [16, 6], [16, 18], [17, 10], [17, 16], [18, 17], [19, 22], [19, 5], [21, 19], [22, 5], [22, 22], [23, 22], [23, 5], [24, 23], [25, 6], [25, 18], [26, 25], [30, 27], [30, 39], [32, 19], [32, 32], [32, 10], [33, 3], [34, 33], [34, 32], [35, 34], [36, 35], [37, 36], [38, 38], [38, 28], [39, 27], [39, 39], [40, 27], [40, 39], [41, 40], [42, 38], [42, 28], [43, 42], [46, 38], [46, 28], [47, 46], [53, 51], [53, 76], [55, 63], [55, 19], [55, 32], [55, 10], [55, 55], [55, 71], [56, 3], [57, 56], [57, 55], [58, 57], [59, 58], [59, 50], [59, 75], [60, 59], [61, 51], [61, 76], [63, 55], [64, 3], [65, 63], [65, 64], [66, 65], [67, 66], [68, 67], [69, 51], [69, 76], [71, 63], [72, 3], [73, 72], [73, 71], [74, 73], [75, 74], [76, 76], [76, 51], [77, 76], [77, 51], [78, 77], [79, 50], [79, 75], [80, 79], [81, 80], [85, 93], [85, 82], [86, 94], [86, 83], [88, 88], [89, 3], [90, 89], [90, 88], [91, 90], [92, 91], [92, 85], [93, 92], [94, 94], [94, 83], [95, 94], [95, 83], [96, 95], [97, 26], [98, 97], [104, 102], [104, 116], [106, 109], [106, 10], [106, 55], [106, 71], [106, 63], [106, 128], [106, 85], [106, 19], [106, 32], [107, 4], [108, 106], [108, 107], [109, 108], [110, 130], [110, 100], [112, 21], [113, 112], [114, 113], [114, 109], [115, 114], [116, 116], [116, 102], [117, 82], [117, 93], [118, 117], [119, 116], [119, 118], [119, 102], [120, 119], [123, 130], [123, 100], [125, 21], [126, 125], [128, 102], [128, 116], [129, 126], [129, 128], [130, 130], [130, 100], [131, 26], [132, 131], [132, 130], [132, 100], [133, 132], [134, 44], [134, 81], [134, 48], [135, 134], [136, 135], [139, 26], [140, 139], [141, 140], [143, 141], [143, 196], [144, 143], [145, 364], [145, 137], [146, 145], [147, 146], [148, 147], [149, 146], [149, 148], [150, 149], [150, 144], [151, 150], [152, 227], [152, 151], [152, 275], [152, 297], [152, 253], [152, 334], [153, 152], [154, 146], [155, 3], [156, 155], [156, 154], [157, 275], [157, 297], [157, 253], [157, 334], [157, 156], [157, 227], [158, 157], [159, 158], [160, 141], [160, 196], [161, 160], [162, 161], [163, 137], [163, 364], [164, 163], [165, 164], [166, 165], [167, 164], [167, 166], [168, 162], [168, 167], [169, 168], [170, 275], [170, 297], [170, 253], [170, 169], [170, 334], [170, 227], [171, 170], [172, 164], [173, 3], [174, 173], [174, 172], [175, 334], [175, 227], [175, 174], [175, 275], [175, 297], [175, 253], [176, 175], [177, 176], [178, 141], [178, 196], [179, 178], [180, 179], [181, 364], [181, 137], [182, 181], [183, 182], [184, 183], [185, 182], [185, 184], [186, 185], [186, 180], [187, 186], [188, 227], [188, 275], [188, 297], [188, 253], [188, 187], [188, 334], [189, 188], [190, 182], [191, 3], [192, 190], [192, 191], [193, 253], [193, 275], [193, 297], [193, 334], [193, 192], [193, 227], [194, 193], [195, 194], [196, 141], [196, 196], [197, 141], [197, 196], [198, 197], [201, 141], [201, 196], [202, 201], [203, 205], [204, 203], [205, 204], [208, 205], [209, 206], [209, 228], [210, 209], [211, 208], [212, 211], [213, 212], [214, 211], [214, 213], [215, 210], [215, 214], [216, 215], [217, 275], [217, 297], [217, 253], [217, 334], [217, 216], [217, 227], [218, 206], [218, 228], [219, 218], [220, 364], [220, 137], [221, 220], [222, 221], [223, 222], [224, 223], [224, 221], [225, 224], [225, 219], [226, 225], [227, 226], [227, 217], [228, 206], [228, 228], [229, 26], [230, 206], [230, 228], [230, 229], [231, 230], [233, 196], [233, 141], [234, 233], [235, 364], [235, 137], [236, 235], [237, 236], [238, 237], [239, 236], [239, 238], [240, 234], [240, 239], [241, 240], [242, 297], [242, 241], [242, 334], [242, 227], [242, 253], [242, 275], [243, 242], [245, 243], [245, 129], [246, 245], [247, 137], [247, 364], [248, 247], [249, 248], [250, 249], [251, 250], [251, 248], [252, 251], [253, 252], [253, 246], [254, 141], [254, 196], [255, 254], [256, 255], [257, 364], [257, 137], [258, 257], [259, 258], [260, 259], [261, 258], [261, 260], [262, 261], [262, 256], [263, 262], [264, 263], [264, 253], [265, 264], [267, 129], [267, 265], [268, 267], [269, 364], [269, 137], [270, 269], [271, 270], [272, 271], [273, 270], [273, 272], [274, 273], [275, 268], [275, 274], [276, 141], [276, 196], [277, 276], [278, 277], [279, 364], [279, 137], [280, 279], [281, 280], [282, 281], [283, 280], [283, 282], [284, 283], [284, 278], [285, 284], [286, 285], [286, 275], [287, 286], [289, 129], [289, 287], [290, 289], [291, 137], [291, 364], [292, 291], [293, 292], [294, 293], [295, 292], [295, 294], [296, 295], [297, 290], [297, 296], [301, 298], [301, 353], [301, 355], [302, 301], [302, 141], [302, 196], [303, 302], [306, 298], [306, 353], [306, 355], [307, 306], [308, 137], [308, 364], [309, 308], [310, 309], [311, 310], [312, 309], [312, 311], [313, 307], [313, 312], [314, 313], [315, 227], [315, 253], [315, 275], [315, 297], [315, 334], [315, 314], [316, 315], [318, 316], [318, 129], [319, 318], [320, 304], [320, 335], [321, 320], [322, 299], [322, 324], [323, 297], [323, 309], [323, 253], [323, 275], [323, 322], [323, 334], [323, 227], [324, 323], [325, 321], [325, 319], [326, 322], [327, 137], [327, 364], [328, 327], [329, 328], [330, 329], [331, 328], [331, 330], [332, 326], [332, 331], [333, 332], [334, 333], [334, 325], [335, 304], [335, 335], [336, 298], [336, 353], [336, 355], [337, 336], [338, 137], [338, 364], [339, 338], [340, 339], [341, 340], [342, 341], [342, 339], [343, 337], [343, 342], [344, 343], [345, 227], [345, 253], [345, 275], [345, 297], [345, 344], [345, 334], [346, 345], [347, 339], [348, 3], [349, 347], [349, 348], [350, 349], [350, 253], [350, 275], [350, 297], [350, 334], [350, 227], [351, 350], [351, 304], [351, 335], [352, 351], [353, 298], [353, 353], [353, 355], [355, 298], [355, 353], [355, 355], [356, 26], [357, 353], [357, 355], [357, 356], [357, 298], [358, 357], [359, 196], [359, 141], [360, 359], [361, 364], [361, 137], [363, 360], [364, 137], [364, 364], [365, 205], [366, 137], [366, 364], [366, 365], [367, 366], [369, 44], [369, 81], [369, 48], [370, 369], [371, 370], [374, 26], [375, 374], [376, 375], [378, 376], [378, 413], [379, 378], [380, 559], [380, 372], [381, 380], [382, 381], [383, 382], [384, 381], [384, 383], [385, 384], [385, 379], [386, 385], [387, 492], [387, 529], [387, 386], [387, 444], [387, 470], [388, 387], [389, 381], [390, 3], [391, 389], [391, 390], [392, 529], [392, 444], [392, 470], [392, 391], [392, 492], [393, 392], [394, 393], [395, 376], [395, 413], [396, 395], [397, 396], [398, 559], [398, 372], [399, 398], [400, 399], [401, 400], [402, 399], [402, 401], [403, 397], [403, 402], [404, 403], [405, 444], [405, 470], [405, 404], [405, 492], [405, 529], [406, 405], [407, 399], [408, 3], [409, 407], [409, 408], [410, 409], [410, 444], [410, 470], [410, 492], [410, 529], [411, 410], [412, 411], [413, 413], [413, 376], [414, 376], [414, 413], [415, 414], [418, 376], [418, 413], [419, 418], [420, 422], [421, 420], [422, 421], [425, 422], [426, 423], [426, 445], [427, 426], [428, 425], [429, 428], [430, 429], [431, 428], [431, 430], [432, 427], [432, 431], [433, 432], [434, 470], [434, 492], [434, 529], [434, 444], [434, 433], [435, 423], [435, 445], [436, 435], [437, 372], [437, 559], [438, 437], [439, 438], [440, 439], [441, 440], [441, 438], [442, 436], [442, 441], [443, 442], [444, 443], [444, 434], [445, 423], [445, 445], [446, 26], [447, 446], [447, 423], [447, 445], [448, 447], [450, 376], [450, 413], [451, 450], [452, 559], [452, 372], [453, 452], [454, 453], [455, 454], [456, 453], [456, 455], [457, 456], [457, 451], [458, 457], [459, 458], [459, 470], [459, 492], [459, 529], [459, 444], [460, 459], [462, 460], [462, 129], [463, 462], [464, 559], [464, 372], [465, 464], [466, 465], [467, 466], [468, 465], [468, 467], [469, 468], [470, 463], [470, 469], [471, 376], [471, 413], [472, 471], [473, 472], [474, 559], [474, 372], [475, 474], [476, 475], [477, 476], [478, 475], [478, 477], [479, 478], [479, 473], [480, 479], [481, 480], [481, 470], [482, 481], [484, 129], [484, 482], [485, 484], [486, 372], [486, 559], [487, 486], [488, 487], [489, 488], [490, 487], [490, 489], [491, 490], [492, 491], [492, 485], [496, 493], [496, 548], [496, 550], [497, 496], [497, 376], [497, 413], [498, 497], [501, 493], [501, 548], [501, 550], [502, 501], [503, 559], [503, 372], [504, 503], [505, 504], [506, 505], [507, 506], [507, 504], [508, 507], [508, 502], [509, 508], [510, 444], [510, 470], [510, 492], [510, 529], [510, 509], [511, 510], [513, 129], [513, 511], [514, 513], [515, 530], [515, 499], [516, 515], [517, 494], [517, 519], [518, 529], [518, 444], [518, 470], [518, 492], [518, 504], [518, 517], [519, 518], [520, 514], [520, 516], [521, 517], [522, 559], [522, 372], [523, 522], [524, 523], [525, 524], [526, 523], [526, 525], [527, 521], [527, 526], [528, 527], [529, 520], [529, 528], [530, 530], [530, 499], [531, 493], [531, 548], [531, 550], [532, 531], [533, 559], [533, 372], [534, 533], [535, 534], [536, 535], [537, 534], [537, 536], [538, 537], [538, 532], [539, 538], [540, 539], [540, 529], [540, 444], [540, 492], [540, 470], [541, 540], [542, 534], [543, 3], [544, 542], [544, 543], [545, 444], [545, 492], [545, 470], [545, 529], [545, 544], [546, 545], [546, 530], [546, 499], [547, 546], [548, 493], [548, 548], [548, 550], [550, 493], [550, 548], [550, 550], [551, 26], [552, 493], [552, 548], [552, 551], [552, 550], [553, 552], [554, 376], [554, 413], [555, 554], [556, 559], [556, 372], [558, 555], [559, 559], [559, 372], [560, 422], [561, 559], [561, 372], [561, 560], [562, 561], [564, 44], [564, 81], [564, 48], [565, 564], [566, 565], [567, 566], [570, 26], [571, 570], [572, 571], [574, 591], [574, 572], [575, 574], [576, 568], [576, 693], [577, 576], [578, 577], [579, 578], [580, 579], [580, 577], [581, 580], [581, 575], [582, 581], [583, 582], [583, 665], [583, 623], [584, 583], [585, 577], [586, 3], [587, 585], [587, 586], [588, 587], [588, 665], [588, 623], [589, 588], [589, 567], [590, 589], [591, 591], [591, 572], [592, 591], [592, 572], [593, 592], [598, 591], [598, 572], [599, 598], [600, 693], [600, 568], [601, 600], [602, 601], [603, 602], [604, 601], [604, 603], [605, 604], [605, 599], [606, 605], [607, 606], [607, 665], [607, 623], [608, 607], [610, 129], [610, 608], [611, 610], [612, 624], [612, 596], [613, 612], [613, 665], [613, 599], [613, 623], [614, 624], [614, 596], [615, 614], [616, 693], [616, 568], [617, 616], [618, 617], [619, 618], [620, 619], [620, 617], [621, 620], [621, 615], [622, 621], [623, 622], [623, 613], [624, 596], [624, 624], [625, 624], [625, 596], [626, 567], [626, 625], [627, 626], [629, 567], [630, 629], [632, 684], [632, 628], [633, 591], [633, 572], [633, 632], [634, 633], [637, 684], [637, 628], [638, 637], [639, 568], [639, 693], [640, 639], [641, 640], [642, 641], [643, 640], [643, 642], [644, 638], [644, 643], [645, 644], [646, 623], [646, 645], [646, 665], [647, 646], [649, 129], [649, 647], [650, 649], [651, 666], [651, 635], [652, 651], [653, 630], [653, 655], [654, 640], [654, 653], [654, 665], [654, 623], [655, 654], [656, 652], [656, 650], [657, 653], [658, 568], [658, 693], [659, 658], [660, 659], [661, 660], [662, 659], [662, 661], [663, 662], [663, 657], [664, 663], [665, 664], [665, 656], [666, 666], [666, 635], [667, 684], [667, 628], [668, 667], [669, 568], [669, 693], [670, 669], [671, 670], [672, 671], [673, 672], [673, 670], [674, 668], [674, 673], [675, 674], [676, 675], [676, 665], [676, 623], [677, 676], [678, 670], [679, 3], [680, 679], [680, 678], [681, 623], [681, 680], [681, 665], [682, 681], [682, 635], [682, 666], [683, 682], [684, 684], [684, 628], [685, 26], [686, 685], [686, 684], [686, 628], [687, 686], [688, 572], [688, 591], [689, 688], [690, 693], [690, 568], [692, 689], [693, 568], [693, 693], [695, 568], [695, 693], [695, 694], [696, 695], [699, 697], [699, 893], [700, 699], [701, 700], [705, 703], [705, 737], [706, 705], [707, 893], [707, 697], [708, 707], [709, 708], [710, 709], [711, 708], [711, 710], [712, 706], [712, 711], [713, 712], [714, 665], [714, 334], [714, 821], [714, 470], [714, 810], [714, 623], [714, 227], [714, 492], [714, 858], [714, 275], [714, 713], [714, 297], [714, 529], [714, 869], [714, 253], [714, 444], [715, 714], [716, 708], [717, 3], [718, 716], [718, 717], [719, 718], [719, 253], [719, 444], [719, 665], [719, 334], [719, 821], [719, 470], [719, 810], [719, 623], [719, 227], [719, 492], [719, 858], [719, 275], [719, 297], [719, 529], [719, 869], [720, 703], [720, 737], [721, 720], [722, 889], [722, 701], [723, 722], [724, 723], [725, 724], [726, 723], [726, 725], [727, 726], [727, 721], [728, 727], [729, 470], [729, 810], [729, 623], [729, 227], [729, 492], [729, 858], [729, 275], [729, 297], [729, 529], [729, 869], [729, 728], [729, 253], [729, 444], [729, 665], [729, 334], [729, 821], [730, 729], [731, 723], [732, 3], [733, 732], [733, 731], [734, 297], [734, 529], [734, 869], [734, 253], [734, 444], [734, 665], [734, 334], [734, 733], [734, 821], [734, 470], [734, 810], [734, 623], [734, 227], [734, 492], [734, 858], [734, 275], [735, 719], [735, 734], [736, 735], [737, 703], [737, 737], [738, 26], [739, 737], [739, 703], [739, 738], [740, 739], [743, 26], [744, 743], [744, 737], [744, 703], [745, 744], [746, 737], [746, 703], [747, 746], [748, 697], [748, 893], [749, 748], [750, 749], [751, 750], [752, 749], [752, 751], [753, 752], [753, 747], [754, 753], [755, 444], [755, 754], [755, 665], [755, 334], [755, 821], [755, 470], [755, 810], [755, 623], [755, 227], [755, 492], [755, 858], [755, 275], [755, 297], [755, 529], [755, 869], [755, 253], [756, 755], [757, 749], [758, 3], [759, 758], [759, 757], [760, 334], [760, 821], [760, 470], [760, 810], [760, 623], [760, 227], [760, 492], [760, 858], [760, 275], [760, 759], [760, 297], [760, 529], [760, 869], [760, 253], [760, 444], [760, 665], [761, 703], [761, 737], [762, 761], [763, 701], [763, 889], [764, 763], [765, 764], [766, 765], [767, 764], [767, 766], [768, 762], [768, 767], [769, 768], [770, 275], [770, 769], [770, 297], [770, 529], [770, 253], [770, 334], [770, 444], [770, 810], [770, 623], [770, 227], [770, 665], [770, 821], [770, 470], [770, 869], [770, 492], [770, 858], [771, 770], [772, 764], [773, 3], [774, 772], [774, 773], [775, 334], [775, 444], [775, 774], [775, 810], [775, 623], [775, 227], [775, 665], [775, 821], [775, 470], [775, 869], [775, 492], [775, 858], [775, 275], [775, 297], [775, 529], [775, 253], [776, 760], [776, 775], [777, 776], [780, 822], [780, 778], [781, 780], [782, 893], [782, 697], [783, 782], [784, 783], [785, 784], [786, 783], [786, 785], [787, 786], [787, 781], [788, 787], [789, 253], [789, 334], [789, 444], [789, 810], [789, 623], [789, 665], [789, 821], [789, 788], [789, 470], [789, 869], [789, 227], [789, 492], [789, 858], [789, 275], [789, 297], [789, 529], [790, 789], [791, 822], [791, 778], [792, 791], [793, 701], [793, 889], [794, 793], [795, 794], [796, 795], [797, 794], [797, 796], [798, 792], [798, 797], [799, 798], [800, 275], [800, 297], [800, 529], [800, 253], [800, 334], [800, 444], [800, 810], [800, 623], [800, 665], [800, 799], [800, 821], [800, 470], [800, 869], [800, 227], [800, 492], [800, 858], [801, 822], [801, 778], [802, 801], [803, 893], [803, 697], [804, 803], [805, 804], [806, 805], [807, 804], [807, 806], [808, 802], [808, 807], [809, 808], [810, 809], [810, 800], [811, 822], [811, 778], [812, 811], [813, 701], [813, 889], [814, 813], [815, 814], [816, 815], [817, 814], [817, 816], [818, 817], [818, 812], [819, 814], [820, 790], [821, 820], [821, 819], [822, 822], [822, 778], [823, 26], [824, 822], [824, 778], [824, 823], [825, 824], [828, 826], [828, 870], [829, 828], [830, 893], [830, 697], [831, 830], [832, 831], [833, 832], [834, 831], [834, 833], [835, 829], [835, 834], [836, 835], [837, 470], [837, 869], [837, 836], [837, 253], [837, 858], [837, 275], [837, 297], [837, 529], [837, 665], [837, 334], [837, 821], [837, 444], [837, 810], [837, 623], [837, 227], [837, 492], [838, 837], [839, 826], [839, 870], [840, 839], [841, 701], [841, 889], [842, 841], [843, 842], [844, 843], [845, 844], [845, 842], [846, 845], [846, 840], [847, 846], [848, 470], [848, 869], [848, 492], [848, 253], [848, 858], [848, 275], [848, 847], [848, 297], [848, 529], [848, 665], [848, 334], [848, 444], [848, 810], [848, 623], [848, 227], [848, 821], [849, 826], [849, 870], [850, 849], [851, 893], [851, 697], [852, 851], [853, 852], [854, 853], [855, 852], [855, 854], [856, 850], [856, 855], [857, 856], [858, 857], [858, 848], [859, 826], [859, 870], [860, 859], [861, 701], [861, 889], [862, 861], [863, 862], [864, 863], [865, 862], [865, 864], [866, 860], [866, 865], [867, 862], [868, 838], [869, 867], [869, 868], [870, 826], [870, 870], [871, 82], [871, 93], [872, 871], [873, 870], [873, 872], [873, 826], [874, 873], [875, 697], [875, 893], [877, 558], [877, 888], [877, 692], [877, 363], [878, 877], [879, 701], [879, 889], [881, 558], [881, 692], [881, 363], [881, 888], [882, 893], [882, 697], [884, 881], [885, 701], [885, 889], [887, 878], [888, 887], [889, 701], [889, 889], [890, 205], [890, 422], [891, 701], [891, 890], [891, 889], [892, 891], [893, 893], [893, 697], [894, 422], [894, 205], [895, 894], [895, 893], [895, 697], [896, 895], [901, 899], [901, 923], [902, 901], [903, 928], [903, 897], [904, 903], [905, 904], [906, 905], [907, 904], [907, 906], [908, 907], [908, 902], [909, 908], [910, 821], [910, 909], [910, 810], [910, 623], [910, 227], [910, 492], [910, 922], [910, 470], [910, 869], [910, 253], [910, 858], [910, 275], [910, 297], [910, 444], [910, 529], [910, 665], [910, 334], [911, 910], [912, 899], [912, 923], [913, 912], [914, 911], [915, 928], [915, 897], [916, 915], [917, 916], [918, 917], [919, 916], [919, 918], [920, 914], [920, 919], [921, 920], [922, 921], [922, 913], [923, 899], [923, 923], [924, 93], [924, 82], [925, 924], [926, 899], [926, 923], [926, 925], [927, 926], [928, 928], [928, 897], [929, 422], [929, 205], [930, 928], [930, 897], [930, 929], [931, 930], [933, 932], [934, 128], [934, 360], [934, 85], [934, 19], [934, 32], [934, 407], [934, 154], [934, 10], [934, 916], [934, 772], [934, 55], [934, 555], [934, 731], [934, 887], [934, 190], [934, 389], [934, 71], [934, 434], [934, 689], [934, 172], [934, 217], [934, 63], [935, 3], [937, 935], [940, 939], [941, 93], [941, 82], [942, 941], [943, 933], [944, 934], [945, 942], [947, 44], [947, 81], [947, 48], [948, 947], [950, 949], [951, 93], [951, 82], [952, 951], [953, 943], [954, 951], [955, 948], [956, 954], [958, 957], [959, 958], [960, 959], [964, 82], [964, 93], [965, 964], [966, 958], [967, 965], [968, 966], [970, 93], [970, 82], [971, 970], [972, 971], [974, 958], [977, 974], [978, 975], [980, 979], [981, 958], [983, 981]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/9e5ed998603d4a4bec6a0155dac36698df46b941b6fa147e44fcff659a57d6e8_9e5ed998603d4a4bec6a0155dac36698df46b941b6fa147e44fcff659a57d6e8.jsonl.gz", "strip_func_name": "sub_417894", "query": "\n\n\n__int64 __fastcall sub_417894(__int64 a1, __int64 a2)\n{\nint v2; // eax\nint v3; // esi\nint v4; // eax\nint v5; // esi\nint v6; // eax\nint v7; // esi\nint v8; // eax\nchar v10[41]; // [rsp+10h] [rbp-D0h] BYREF\nunsigned __int8 v11[71]; // [rsp+39h] [rbp-A7h] BYREF\n__int64 v12[8]; // [rsp+80h] [rbp-60h] BYREF\nunsigned __int8 v13; // [rsp+C7h] [rbp-19h]\nint v14; // [rsp+C8h] [rbp-18h]\nint k; // [rsp+CCh] [rbp-14h]\nint v16; // [rsp+D0h] [rbp-10h]\nint l; // [rsp+D4h] [rbp-Ch]\nint j; // [rsp+D8h] [rbp-8h]\nint i; // [rsp+DCh] [rbp-4h]\n\ni = 0;\nl = 0;\nwhile ( i <= 15 )\n{\nif ( *(_DWORD *)(4LL * i + a1) )\n{\nv2 = l++;\nbyte_603318[v2] = i;\n}\n++i;\n}\ndword_603310 = l;\ni = 0;\nl = 0;\nwhile ( i <= 15 )\n{\nif ( *(_DWORD *)(4LL * i + a1) == 1 )\n++l;\n++i;\n}\nif ( l <= 2 )\n{\nif ( l == 2 )\n{\nbyte_5EF490 = 2;\n}\nelse\n{\nl = 16;\nfor ( i = 0; i <= 15; ++i )\n{\nif ( l > *(_DWORD *)(4LL * i + a1) && *(int *)(4LL * i + a1) > 1 )\nl = *(_DWORD *)(4LL * i + a1);\n}\nbyte_5EF490 = l + 1;\n}\n}\nelse\n{\nbyte_5EF490 = 0;\n}\nbyte_5EF48D = 0;\nfor ( i = 0; i <= 15; ++i )\nbyte_5EF48D += *(_BYTE *)(4LL * i + a1);\nsub_417189(dword_603310);\nfor ( i = 0; i < dword_603310; ++i )\n{\nfor ( j = 0; j < (unsigned __int8)byte_5EF48D && *(_DWORD *)(4LL * j + a2) != (unsigned __int8)byte_603318[i]; ++j )\n;\n*(_DWORD *)&v11[4 * (unsigned __int8)byte_603318[i] + 7] = j;\n}\nif ( byte_5EF490 )\n{\nif ( byte_5EF490 == 2 )\n{\ni = 0;\nwhile ( i < dword_603314 )\n{\nfor ( j = dword_603310 - 2;\nj >= 0\n&& (*(_DWORD *)(4LL * (unsigned __int8)byte_603320[7 * i + j] + a1) != 1\n|| *(_DWORD *)(4LL * (unsigned __int8)byte_603320[7 * i + 1 + j] + a1) != 1);\n--j )\n{\n;\n}\nif ( j >= 0 )\n{\nbyte_5F1F60[7 * i + 1] = *(_DWORD *)&v11[4 * (unsigned __int8)byte_603320[7 * i + j] + 7];\nbyte_5F1F60[7 * i] = *(_DWORD *)&v11[4 * (unsigned __int8)byte_603320[7 * i + 1 + j] + 7];\nl = 0;\nv16 = 2;\nwhile ( l < dword_603310 )\n{\nif ( l == j )\n{\nl += 2;\n}\nelse\n{\nfor ( k = 0; k < *(_DWORD *)(4LL * (unsigned __int8)byte_603320[7 * i + l] + a1); ++k )\n{\nv5 = *(_DWORD *)&v11[4 * (unsigned __int8)byte_603320[7 * i + l] + 7];\nv6 = v16++;\nbyte_5F1F60[7 * i + v6] = v5 + k;\n}\n++l;\n}\n}\nbyte_5EF7E0[i++] = j;\n}\nelse\n{\n--dword_603314;\nfor ( l = 0; l < dword_603310; ++l )\nbyte_603320[7 * i + l] = byte_603320[7 * dword_603314 + l];\n}\n}\n}\nelse\n{\nv14 = (unsigned __int8)byte_5EF490 - 1;\nfor ( i = 0; i < dword_603314; ++i )\n{\nfor ( j = dword_603310 - 1; j >= 0 && v14 != *(_DWORD *)(4LL * (unsigned __int8)byte_603320[7 * i + j] + a1); --j )\n;\nfor ( l = 0; l < v14; ++l )\nbyte_5F1F60[7 * i + l] = v11[4 * (unsigned __int8)byte_603320[7 * i + j] + 7] + l;\nl = 0;\nv16 = v14;\nwhile ( l < dword_603310 )\n{\nif ( l != j )\n{\nfor ( k = 0; k < *(_DWORD *)(4LL * (unsigned __int8)byte_603320[7 * i + l] + a1); ++k )\n{\nv7 = *(_DWORD *)&v11[4 * (unsigned __int8)byte_603320[7 * i + l] + 7];\nv8 = v16++;\nbyte_5F1F60[7 * i + v8] = v7 + k;\n}\n}\n++l;\n}\nbyte_5EF7E0[i] = j;\n}\n}\n}\nelse\n{\ni = 0;\nwhile ( i < dword_603314 )\n{\nfor ( j = dword_603310 - 3;\nj >= 0\n&& (*(_DWORD *)(4LL * (unsigned __int8)byte_603320[7 * i + j] + a1) != 1\n|| *(_DWORD *)(4LL * (unsigned __int8)byte_603320[7 * i + 1 + j] + a1) != 1\n|| *(_DWORD *)(4LL * (unsigned __int8)byte_603320[7 * i + 2 + j] + a1) != 1);\n--j )\n{\n;\n}\nif ( j >= 0 )\n{\nbyte_5F1F60[7 * i + 2] = *(_DWORD *)&v11[4 * (unsigned __int8)byte_603320[7 * i + j] + 7];\nbyte_5F1F60[7 * i + 1] = *(_DWORD *)&v11[4 * (unsigned __int8)byte_603320[7 * i + 1 + j] + 7];\nbyte_5F1F60[7 * i] = *(_DWORD *)&v11[4 * (unsigned __int8)byte_603320[7 * i + 2 + j] + 7];\nl = 0;\nv16 = 3;\nwhile ( l < dword_603310 )\n{\nif ( l == j )\n{\nl += 3;\n}\nelse\n{\nfor ( k = 0; k < *(_DWORD *)(4LL * (unsigned __int8)byte_603320[7 * i + l] + a1); ++k )\n{\nv3 = *(_DWORD *)&v11[4 * (unsigned __int8)byte_603320[7 * i + l] + 7];\nv4 = v16++;\nbyte_5F1F60[7 * i + v4] = v3 + k;\n}\n++l;\n}\n}\nbyte_5EF7E0[i++] = j;\n}\nelse\n{\n--dword_603314;\nfor ( l = 0; l < dword_603310; ++l )\nbyte_603320[7 * i + l] = byte_603320[7 * dword_603314 + l];\n}\n}\n}\nfor ( i = 0; i < dword_603314; ++i )\n{\nfor ( j = i + 1; j < dword_603314; ++j )\n{\nfor ( l = 0;\nl < dword_603310\n&& *(_DWORD *)(4LL * (unsigned __int8)byte_603320[7 * i + l] + a1) == *(_DWORD *)(4LL\n* (unsigned __int8)byte_603320[7 * j + l]\n+ a1);\n++l )\n{\n;\n}\nif ( l < dword_603310\n&& *(_DWORD *)(4LL * (unsigned __int8)byte_603320[7 * i + l] + a1) > *(_DWORD *)(4LL\n* (unsigned __int8)byte_603320[7 * j + l]\n+ a1) )\n{\nfor ( l = 0; l < dword_603310; ++l )\n{\nv13 = byte_603320[7 * i + l];\nbyte_603320[7 * i + l] = byte_603320[7 * j + l];\nbyte_603320[7 * j + l] = v13;\n}\nfor ( l = 0; l < (unsigned __int8)byte_5EF48D; ++l )\n{\nv13 = byte_5F1F60[7 * i + l];\nbyte_5F1F60[7 * i + l] = byte_5F1F60[7 * j + l];\nbyte_5F1F60[7 * j + l] = v13;\n}\nv13 = byte_5EF7E0[i];\nbyte_5EF7E0[i] = byte_5EF7E0[j];\nbyte_5EF7E0[j] = v13;\n}\n}\n}\nfor ( i = 0; i < dword_603314; ++i )\n{\nfor ( j = 0; j < (unsigned __int8)byte_5EF48D; ++j )\nbyte_5F1F60[7 * i + 35296 + byte_5F1F60[7 * i + j]] = j;\n}\nsub_417513(a1, (__int64)byte_603320, v11, (unsigned __int8)byte_5EF7E0[0]);\nsub_404036((unsigned __int8)byte_5EF48D, (unsigned __int8)byte_5EF7E0[0], (__int64)v10, v11);\nqword_615BC0 = sub_405AC4(v12, (unsigned __int8)byte_5EF48D, (unsigned __int8)byte_5EF7E0[0], v11, byte_5EF490);\nprintf(\"tb_size = %lu\\n\", qword_615BC0);\nsub_41729F(qword_615BC0, (unsigned __int8)byte_5EF48D);\nsub_4177D2((unsigned __int8)byte_5EF48D);\nqword_5EF460 = sub_429DF9((unsigned int)dword_96D2D90, qword_615BC0, 0LL);\nreturn qword_615BC0;\n}\n\n\n\nQ:[a1,a2,v10,v11,v12,v13,v14,k,v16,sub_417894,sub_417189,sub_417513,sub_404036,sub_405AC4,sub_41729F,sub_4177D2,sub_429DF9,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pcs', 'a2': 'pt', 'v10': 'order', 'v11': 'norm', 'v12': 'factor', 'v13': 'tmp', 'v14': 'p', 'k': 'l', 'v16': 'm', 'sub_417894': 'init_permute_piece', 'sub_417189': 'generate_type_perms', 'sub_417513': 'p_set_norm_piece', 'sub_404036': 'calc_order_piece', 'sub_405AC4': 'calc_factors_piece', 'sub_41729F': 'generate_test_list', 'sub_4177D2': 'init_0x40', 'sub_429DF9': 'create_work'}"}
delete_Stack
9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23
open-simh
simh
NA
void delete_Stack (Stack *sp) { if (sp == NULL) return; sim_debug (SIM_DBG_EXP_STACK, &sim_scp_dev, "[Stack %d has been deallocated]\n", sp->id); /* Free the data that the stack was pointing at */ free (sp->elements); free (sp); stack_counter--; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_459486", "function_addr": 4560006, "binary_name": "9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+ptr], rdi"], [4, "cmp [rbp+ptr], 0"], [5, "jz short loc_459503"], [6, "mov rax, cs:qword_537120"], [7, "test rax, rax"], [8, "jz short loc_4594D6"], [9, "mov eax, cs:dword_524AF4"], [10, "and eax, 8000000h"], [11, "test eax, eax"], [12, "jz short loc_4594D6"], [13, "mov rax, [rbp+ptr]"], [14, "mov eax, [rax+8]"], [15, "mov ecx, eax"], [16, "mov edx, offset aStackDHasBeenD"], [17, "mov esi, offset off_524A80"], [18, "mov edi, 8000000h"], [19, "mov eax, 0"], [20, "call sub_45610E"], [21, "mov rax, [rbp+ptr]"], [22, "mov rax, [rax+10h]"], [23, "mov rdi, rax"], [24, "call _free"], [25, "mov rax, [rbp+ptr]"], [26, "mov rdi, rax"], [27, "call _free"], [28, "mov eax, cs:dword_5523A0"], [29, "sub eax, 1"], [30, "mov cs:dword_5523A0, eax"], [31, "jmp short locret_459504"], [32, "nop"], [33, "leave"], [34, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 7], [10, 9], [11, 10], [12, 11], [13, 3], [14, 13], [15, 14], [21, 3], [22, 21], [23, 22], [25, 3], [26, 25], [29, 28], [30, 29], [34, 29]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23_9acbc7c1ba7e49eb8c0cc5dd5e3feb9b4a180e4e252c42715e31fa33694bae23.jsonl.gz", "strip_func_name": "sub_459486", "query": "\n\n\n__int64 __fastcall sub_459486(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 result; // rax\n\nif ( a1 )\n{\nif ( qword_537120 )\n{\nif ( (dword_524AF4 & 0x8000000) != 0 )\nsub_45610E(\n0x8000000,\n(__int64)&off_524A80,\n\"[Stack %d has been deallocated]\\n\",\n*(unsigned int *)(a1 + 8),\na5,\na6);\n}\nfree(*(void **)(a1 + 16));\nfree((void *)a1);\nresult = (unsigned int)--dword_5523A0;\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_459486,sub_45610E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'sp_0', 'sub_459486': 'delete_Stack', 'sub_45610E': '_sim_debug_device'}"}
mpi_get_digit
dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84
FreeRTOS
coreMQTT-Agent-Demos
NA
static int mpi_get_digit( mbedtls_mpi_uint *d, int radix, char c ) { *d = 255; if( c >= 0x30 && c <= 0x39 ) *d = c - 0x30; if( c >= 0x41 && c <= 0x46 ) *d = c - 0x37; if( c >= 0x61 && c <= 0x66 ) *d = c - 0x57; if( *d >= (mbedtls_mpi_uint) radix ) return( MBEDTLS_ERR_MPI_INVALID_CHARACTER ); return( 0 ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43150F", "function_addr": 4396303, "binary_name": "dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_C], esi"], [4, "mov eax, edx"], [5, "mov [rbp+var_10], al"], [6, "mov rax, [rbp+var_8]"], [7, "mov qword ptr [rax], 0FFh"], [8, "cmp [rbp+var_10], 2Fh "], [9, "jle short loc_431547"], [10, "cmp [rbp+var_10], 39h "], [11, "jg short loc_431547"], [12, "movsx eax, [rbp+var_10]"], [13, "sub eax, 30h "], [14, "movsxd rdx, eax"], [15, "mov rax, [rbp+var_8]"], [16, "mov [rax], rdx"], [17, "cmp [rbp+var_10], 40h "], [18, "jle short loc_431564"], [19, "cmp [rbp+var_10], 46h "], [20, "jg short loc_431564"], [21, "movsx eax, [rbp+var_10]"], [22, "sub eax, 37h "], [23, "movsxd rdx, eax"], [24, "mov rax, [rbp+var_8]"], [25, "mov [rax], rdx"], [26, "cmp [rbp+var_10], 60h "], [27, "jle short loc_431581"], [28, "cmp [rbp+var_10], 66h "], [29, "jg short loc_431581"], [30, "movsx eax, [rbp+var_10]"], [31, "sub eax, 57h "], [32, "movsxd rdx, eax"], [33, "mov rax, [rbp+var_8]"], [34, "mov [rax], rdx"], [35, "mov rax, [rbp+var_8]"], [36, "mov rdx, [rax]"], [37, "mov eax, [rbp+var_C]"], [38, "cdqe"], [39, "cmp rdx, rax"], [40, "jb short loc_431599"], [41, "mov eax, 0FFFFFFFAh"], [42, "jmp short loc_43159E"], [43, "mov eax, 0"], [44, "pop rbp"], [45, "retn"]], "data_dep": [[5, 4], [6, 2], [7, 6], [8, 5], [9, 8], [10, 5], [11, 10], [12, 5], [13, 12], [14, 13], [15, 2], [16, 15], [16, 14], [17, 5], [18, 17], [19, 5], [20, 19], [21, 5], [22, 21], [23, 22], [24, 2], [25, 23], [25, 24], [26, 5], [27, 26], [28, 5], [29, 28], [30, 5], [31, 30], [32, 31], [33, 2], [34, 33], [34, 32], [35, 2], [36, 7], [36, 16], [36, 25], [36, 34], [36, 35], [37, 3], [39, 36], [39, 37], [40, 39], [44, 0], [45, 43], [45, 41]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84_dd1bb0f93352aea0ff0f7e0a20f97ad9676f10a40a8c4b9354a3f6316a448e84.jsonl.gz", "strip_func_name": "sub_43150F", "query": "\n\n\n__int64 __fastcall sub_43150F(_QWORD *a1, int a2, char a3)\n{\n__int64 result; // rax\n\n*a1 = 255LL;\nif ( a3 > 47 && a3 <= 57 )\n*a1 = a3 - 48;\nif ( a3 > 64 && a3 <= 70 )\n*a1 = a3 - 55;\nif ( a3 > 96 && a3 <= 102 )\n*a1 = a3 - 87;\nif ( *a1 < (unsigned __int64)a2 )\nresult = 0LL;\nelse\nresult = 4294967290LL;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_43150F,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'c', 'a1': 'd', 'a2': 'radix', 'sub_43150F': 'mpi_get_digit'}"}
turn_on_rx_data
24a2637591f28727b21989feacd6e39416a2c11ff374047913dc0e05514c7835
AonCyberLabs
D-Modem
NA
static void turn_on_rx_data(pj_turn_sock *relay, void *pkt, unsigned pkt_len, const pj_sockaddr_t *peer_addr, unsigned addr_len) { char addrinfo[80]; pj_sockaddr_print(peer_addr, addrinfo, sizeof(addrinfo), 3); PJ_LOG(3,(THIS_FILE, "Client received %d bytes data from %s: %.*s", pkt_len, addrinfo, pkt_len, pkt)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40687D", "function_addr": 4221053, "binary_name": "24a2637591f28727b21989feacd6e39416a2c11ff374047913dc0e05514c7835.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 70h"], [3, "mov [rbp+var_58], rdi"], [4, "mov [rbp+var_60], rsi"], [5, "mov [rbp+var_64], edx"], [6, "mov [rbp+var_70], rcx"], [7, "mov [rbp+var_68], r8d"], [8, "lea rsi, [rbp+var_50]"], [9, "mov rax, [rbp+var_70]"], [10, "mov ecx, 3"], [11, "mov edx, 50h "], [12, "mov rdi, rax"], [13, "call sub_43529A"], [14, "call sub_433007"], [15, "cmp eax, 2"], [16, "jle short loc_4068E9"], [17, "mov rsi, [rbp+var_60]"], [18, "mov ecx, [rbp+var_64]"], [19, "lea rdx, [rbp+var_50]"], [20, "mov eax, [rbp+var_64]"], [21, "mov r9, rsi"], [22, "mov r8d, ecx"], [23, "mov rcx, rdx"], [24, "mov edx, eax"], [25, "mov esi, offset aClientReceived"], [26, "mov edi, offset aClientMainC"], [27, "mov eax, 0"], [28, "call sub_4338D0"], [29, "nop"], [30, "leave"], [31, "retn"]], "data_dep": [[9, 6], [12, 9], [15, 14], [16, 15], [17, 4], [18, 5], [19, 11], [20, 5], [21, 17], [22, 18], [23, 19], [24, 20], [31, 14], [31, 28]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/24a2637591f28727b21989feacd6e39416a2c11ff374047913dc0e05514c7835_24a2637591f28727b21989feacd6e39416a2c11ff374047913dc0e05514c7835.jsonl.gz", "strip_func_name": "sub_40687D", "query": "\n\n\n__int64 __fastcall sub_40687D(__int64 a1, int a2, int a3, __int64 a4)\n{\n__int64 result; // rax\nchar v6[80]; // [rsp+20h] [rbp-50h] BYREF\n\nsub_43529A(a4, v6, 80LL, 3LL);\nresult = sub_433007();\nif ( (int)result > 2 )\nresult = sub_4338D0(\n(unsigned int)\"client_main.c\",\n(unsigned int)\"Client received %d bytes data from %s: %.*s\",\na3,\n(unsigned int)v6,\na3,\na2);\nreturn result;\n}\n\n\n\nQ:[a3,a4,a2,a1,v6,sub_40687D,sub_43529A,sub_433007,sub_4338D0,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'pkt_len', 'a4': 'peer_addr', 'a2': 'pkt', 'a1': 'relay', 'v6': 'addrinfo', 'sub_40687D': 'turn_on_rx_data', 'sub_43529A': 'pj_sockaddr_print', 'sub_433007': 'pj_log_get_level', 'sub_4338D0': 'pj_log_3'}"}
RDG_fillLiteralDistrib
412a748ca3e7e87ecea1502eee0b4f852f30ff2f7299cc26808b6de39fdb91dd
dimkr
szl
NA
static void RDG_fillLiteralDistrib(BYTE* ldt, double ld) { BYTE const firstChar = (ld<=0.0) ? 0 : '('; BYTE const lastChar = (ld<=0.0) ? 255 : '}'; BYTE character = (ld<=0.0) ? 0 : '0'; U32 u; if (ld<=0.0) ld = 0.0; for (u=0; u<LTSIZE; ) { U32 const weight = (U32)((double)(LTSIZE - u) * ld) + 1; U32 const end = MIN ( u + weight , LTSIZE); while (u < end) ldt[u++] = character; character++; if (character > lastChar) character = firstChar; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_444683", "function_addr": 4474499, "binary_name": "412a748ca3e7e87ecea1502eee0b4f852f30ff2f7299cc26808b6de39fdb91dd.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_28], rdi"], [3, "movsd [rbp+var_30], xmm0"], [4, "pxor xmm0, xmm0"], [5, "comisd xmm0, [rbp+var_30]"], [6, "jb short loc_4446A2"], [7, "mov eax, 0"], [8, "jmp short loc_4446A7"], [9, "mov eax, 28h "], [10, "mov [rbp+var_9], al"], [11, "pxor xmm0, xmm0"], [12, "comisd xmm0, [rbp+var_30]"], [13, "jb short loc_4446BC"], [14, "mov eax, 0FFFFFFFFh"], [15, "jmp short loc_4446C1"], [16, "mov eax, 7Dh "], [17, "mov [rbp+var_A], al"], [18, "pxor xmm0, xmm0"], [19, "comisd xmm0, [rbp+var_30]"], [20, "jb short loc_4446D6"], [21, "mov eax, 0"], [22, "jmp short loc_4446DB"], [23, "mov eax, 30h "], [24, "mov [rbp+var_1], al"], [25, "pxor xmm0, xmm0"], [26, "comisd xmm0, [rbp+var_30]"], [27, "jb short loc_4446F2"], [28, "pxor xmm0, xmm0"], [29, "movsd [rbp+var_30], xmm0"], [30, "mov [rbp+var_8], 0"], [31, "jmp loc_444795"], [32, "mov eax, 2000h"], [33, "sub eax, [rbp+var_8]"], [34, "mov eax, eax"], [35, "test rax, rax"], [36, "js short loc_444718"], [37, "pxor xmm0, xmm0"], [38, "cvtsi2sd xmm0, rax"], [39, "jmp short loc_444731"], [40, "mov rdx, rax"], [41, "shr rdx, 1"], [42, "and eax, 1"], [43, "or rdx, rax"], [44, "pxor xmm0, xmm0"], [45, "cvtsi2sd xmm0, rdx"], [46, "addsd xmm0, xmm0"], [47, "mulsd xmm0, [rbp+var_30]"], [48, "cvttsd2si rax, xmm0"], [49, "add eax, 1"], [50, "mov [rbp+var_10], eax"], [51, "mov edx, [rbp+var_8]"], [52, "mov eax, [rbp+var_10]"], [53, "add eax, edx"], [54, "mov edx, 2000h"], [55, "cmp eax, 2000h"], [56, "cmova eax, edx"], [57, "mov [rbp+var_14], eax"], [58, "jmp short loc_444773"], [59, "mov eax, [rbp+var_8]"], [60, "lea edx, [rax+1]"], [61, "mov [rbp+var_8], edx"], [62, "mov edx, eax"], [63, "mov rax, [rbp+var_28]"], [64, "add rdx, rax"], [65, "movzx eax, [rbp+var_1]"], [66, "mov [rdx], al"], [67, "mov eax, [rbp+var_8]"], [68, "cmp eax, [rbp+var_14]"], [69, "jb short loc_44475B"], [70, "movzx eax, [rbp+var_1]"], [71, "add eax, 1"], [72, "mov [rbp+var_1], al"], [73, "movzx eax, [rbp+var_1]"], [74, "cmp al, [rbp+var_A]"], [75, "jbe short loc_444795"], [76, "movzx eax, [rbp+var_9]"], [77, "mov [rbp+var_1], al"], [78, "cmp [rbp+var_8], 1FFFh"], [79, "jbe loc_4446FE"], [80, "nop"], [81, "nop"], [82, "pop rbp"], [83, "retn"]], "data_dep": [[5, 3], [5, 4], [10, 7], [10, 9], [12, 3], [12, 11], [17, 14], [17, 16], [19, 18], [19, 3], [24, 21], [24, 23], [26, 25], [26, 3], [29, 28], [33, 30], [33, 32], [33, 61], [34, 33], [35, 34], [36, 35], [38, 35], [38, 37], [40, 35], [41, 40], [42, 35], [43, 41], [43, 42], [45, 43], [45, 44], [46, 45], [47, 29], [47, 38], [47, 46], [47, 3], [48, 47], [48, 42], [48, 35], [49, 48], [50, 49], [51, 61], [51, 30], [52, 50], [53, 52], [53, 51], [55, 53], [56, 55], [56, 54], [57, 56], [59, 61], [59, 30], [60, 64], [60, 66], [60, 59], [60, 54], [61, 60], [62, 59], [63, 2], [64, 62], [64, 63], [65, 72], [65, 24], [65, 77], [66, 64], [66, 65], [67, 61], [67, 30], [68, 57], [68, 67], [69, 68], [70, 77], [70, 24], [70, 72], [71, 70], [72, 71], [73, 72], [74, 73], [74, 17], [75, 74], [76, 10], [77, 76], [78, 61], [78, 30], [79, 78], [82, 0], [83, 76], [83, 21], [83, 23], [83, 73]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/412a748ca3e7e87ecea1502eee0b4f852f30ff2f7299cc26808b6de39fdb91dd_412a748ca3e7e87ecea1502eee0b4f852f30ff2f7299cc26808b6de39fdb91dd.jsonl.gz", "strip_func_name": "sub_444683", "query": "\n\n\n__int64 __fastcall sub_444683(__int64 a1, double a2)\n{\nchar v2; // al\nchar v3; // al\n__int64 result; // rax\nunsigned int v5; // eax\nunsigned int v6; // eax\ndouble v7; // [rsp+0h] [rbp-30h]\nunsigned int v8; // [rsp+1Ch] [rbp-14h]\nunsigned __int8 v9; // [rsp+26h] [rbp-Ah]\nunsigned __int8 v10; // [rsp+27h] [rbp-9h]\nunsigned int v11; // [rsp+28h] [rbp-8h]\nunsigned __int8 v12; // [rsp+2Fh] [rbp-1h]\n\nv7 = a2;\nif ( a2 > 0.0 )\nv2 = 40;\nelse\nv2 = 0;\nv10 = v2;\nif ( a2 > 0.0 )\nv3 = 125;\nelse\nv3 = -1;\nv9 = v3;\nif ( a2 > 0.0 )\nresult = 48LL;\nelse\nresult = 0LL;\nv12 = result;\nif ( a2 <= 0.0 )\nv7 = 0.0;\nv11 = 0;\nwhile ( v11 <= 0x1FFF )\n{\nv5 = v11 + (int)((double)(int)(0x2000 - v11) * v7) + 1;\nif ( v5 > 0x2000 )\nv5 = 0x2000;\nv8 = v5;\nwhile ( v11 < v8 )\n{\nv6 = v11++;\n*(_BYTE *)(a1 + v6) = v12;\n}\nresult = ++v12;\nif ( v12 > v9 )\n{\nresult = v10;\nv12 = v10;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v7,v8,v9,v10,v11,v12,sub_444683,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ldt', 'a2': 'ld', 'v7': 'lda', 'v8': 'end', 'v9': 'lastChar', 'v10': 'firstChar', 'v11': 'u', 'v12': 'character', 'sub_444683': 'RDG_fillLiteralDistrib'}"}
pstrcpy
8ff49532b176efd8c3ee1ad7b84fbf7f7023a91850bcc327dcd0fd02af0eeb94
fernandotcl
TinyEMU
NA
void pstrcpy(char *buf, int buf_size, const char *str) { int c; char *q = buf; if (buf_size <= 0) return; for(;;) { c = *str++; if (c == 0 || q >= buf + buf_size - 1) break; *q++ = c; } *q = '\0'; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402AFB", "function_addr": 4205307, "binary_name": "8ff49532b176efd8c3ee1ad7b84fbf7f7023a91850bcc327dcd0fd02af0eeb94.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_1C], esi"], [4, "mov [rbp+var_28], rdx"], [5, "mov rax, [rbp+var_18]"], [6, "mov [rbp+var_8], rax"], [7, "cmp [rbp+var_1C], 0"], [8, "jle short loc_402B65"], [9, "mov rax, [rbp+var_28]"], [10, "lea rdx, [rax+1]"], [11, "mov [rbp+var_28], rdx"], [12, "movzx eax, byte ptr [rax]"], [13, "movsx eax, al"], [14, "mov [rbp+var_C], eax"], [15, "cmp [rbp+var_C], 0"], [16, "jz short loc_402B5C"], [17, "mov eax, [rbp+var_1C]"], [18, "cdqe"], [19, "lea rdx, [rax-1]"], [20, "mov rax, [rbp+var_18]"], [21, "add rax, rdx"], [22, "cmp [rbp+var_8], rax"], [23, "jnb short loc_402B5C"], [24, "mov rax, [rbp+var_8]"], [25, "lea rdx, [rax+1]"], [26, "mov [rbp+var_8], rdx"], [27, "mov edx, [rbp+var_C]"], [28, "mov [rax], dl"], [29, "jmp short loc_402B18"], [30, "mov rax, [rbp+var_8]"], [31, "mov byte ptr [rax], 0"], [32, "jmp short loc_402B66"], [33, "nop"], [34, "pop rbp"], [35, "retn"]], "data_dep": [[5, 2], [6, 5], [7, 3], [8, 7], [9, 11], [9, 4], [10, 9], [10, 27], [10, 28], [11, 10], [12, 28], [12, 9], [13, 12], [14, 13], [15, 14], [16, 15], [17, 3], [19, 17], [19, 10], [19, 28], [20, 2], [21, 19], [21, 20], [22, 26], [22, 6], [22, 21], [23, 22], [24, 26], [24, 6], [25, 19], [25, 28], [25, 24], [26, 25], [27, 14], [28, 24], [28, 27], [30, 6], [30, 26], [31, 30], [34, 0], [35, 30], [35, 5]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/8ff49532b176efd8c3ee1ad7b84fbf7f7023a91850bcc327dcd0fd02af0eeb94_8ff49532b176efd8c3ee1ad7b84fbf7f7023a91850bcc327dcd0fd02af0eeb94.jsonl.gz", "strip_func_name": "sub_402AFB", "query": "\n\n\n_BYTE *__fastcall sub_402AFB(_BYTE *a1, int a2, char *a3)\n{\n_BYTE *result; // rax\nchar *v4; // rax\n_BYTE *v5; // rax\nchar v7; // [rsp+1Ch] [rbp-Ch]\n_BYTE *v8; // [rsp+20h] [rbp-8h]\n\nresult = a1;\nv8 = a1;\nif ( a2 > 0 )\n{\nwhile ( 1 )\n{\nv4 = a3++;\nv7 = *v4;\nif ( !*v4 || v8 >= &a1[a2 - 1] )\nbreak;\nv5 = v8++;\n*v5 = v7;\n}\nresult = v8;\n*v8 = 0;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v7,v8,sub_402AFB,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'str', 'a1': 'buf', 'a2': 'buf_size', 'v7': 'c', 'v8': 'q', 'sub_402AFB': 'pstrcpy'}"}
type_size
decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08
khadas
linux
NA
static unsigned int type_size(const char *name) { /* This covers all FIELD_IS_STRING types. */ static struct { const char *type; unsigned int size; } table[] = { { "u8", 1 }, { "u16", 2 }, { "u32", 4 }, { "u64", 8 }, { "s8", 1 }, { "s16", 2 }, { "s32", 4 }, { "s64", 8 }, { "char", 1 }, { }, }; int i; for (i = 0; table[i].type; i++) { if (!strcmp(table[i].type, name)) return table[i].size; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4F7BBA", "function_addr": 5209018, "binary_name": "decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+s2], rdi"], [4, "mov [rbp+var_4], 0"], [5, "jmp short loc_4F7C15"], [6, "mov eax, [rbp+var_4]"], [7, "cdqe"], [8, "shl rax, 4"], [9, "mov rdx, rax"], [10, "lea rax, off_5631E0"], [11, "mov rax, [rdx+rax]"], [12, "mov rdx, [rbp+s2]"], [13, "mov rsi, rdx"], [14, "mov rdi, rax"], [15, "call _strcmp"], [16, "test eax, eax"], [17, "jnz short loc_4F7C11"], [18, "mov eax, [rbp+var_4]"], [19, "cdqe"], [20, "shl rax, 4"], [21, "mov rdx, rax"], [22, "lea rax, unk_5631E8"], [23, "mov eax, [rdx+rax]"], [24, "jmp short locret_4F7C36"], [25, "add [rbp+var_4], 1"], [26, "mov eax, [rbp+var_4]"], [27, "cdqe"], [28, "shl rax, 4"], [29, "mov rdx, rax"], [30, "lea rax, off_5631E0"], [31, "mov rax, [rdx+rax]"], [32, "test rax, rax"], [33, "jnz short loc_4F7BCF"], [34, "mov eax, 0"], [35, "leave"], [36, "retn"]], "data_dep": [[6, 4], [6, 25], [8, 6], [9, 8], [10, 8], [11, 10], [12, 3], [13, 12], [14, 11], [16, 15], [17, 16], [18, 4], [18, 25], [20, 18], [21, 20], [22, 20], [23, 22], [25, 4], [25, 25], [26, 4], [26, 25], [28, 26], [29, 28], [30, 28], [31, 30], [32, 31], [33, 32], [36, 34], [36, 23]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08_decb9d72b93d941cc30c251e69b1ae930ef147e67c065af3feea2db57aca5f08.jsonl.gz", "strip_func_name": "sub_4F7BBA", "query": "\n\n\n__int64 __fastcall sub_4F7BBA(const char *a1)\n{\nint i; // [rsp+1Ch] [rbp-4h]\n\nfor ( i = 0; (&off_5631E0)[2 * i]; ++i )\n{\nif ( !strcmp((&off_5631E0)[2 * i], a1) )\nreturn dword_5631E8[4 * i];\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,sub_4F7BBA,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'name', 'sub_4F7BBA': 'type_size'}"}
PCAP16
4c4a7b43cd86f336e7e472c4751124b00439a5223535ac8006f9c77515d99121
robertdavidgraham
masscan
NA
static unsigned PCAP16(unsigned byte_order, const unsigned char *buf) { switch (byte_order) { case CAPFILE_BIGENDIAN: return buf[0]*256 + buf[1]; case CAPFILE_LITTLEENDIAN: return buf[1]*256 + buf[0]; default: return (unsigned)0xa3a3; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_441FBB", "function_addr": 4464571, "binary_name": "4c4a7b43cd86f336e7e472c4751124b00439a5223535ac8006f9c77515d99121.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_4], edi"], [3, "mov [rbp+var_10], rsi"], [4, "cmp [rbp+var_4], 1"], [5, "jz short loc_441FD4"], [6, "cmp [rbp+var_4], 2"], [7, "jz short loc_441FF5"], [8, "jmp short loc_442016"], [9, "mov rax, [rbp+var_10]"], [10, "movzx eax, byte ptr [rax]"], [11, "movzx eax, al"], [12, "shl eax, 8"], [13, "mov edx, eax"], [14, "mov rax, [rbp+var_10]"], [15, "add rax, 1"], [16, "movzx eax, byte ptr [rax]"], [17, "movzx eax, al"], [18, "add eax, edx"], [19, "jmp short loc_44201B"], [20, "mov rax, [rbp+var_10]"], [21, "add rax, 1"], [22, "movzx eax, byte ptr [rax]"], [23, "movzx eax, al"], [24, "shl eax, 8"], [25, "mov edx, eax"], [26, "mov rax, [rbp+var_10]"], [27, "movzx eax, byte ptr [rax]"], [28, "movzx eax, al"], [29, "add eax, edx"], [30, "jmp short loc_44201B"], [31, "mov eax, 0A3A3h"], [32, "pop rbp"], [33, "retn"]], "data_dep": [[4, 2], [5, 4], [6, 2], [7, 6], [9, 3], [10, 9], [11, 10], [12, 11], [13, 12], [14, 3], [15, 14], [16, 15], [17, 16], [18, 17], [18, 13], [20, 3], [21, 20], [22, 21], [23, 22], [24, 23], [25, 24], [26, 3], [27, 26], [28, 27], [29, 25], [29, 28], [32, 0], [33, 29], [33, 31], [33, 18]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4c4a7b43cd86f336e7e472c4751124b00439a5223535ac8006f9c77515d99121_4c4a7b43cd86f336e7e472c4751124b00439a5223535ac8006f9c77515d99121.jsonl.gz", "strip_func_name": "sub_441FBB", "query": "\n\n\n__int64 __fastcall sub_441FBB(int a1, unsigned __int8 *a2)\n{\nif ( a1 == 1 )\nreturn (*a2 << 8) + (unsigned int)a2[1];\nif ( a1 == 2 )\nreturn (a2[1] << 8) + (unsigned int)*a2;\nreturn 41891LL;\n}\n\n\n\nQ:[a1,a2,sub_441FBB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'byte_order', 'a2': 'buf', 'sub_441FBB': 'PCAP16'}"}
nondec2num
362955a1d3230a4d03d634c3e5bff13ca4ae6a5e24e02b2cad6e9251388f57a8
shiquan
PISA
NA
double nondec2num(char *str, int length) { double retval = 0.0; char save; short val; char *start = str; if ( *str == '0' && (str[1] == 'x' || str[1] == 'X')) { if (length <= 2) return 0.0; for ( str+=2, length -=2; length > 0; length--, str++) { switch(*str) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': val = *str - '0'; break; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': val = *str - 'a' + 10; break; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': val = *str - 'A' + 10; break; default: goto nondec2num_done; } retval = ( retval *16) + val; } } else if (*str == '0') { for (; length > 0; length -- ) { if ( !isdigit((unsigned char)*str)) goto nondec2num_done; else if ( *str == '8' || *str == '9') { str = start; goto nondec2num_decimal; } retval = (retval*8) + (*str-'0'); str++; } } else { nondec2num_decimal: save = str[length]; str[length] = '\0'; retval = strtod(str, NULL); str[length] = save; } nondec2num_done: return retval; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43355D", "function_addr": 4404573, "binary_name": "362955a1d3230a4d03d634c3e5bff13ca4ae6a5e24e02b2cad6e9251388f57a8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+nptr], rdi"], [4, "mov [rbp+var_2C], esi"], [5, "pxor xmm0, xmm0"], [6, "movsd [rbp+var_8], xmm0"], [7, "mov rax, [rbp+nptr]"], [8, "mov [rbp+var_18], rax"], [9, "mov rax, [rbp+nptr]"], [10, "movzx eax, byte ptr [rax]"], [11, "cmp al, 30h "], [12, "jnz loc_433673"], [13, "mov rax, [rbp+nptr]"], [14, "add rax, 1"], [15, "movzx eax, byte ptr [rax]"], [16, "cmp al, 78h "], [17, "jz short loc_4335AE"], [18, "mov rax, [rbp+nptr]"], [19, "add rax, 1"], [20, "movzx eax, byte ptr [rax]"], [21, "cmp al, 58h "], [22, "jnz loc_433673"], [23, "cmp [rbp+var_2C], 2"], [24, "jg short loc_4335BD"], [25, "pxor xmm0, xmm0"], [26, "jmp loc_433772"], [27, "add [rbp+nptr], 2"], [28, "sub [rbp+var_2C], 2"], [29, "jmp loc_433664"], [30, "mov rax, [rbp+nptr]"], [31, "movzx eax, byte ptr [rax]"], [32, "movsx eax, al"], [33, "cmp eax, 66h "], [34, "jg loc_433769"], [35, "cmp eax, 61h "], [36, "jge short loc_433612"], [37, "cmp eax, 39h "], [38, "jg short loc_4335F2"], [39, "cmp eax, 30h "], [40, "jge short loc_433600"], [41, "jmp loc_433769"], [42, "sub eax, 41h "], [43, "cmp eax, 5"], [44, "ja loc_433769"], [45, "jmp short loc_433624"], [46, "mov rax, [rbp+nptr]"], [47, "movzx eax, byte ptr [rax]"], [48, "cbw"], [49, "sub eax, 30h "], [50, "mov [rbp+var_A], ax"], [51, "jmp short loc_433635"], [52, "mov rax, [rbp+nptr]"], [53, "movzx eax, byte ptr [rax]"], [54, "cbw"], [55, "sub eax, 57h "], [56, "mov [rbp+var_A], ax"], [57, "jmp short loc_433635"], [58, "mov rax, [rbp+nptr]"], [59, "movzx eax, byte ptr [rax]"], [60, "cbw"], [61, "sub eax, 37h "], [62, "mov [rbp+var_A], ax"], [63, "nop"], [64, "movsd xmm1, [rbp+var_8]"], [65, "movsd xmm0, cs:qword_501D58"], [66, "mulsd xmm1, xmm0"], [67, "movsx eax, [rbp+var_A]"], [68, "pxor xmm0, xmm0"], [69, "cvtsi2sd xmm0, eax"], [70, "addsd xmm0, xmm1"], [71, "movsd [rbp+var_8], xmm0"], [72, "sub [rbp+var_2C], 1"], [73, "add [rbp+nptr], 1"], [74, "cmp [rbp+var_2C], 0"], [75, "jg loc_4335CB"], [76, "jmp loc_43376D"], [77, "mov rax, [rbp+nptr]"], [78, "movzx eax, byte ptr [rax]"], [79, "cmp al, 30h "], [80, "jnz loc_433716"], [81, "jmp loc_43370A"], [82, "call ___ctype_b_loc"], [83, "mov rdx, [rax]"], [84, "mov rax, [rbp+nptr]"], [85, "movzx eax, byte ptr [rax]"], [86, "movzx eax, al"], [87, "add rax, rax"], [88, "add rax, rdx"], [89, "movzx eax, word ptr [rax]"], [90, "movzx eax, ax"], [91, "and eax, 800h"], [92, "test eax, eax"], [93, "jz loc_43376C"], [94, "mov rax, [rbp+nptr]"], [95, "movzx eax, byte ptr [rax]"], [96, "cmp al, 38h "], [97, "jz short loc_4336C8"], [98, "mov rax, [rbp+nptr]"], [99, "movzx eax, byte ptr [rax]"], [100, "cmp al, 39h "], [101, "jnz short loc_4336D2"], [102, "mov rax, [rbp+var_18]"], [103, "mov [rbp+nptr], rax"], [104, "jmp short loc_433717"], [105, "movsd xmm1, [rbp+var_8]"], [106, "movsd xmm0, cs:qword_501D60"], [107, "mulsd xmm1, xmm0"], [108, "mov rax, [rbp+nptr]"], [109, "movzx eax, byte ptr [rax]"], [110, "movsx eax, al"], [111, "sub eax, 30h "], [112, "pxor xmm0, xmm0"], [113, "cvtsi2sd xmm0, eax"], [114, "addsd xmm0, xmm1"], [115, "movsd [rbp+var_8], xmm0"], [116, "add [rbp+nptr], 1"], [117, "sub [rbp+var_2C], 1"], [118, "cmp [rbp+var_2C], 0"], [119, "jg loc_433687"], [120, "jmp short loc_43376D"], [121, "nop"], [122, "mov eax, [rbp+var_2C]"], [123, "movsxd rdx, eax"], [124, "mov rax, [rbp+nptr]"], [125, "add rax, rdx"], [126, "movzx eax, byte ptr [rax]"], [127, "mov [rbp+var_19], al"], [128, "mov eax, [rbp+var_2C]"], [129, "movsxd rdx, eax"], [130, "mov rax, [rbp+nptr]"], [131, "add rax, rdx"], [132, "mov byte ptr [rax], 0"], [133, "mov rax, [rbp+nptr]"], [134, "mov esi, 0"], [135, "mov rdi, rax"], [136, "call _strtod"], [137, "movq rax, xmm0"], [138, "mov [rbp+var_8], rax"], [139, "mov eax, [rbp+var_2C]"], [140, "movsxd rdx, eax"], [141, "mov rax, [rbp+nptr]"], [142, "add rdx, rax"], [143, "movzx eax, [rbp+var_19]"], [144, "mov [rdx], al"], [145, "jmp short loc_43376D"], [146, "nop"], [147, "jmp short loc_43376D"], [148, "nop"], [149, "movsd xmm0, [rbp+var_8]"], [150, "movq rax, xmm0"], [151, "movq xmm0, rax"], [152, "leave"], [153, "retn"]], "data_dep": [[6, 5], [7, 3], [8, 7], [9, 3], [10, 9], [11, 10], [12, 11], [13, 3], [14, 13], [15, 14], [16, 15], [17, 16], [18, 3], [19, 18], [20, 19], [21, 20], [22, 21], [23, 4], [24, 23], [27, 3], [28, 4], [30, 73], [30, 27], [31, 30], [32, 31], [33, 32], [34, 33], [35, 32], [36, 35], [37, 32], [38, 37], [39, 32], [40, 39], [42, 32], [43, 42], [44, 43], [46, 27], [46, 73], [47, 46], [49, 47], [50, 49], [52, 73], [52, 27], [53, 52], [55, 53], [56, 55], [58, 73], [58, 27], [59, 58], [61, 59], [62, 61], [64, 71], [64, 6], [66, 64], [66, 65], [67, 56], [67, 62], [67, 50], [69, 67], [69, 68], [70, 66], [70, 69], [71, 70], [72, 72], [72, 28], [73, 73], [73, 27], [74, 72], [74, 28], [75, 74], [77, 3], [78, 77], [79, 78], [80, 79], [83, 82], [84, 116], [84, 3], [85, 84], [86, 85], [87, 86], [88, 83], [88, 87], [89, 88], [90, 89], [91, 90], [92, 91], [93, 92], [94, 3], [94, 116], [95, 94], [96, 95], [97, 96], [98, 116], [98, 3], [99, 98], [100, 99], [101, 100], [102, 8], [103, 102], [105, 6], [105, 115], [107, 106], [107, 105], [108, 116], [108, 3], [109, 108], [110, 109], [111, 110], [113, 112], [113, 111], [114, 113], [114, 107], [115, 114], [116, 116], [116, 3], [117, 117], [117, 4], [118, 117], [118, 4], [119, 118], [122, 117], [122, 4], [123, 122], [124, 3], [124, 103], [125, 123], [125, 124], [126, 125], [127, 126], [128, 117], [128, 4], [129, 128], [130, 3], [130, 103], [131, 129], [131, 130], [132, 131], [133, 3], [133, 103], [135, 133], [137, 5], [137, 114], [138, 137], [139, 117], [139, 4], [140, 139], [141, 3], [141, 103], [142, 141], [142, 140], [143, 127], [144, 143], [144, 142], [149, 71], [149, 6], [149, 138], [149, 115], [150, 149], [150, 25], [151, 150], [153, 150]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/362955a1d3230a4d03d634c3e5bff13ca4ae6a5e24e02b2cad6e9251388f57a8_362955a1d3230a4d03d634c3e5bff13ca4ae6a5e24e02b2cad6e9251388f57a8.jsonl.gz", "strip_func_name": "sub_43355D", "query": "\n\n\n__int64 __fastcall sub_43355D(char *a1, int a2)\n{\nint v3; // eax\nint v5; // [rsp+4h] [rbp-2Ch]\nint i; // [rsp+4h] [rbp-2Ch]\nchar *nptr; // [rsp+8h] [rbp-28h]\nchar *nptra; // [rsp+8h] [rbp-28h]\nchar v9; // [rsp+17h] [rbp-19h]\n__int16 v10; // [rsp+26h] [rbp-Ah]\ndouble v11; // [rsp+28h] [rbp-8h]\n\nnptr = a1;\nv5 = a2;\nv11 = 0.0;\nif ( *a1 != 48 || a1[1] != 120 && a1[1] != 88 )\n{\nif ( *a1 == 48 )\n{\nwhile ( v5 > 0 && ((*__ctype_b_loc())[(unsigned __int8)*nptr] & 0x800) != 0 )\n{\nif ( *nptr == 56 || *nptr == 57 )\n{\nnptr = a1;\ngoto LABEL_28;\n}\nv11 = (double)(*nptr++ - 48) + v11 * 8.0;\n--v5;\n}\n}\nelse\n{\nLABEL_28:\nv9 = nptr[v5];\nnptr[v5] = 0;\nv11 = strtod(nptr, 0LL);\nnptr[v5] = v9;\n}\nreturn *(_QWORD *)&v11;\n}\nif ( a2 > 2 )\n{\nnptra = a1 + 2;\nfor ( i = a2 - 2; i > 0; --i )\n{\nv3 = *nptra;\nif ( v3 > 102 )\nbreak;\nif ( v3 >= 97 )\n{\nv10 = *nptra - 87;\n}\nelse if ( v3 > 57 )\n{\nif ( (unsigned int)(v3 - 65) > 5 )\nreturn *(_QWORD *)&v11;\nv10 = *nptra - 55;\n}\nelse\n{\nif ( v3 < 48 )\nreturn *(_QWORD *)&v11;\nv10 = *nptra - 48;\n}\nv11 = (double)v10 + v11 * 16.0;\n++nptra;\n}\nreturn *(_QWORD *)&v11;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,i,nptra,v9,v10,v11,sub_43355D,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'str', 'a2': 'length', 'i': 'lengthb', 'nptra': 'strb', 'v9': 'save', 'v10': 'val', 'v11': 'retval', 'sub_43355D': 'nondec2num'}"}
test_vector_ccmp_pv1
19c225f8d56e592731c3b1d55297bd2ac5ad747932f120be12c3c31f68aaa558
vanhoefm
fragattacks
NA
static void test_vector_ccmp_pv1(void) { u8 tk[] = { 0xc9, 0x7c, 0x1f, 0x67, 0xce, 0x37, 0x11, 0x85, 0x51, 0x4a, 0x8a, 0x19, 0xf2, 0xbd, 0xd5, 0x2f }; u8 pn[8]; u8 frame1[] = { 0x61, 0x00, 0xa2, 0xae, 0xa5, 0xb8, 0xfc, 0xba, 0x07, 0x00, 0x80, 0x33, 0xf8, 0xba, 0x1a, 0x55, 0xd0, 0x2f, 0x85, 0xae, 0x96, 0x7b, 0xb6, 0x2f, 0xb6, 0xcd, 0xa8, 0xeb, 0x7e, 0x78, 0xa0, 0x50 }; u8 frame2[] = { 0x61, 0x00, 0xa2, 0xae, 0xa5, 0xb8, 0xfc, 0xba, 0x07, 0x20, 0x80, 0x33, 0x02, 0xd2, 0xe1, 0x28, 0xa5, 0x7c, 0xf8, 0xba, 0x1a, 0x55, 0xd0, 0x2f, 0x85, 0xae, 0x96, 0x7b, 0xb6, 0x2f, 0xb6, 0xcd, 0xa8, 0xeb, 0x7e, 0x78, 0xa0, 0x50 }; u8 frame3[] = { 0x6d, 0x00, 0xa2, 0xae, 0xa5, 0xb8, 0xfc, 0xba, 0x52, 0x30, 0xf1, 0x84, 0x44, 0x08, 0x80, 0x33, 0xf8, 0xba, 0x1a, 0x55, 0xd0, 0x2f, 0x85, 0xae, 0x96, 0x7b, 0xb6, 0x2f, 0xb6, 0xcd, 0xa8, 0xeb, 0x7e, 0x78, 0xa0, 0x50 }; u8 *enc; size_t enc_len; u8 fcs[4]; u8 bssid[ETH_ALEN] = { 0xa2, 0xae, 0xa5, 0xb8, 0xfc, 0xba }; u8 da[ETH_ALEN] = { 0x02, 0xd2, 0xe1, 0x28, 0xa5, 0x7c }; u8 sa[ETH_ALEN] = { 0x52, 0x30, 0xf1, 0x84, 0x44, 0x08 }; u16 aid = 7; u32 bpn = 123; u16 sc = 0x3380; int key_id = 0; u16 fc; int tid = 3; u16 sid; wpa_printf(MSG_INFO, "\nIEEE P802.11ah/D10.0, J.6.4 CCMP PV1 test vectors\n"); wpa_printf(MSG_INFO, "BSSID: " MACSTR, MAC2STR(bssid)); wpa_printf(MSG_INFO, "DA: " MACSTR, MAC2STR(da)); wpa_printf(MSG_INFO, "SA: " MACSTR, MAC2STR(sa)); wpa_printf(MSG_INFO, "Association ID: %u", aid); wpa_printf(MSG_INFO, "Base PN: %u (0x%08x)", bpn, bpn); wpa_printf(MSG_INFO, "SC = 0x%04x (FragNum=%u SeqNum=%u)", sc, WLAN_GET_SEQ_FRAG(sc), WLAN_GET_SEQ_SEQ(sc)); wpa_printf(MSG_INFO, "TID = %u", tid); wpa_printf(MSG_INFO, "Key ID: %u", key_id); wpa_hexdump(MSG_INFO, "TK", tk, sizeof(tk)); wpa_printf(MSG_INFO, "PN = SC||BPN"); WPA_PUT_LE16(&pn[0], sc); WPA_PUT_LE32(&pn[2], bpn); wpa_hexdump(MSG_INFO, "PN (PN0..PN5)", pn, sizeof(pn)); wpa_printf(MSG_INFO, "\nPV1 test vector #1:\nHeader compression used and A3 was previously stored at the receiver\n"); fc = WPA_GET_LE16(frame1); wpa_printf(MSG_INFO, "FC=0x%04x (PV=%u Type=%u PTID/Subtype=%u From_DS=%u More_Fragments=%u Power_Management=%u More_Data=%u Protected_Frame=%u End_of_SP=%u Relayed_Frame=%u Ack_Policy=%u)", fc, fc & WLAN_FC_PVER, (fc & (BIT(2) | BIT(3) | BIT(4))) >> 2, (fc & (BIT(5) | BIT(6) | BIT(7))) >> 5, !!(fc & BIT(8)), !!(fc & BIT(9)), !!(fc & BIT(10)), !!(fc & BIT(11)), !!(fc & BIT(12)), !!(fc & BIT(13)), !!(fc & BIT(14)), !!(fc & BIT(15))); wpa_printf(MSG_INFO, "A1=" MACSTR, MAC2STR(&frame1[2])); sid = WPA_GET_LE16(&frame1[8]); wpa_printf(MSG_INFO, "A2=%02x %02x (SID: AID=%u A3_Present=%u A4_Present=%u A-MSDU=%u); corresponds to 52:30:f1:84:44:08 in uncompressed header", frame1[8], frame1[9], sid & ~(BIT(13) | BIT(14) | BIT(15)), !!(sid & BIT(13)), !!(sid & BIT(14)), !!(sid & BIT(15))); sc = WPA_GET_LE16(&frame1[10]); wpa_printf(MSG_INFO, "Sequence Control: %02x %02x (FN=%u SN=%u)", frame1[10], frame1[11], WLAN_GET_SEQ_FRAG(sc), WLAN_GET_SEQ_SEQ(sc)); wpa_printf(MSG_INFO, "A3 not present; corresponds to 02:d2:e1:28:a5:7c in uncompressed header"); wpa_printf(MSG_INFO, "A4 not present"); wpa_hexdump(MSG_INFO, "Plaintext Frame Header", frame1, 12); wpa_hexdump(MSG_INFO, "Plaintext Frame Body", frame1 + 12, sizeof(frame1) - 12); enc = ccmp_encrypt_pv1(tk, &frame1[2], sa, da, frame1, sizeof(frame1), 12, pn, key_id, &enc_len); if (enc == NULL) { wpa_printf(MSG_ERROR, "Failed to encrypt CCMP frame"); return; } wpa_hexdump(MSG_INFO, "Encrypted Frame Header", enc, 12); wpa_hexdump(MSG_INFO, "Encrypted Frame Frame Body", enc + 12, enc_len - 12); WPA_PUT_LE32(fcs, crc32(enc, enc_len)); wpa_hexdump(MSG_INFO, "Encrypted Frame FCS", fcs, sizeof(fcs)); wpa_printf(MSG_INFO, "\nPV1 test vector #2:\nHeader compression used and A3 was not previously stored at the receiver\n"); fc = WPA_GET_LE16(frame2); wpa_printf(MSG_INFO, "FC=0x%04x (PV=%u Type=%u PTID/Subtype=%u From_DS=%u More_Fragments=%u Power_Management=%u More_Data=%u Protected_Frame=%u End_of_SP=%u Relayed_Frame=%u Ack_Policy=%u)", fc, fc & WLAN_FC_PVER, (fc & (BIT(2) | BIT(3) | BIT(4))) >> 2, (fc & (BIT(5) | BIT(6) | BIT(7))) >> 5, !!(fc & BIT(8)), !!(fc & BIT(9)), !!(fc & BIT(10)), !!(fc & BIT(11)), !!(fc & BIT(12)), !!(fc & BIT(13)), !!(fc & BIT(14)), !!(fc & BIT(15))); wpa_printf(MSG_INFO, "A1=" MACSTR, MAC2STR(&frame2[2])); sid = WPA_GET_LE16(&frame2[8]); wpa_printf(MSG_INFO, "A2=%02x %02x (SID: AID=%u A3_Present=%u A4_Present=%u A-MSDU=%u); corresponds to 52:30:f1:84:44:08 in uncompressed header", frame2[8], frame2[9], sid & ~(BIT(13) | BIT(14) | BIT(15)), !!(sid & BIT(13)), !!(sid & BIT(14)), !!(sid & BIT(15))); sc = WPA_GET_LE16(&frame2[10]); wpa_printf(MSG_INFO, "Sequence Control: %02x %02x (FN=%u SN=%u)", frame2[10], frame2[11], WLAN_GET_SEQ_FRAG(sc), WLAN_GET_SEQ_SEQ(sc)); wpa_printf(MSG_INFO, "A3=" MACSTR, MAC2STR(&frame2[12])); wpa_printf(MSG_INFO, "A4 not present"); wpa_hexdump(MSG_INFO, "Plaintext Frame Header", frame2, 18); wpa_hexdump(MSG_INFO, "Plaintext Frame Body", frame2 + 18, sizeof(frame2) - 18); enc = ccmp_encrypt_pv1(tk, &frame2[2], sa, &frame2[12], frame2, sizeof(frame2), 18, pn, key_id, &enc_len); if (enc == NULL) { wpa_printf(MSG_ERROR, "Failed to encrypt CCMP frame"); return; } wpa_hexdump(MSG_INFO, "Encrypted Frame Header", enc, 18); wpa_hexdump(MSG_INFO, "Encrypted Frame Frame Body", enc + 18, enc_len - 18); WPA_PUT_LE32(fcs, crc32(enc, enc_len)); wpa_hexdump(MSG_INFO, "Encrypted Frame FCS", fcs, sizeof(fcs)); wpa_printf(MSG_INFO, "\nPV1 test vector #3:\nType 3 frame from SA to DA(=BSSID) (i.e., no separate DA in this example)\n"); fc = WPA_GET_LE16(frame3); wpa_printf(MSG_INFO, "FC=0x%04x (PV=%u Type=%u PTID/Subtype=%u From_DS=%u More_Fragments=%u Power_Management=%u More_Data=%u Protected_Frame=%u End_of_SP=%u Relayed_Frame=%u Ack_Policy=%u)", fc, fc & WLAN_FC_PVER, (fc & (BIT(2) | BIT(3) | BIT(4))) >> 2, (fc & (BIT(5) | BIT(6) | BIT(7))) >> 5, !!(fc & BIT(8)), !!(fc & BIT(9)), !!(fc & BIT(10)), !!(fc & BIT(11)), !!(fc & BIT(12)), !!(fc & BIT(13)), !!(fc & BIT(14)), !!(fc & BIT(15))); wpa_printf(MSG_INFO, "A1=" MACSTR, MAC2STR(&frame3[2])); wpa_printf(MSG_INFO, "A2=" MACSTR, MAC2STR(&frame3[8])); sc = WPA_GET_LE16(&frame3[14]); wpa_printf(MSG_INFO, "Sequence Control: %02x %02x (FN=%u SN=%u)", frame3[14], frame3[15], WLAN_GET_SEQ_FRAG(sc), WLAN_GET_SEQ_SEQ(sc)); wpa_printf(MSG_INFO, "A3 not present; corresponds to 02:d2:e1:28:a5:7c in uncompressed header"); wpa_printf(MSG_INFO, "A4 not present"); wpa_hexdump(MSG_INFO, "Plaintext Frame Header", frame3, 16); wpa_hexdump(MSG_INFO, "Plaintext Frame Body", frame3 + 16, sizeof(frame3) - 16); enc = ccmp_encrypt_pv1(tk, &frame3[2], &frame3[8], da, frame3, sizeof(frame3), 16, pn, key_id, &enc_len); if (enc == NULL) { wpa_printf(MSG_ERROR, "Failed to encrypt CCMP frame"); return; } wpa_hexdump(MSG_INFO, "Encrypted Frame Header", enc, 16); wpa_hexdump(MSG_INFO, "Encrypted Frame Frame Body", enc + 16, enc_len - 16); WPA_PUT_LE32(fcs, crc32(enc, enc_len)); wpa_hexdump(MSG_INFO, "Encrypted Frame FCS", fcs, sizeof(fcs)); wpa_debug_level = MSG_INFO; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402AF9", "function_addr": 4205305, "binary_name": "19c225f8d56e592731c3b1d55297bd2ac5ad747932f120be12c3c31f68aaa558.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r13"], [3, "push r12"], [4, "push rbx"], [5, "sub rsp, 0E8h"], [6, "mov rax, 851137CE671F7CC9h"], [7, "mov rdx, 2FD5BDF2198A4A51h"], [8, "mov qword ptr [rbp+var_50], rax"], [9, "mov [rbp+var_48], rdx"], [10, "mov rax, 0BAFCB8A5AEA20061h"], [11, "mov rdx, 551ABAF833800007h"], [12, "mov qword ptr [rbp+var_80], rax"], [13, "mov [rbp+var_78], rdx"], [14, "mov rax, 2FB67B96AE852FD0h"], [15, "mov rdx, 50A0787EEBA8CDB6h"], [16, "mov [rbp+var_70], rax"], [17, "mov [rbp+var_68], rdx"], [18, "mov rax, 0BAFCB8A5AEA20061h"], [19, "mov rdx, 28E1D20233802007h"], [20, "mov qword ptr [rbp+var_B0], rax"], [21, "mov [rbp+var_A8], rdx"], [22, "mov rax, 2FD0551ABAF87CA5h"], [23, "mov rdx, 0CDB62FB67B96AE85h"], [24, "mov [rbp+var_A0], rax"], [25, "mov [rbp+var_98], rdx"], [26, "mov [rbp+var_90], 787EEBA8h"], [27, "mov [rbp+var_8C], 50A0h"], [28, "mov rax, 0BAFCB8A5AEA2006Dh"], [29, "mov rdx, 3380084484F13052h"], [30, "mov qword ptr [rbp+var_E0], rax"], [31, "mov [rbp+var_D8], rdx"], [32, "mov rax, 0AE852FD0551ABAF8h"], [33, "mov rdx, 0EBA8CDB62FB67B96h"], [34, "mov [rbp+var_D0], rax"], [35, "mov [rbp+var_C8], rdx"], [36, "mov [rbp+var_C0], 50A0787Eh"], [37, "mov [rbp+var_F2], 0B8A5AEA2h"], [38, "mov [rbp+var_EE], 0BAFCh"], [39, "mov [rbp+var_F8], 28E1D202h"], [40, "mov [rbp+var_F4], 7CA5h"], [41, "mov [rbp+var_FE], 84F13052h"], [42, "mov [rbp+var_FA], 844h"], [43, "mov [rbp+var_22], 7"], [44, "mov [rbp+var_28], 7Bh "], [45, "mov [rbp+var_2A], 3380h"], [46, "mov [rbp+var_30], 0"], [47, "mov [rbp+var_34], 3"], [48, "mov esi, offset aIeeeP80211ahD1"], [49, "mov edi, 3"], [50, "mov eax, 0"], [51, "call sub_408A77"], [52, "movzx eax, byte ptr [rbp+var_EE+1]"], [53, "movzx esi, al"], [54, "movzx eax, byte ptr [rbp+var_EE]"], [55, "movzx ecx, al"], [56, "movzx eax, byte ptr [rbp+var_F2+3]"], [57, "movzx r8d, al"], [58, "movzx eax, byte ptr [rbp+var_F2+2]"], [59, "movzx edi, al"], [60, "movzx eax, byte ptr [rbp+var_F2+1]"], [61, "movzx edx, al"], [62, "movzx eax, byte ptr [rbp+var_F2]"], [63, "movzx eax, al"], [64, "push rsi"], [65, "push rcx"], [66, "mov r9d, r8d"], [67, "mov r8d, edi"], [68, "mov ecx, edx"], [69, "mov edx, eax"], [70, "mov esi, offset aBssid02x02x02x"], [71, "mov edi, 3"], [72, "mov eax, 0"], [73, "call sub_408A77"], [74, "add rsp, 10h"], [75, "movzx eax, byte ptr [rbp+var_F4+1]"], [76, "movzx esi, al"], [77, "movzx eax, byte ptr [rbp+var_F4]"], [78, "movzx ecx, al"], [79, "movzx eax, byte ptr [rbp+var_F8+3]"], [80, "movzx r8d, al"], [81, "movzx eax, byte ptr [rbp+var_F8+2]"], [82, "movzx edi, al"], [83, "movzx eax, byte ptr [rbp+var_F8+1]"], [84, "movzx edx, al"], [85, "movzx eax, byte ptr [rbp+var_F8]"], [86, "movzx eax, al"], [87, "push rsi"], [88, "push rcx"], [89, "mov r9d, r8d"], [90, "mov r8d, edi"], [91, "mov ecx, edx"], [92, "mov edx, eax"], [93, "mov esi, offset aDa02x02x02x02x"], [94, "mov edi, 3"], [95, "mov eax, 0"], [96, "call sub_408A77"], [97, "add rsp, 10h"], [98, "movzx eax, byte ptr [rbp+var_FA+1]"], [99, "movzx esi, al"], [100, "movzx eax, byte ptr [rbp+var_FA]"], [101, "movzx ecx, al"], [102, "movzx eax, byte ptr [rbp+var_FE+3]"], [103, "movzx r8d, al"], [104, "movzx eax, byte ptr [rbp+var_FE+2]"], [105, "movzx edi, al"], [106, "movzx eax, byte ptr [rbp+var_FE+1]"], [107, "movzx edx, al"], [108, "movzx eax, byte ptr [rbp+var_FE]"], [109, "movzx eax, al"], [110, "push rsi"], [111, "push rcx"], [112, "mov r9d, r8d"], [113, "mov r8d, edi"], [114, "mov ecx, edx"], [115, "mov edx, eax"], [116, "mov esi, offset aSa02x02x02x02x"], [117, "mov edi, 3"], [118, "mov eax, 0"], [119, "call sub_408A77"], [120, "add rsp, 10h"], [121, "movzx eax, [rbp+var_22]"], [122, "mov edx, eax"], [123, "mov esi, offset aAssociationIdU"], [124, "mov edi, 3"], [125, "mov eax, 0"], [126, "call sub_408A77"], [127, "mov edx, [rbp+var_28]"], [128, "mov eax, [rbp+var_28]"], [129, "mov ecx, edx"], [130, "mov edx, eax"], [131, "mov esi, offset aBasePnU0x08x"], [132, "mov edi, 3"], [133, "mov eax, 0"], [134, "call sub_408A77"], [135, "movzx eax, [rbp+var_2A]"], [136, "shr eax, 4"], [137, "mov ecx, eax"], [138, "movzx eax, [rbp+var_2A]"], [139, "and eax, 0Fh"], [140, "mov edx, eax"], [141, "movzx eax, [rbp+var_2A]"], [142, "mov r8d, ecx"], [143, "mov ecx, edx"], [144, "mov edx, eax"], [145, "mov esi, offset aSc0x04xFragnum"], [146, "mov edi, 3"], [147, "mov eax, 0"], [148, "call sub_408A77"], [149, "mov eax, [rbp+var_34]"], [150, "mov edx, eax"], [151, "mov esi, offset aTidU"], [152, "mov edi, 3"], [153, "mov eax, 0"], [154, "call sub_408A77"], [155, "mov eax, [rbp+var_30]"], [156, "mov edx, eax"], [157, "mov esi, offset aKeyIdU"], [158, "mov edi, 3"], [159, "mov eax, 0"], [160, "call sub_408A77"], [161, "lea rax, [rbp+var_50]"], [162, "mov ecx, 10h"], [163, "mov rdx, rax"], [164, "mov esi, offset aTk"], [165, "mov edi, 3"], [166, "call sub_408D75"], [167, "mov esi, offset aPnScBpn"], [168, "mov edi, 3"], [169, "mov eax, 0"], [170, "call sub_408A77"], [171, "movzx edx, [rbp+var_2A]"], [172, "lea rax, [rbp+var_58]"], [173, "mov esi, edx"], [174, "mov rdi, rax"], [175, "call sub_40252B"], [176, "mov eax, [rbp+var_28]"], [177, "lea rdx, [rbp+var_58]"], [178, "add rdx, 2"], [179, "mov esi, eax"], [180, "mov rdi, rdx"], [181, "call sub_40255C"], [182, "lea rax, [rbp+var_58]"], [183, "mov ecx, 8"], [184, "mov rdx, rax"], [185, "mov esi, offset aPnPn0Pn5"], [186, "mov edi, 3"], [187, "call sub_408D75"], [188, "mov esi, offset aPv1TestVector1"], [189, "mov edi, 3"], [190, "mov eax, 0"], [191, "call sub_408A77"], [192, "lea rax, [rbp+var_80]"], [193, "mov rdi, rax"], [194, "call sub_402502"], [195, "mov [rbp+var_36], ax"], [196, "movzx eax, [rbp+var_36]"], [197, "shr ax, 0Fh"], [198, "movzx ebx, al"], [199, "movzx eax, [rbp+var_36]"], [200, "and eax, 4000h"], [201, "test eax, eax"], [202, "setnz al"], [203, "movzx r11d, al"], [204, "movzx eax, [rbp+var_36]"], [205, "and eax, 2000h"], [206, "test eax, eax"], [207, "setnz al"], [208, "movzx r10d, al"], [209, "movzx eax, [rbp+var_36]"], [210, "and eax, 1000h"], [211, "test eax, eax"], [212, "setnz al"], [213, "movzx r9d, al"], [214, "movzx eax, [rbp+var_36]"], [215, "and eax, 800h"], [216, "test eax, eax"], [217, "setnz al"], [218, "movzx r8d, al"], [219, "movzx eax, [rbp+var_36]"], [220, "and eax, 400h"], [221, "test eax, eax"], [222, "setnz al"], [223, "movzx edi, al"], [224, "movzx eax, [rbp+var_36]"], [225, "and eax, 200h"], [226, "test eax, eax"], [227, "setnz al"], [228, "movzx esi, al"], [229, "movzx eax, [rbp+var_36]"], [230, "and eax, 100h"], [231, "test eax, eax"], [232, "setnz al"], [233, "movzx ecx, al"], [234, "movzx eax, [rbp+var_36]"], [235, "shr eax, 5"], [236, "and eax, 7"], [237, "mov r13d, eax"], [238, "movzx eax, [rbp+var_36]"], [239, "shr eax, 2"], [240, "and eax, 7"], [241, "mov r12d, eax"], [242, "movzx eax, [rbp+var_36]"], [243, "and eax, 3"], [244, "mov edx, eax"], [245, "movzx eax, [rbp+var_36]"], [246, "push rbx"], [247, "push r11"], [248, "push r10"], [249, "push r9"], [250, "push r8"], [251, "push rdi"], [252, "push rsi"], [253, "push rcx"], [254, "mov r9d, r13d"], [255, "mov r8d, r12d"], [256, "mov ecx, edx"], [257, "mov edx, eax"], [258, "mov esi, offset aFc0x04xPvUType"], [259, "mov edi, 3"], [260, "mov eax, 0"], [261, "call sub_408A77"], [262, "add rsp, 40h"], [263, "lea rax, [rbp+var_80]"], [264, "add rax, 2"], [265, "add rax, 5"], [266, "movzx eax, byte ptr [rax]"], [267, "movzx esi, al"], [268, "lea rax, [rbp+var_80]"], [269, "add rax, 2"], [270, "add rax, 4"], [271, "movzx eax, byte ptr [rax]"], [272, "movzx ecx, al"], [273, "lea rax, [rbp+var_80]"], [274, "add rax, 2"], [275, "add rax, 3"], [276, "movzx eax, byte ptr [rax]"], [277, "movzx r8d, al"], [278, "lea rax, [rbp+var_80]"], [279, "add rax, 2"], [280, "add rax, 2"], [281, "movzx eax, byte ptr [rax]"], [282, "movzx edi, al"], [283, "lea rax, [rbp+var_80]"], [284, "add rax, 2"], [285, "add rax, 1"], [286, "movzx eax, byte ptr [rax]"], [287, "movzx edx, al"], [288, "movzx eax, byte ptr [rbp+var_80+2]"], [289, "movzx eax, al"], [290, "push rsi"], [291, "push rcx"], [292, "mov r9d, r8d"], [293, "mov r8d, edi"], [294, "mov ecx, edx"], [295, "mov edx, eax"], [296, "mov esi, offset aA102x02x02x02x"], [297, "mov edi, 3"], [298, "mov eax, 0"], [299, "call sub_408A77"], [300, "add rsp, 10h"], [301, "lea rax, [rbp+var_80]"], [302, "add rax, 8"], [303, "mov rdi, rax"], [304, "call sub_402502"], [305, "mov [rbp+var_38], ax"], [306, "movzx eax, [rbp+var_38]"], [307, "shr ax, 0Fh"], [308, "movzx esi, al"], [309, "movzx eax, [rbp+var_38]"], [310, "and eax, 4000h"], [311, "test eax, eax"], [312, "setnz al"], [313, "movzx ecx, al"], [314, "movzx eax, [rbp+var_38]"], [315, "and eax, 2000h"], [316, "test eax, eax"], [317, "setnz al"], [318, "movzx edi, al"], [319, "movzx eax, [rbp+var_38]"], [320, "and ah, 1Fh"], [321, "mov r8d, eax"], [322, "movzx eax, byte ptr [rbp+var_78+1]"], [323, "movzx edx, al"], [324, "movzx eax, byte ptr [rbp+var_78]"], [325, "movzx eax, al"], [326, "push rsi"], [327, "push rcx"], [328, "mov r9d, edi"], [329, "mov ecx, edx"], [330, "mov edx, eax"], [331, "mov esi, offset aA202x02xSidAid"], [332, "mov edi, 3"], [333, "mov eax, 0"], [334, "call sub_408A77"], [335, "add rsp, 10h"], [336, "lea rax, [rbp+var_80]"], [337, "add rax, 0Ah"], [338, "mov rdi, rax"], [339, "call sub_402502"], [340, "mov [rbp+var_2A], ax"], [341, "movzx eax, [rbp+var_2A]"], [342, "shr eax, 4"], [343, "mov esi, eax"], [344, "movzx eax, [rbp+var_2A]"], [345, "and eax, 0Fh"], [346, "mov ecx, eax"], [347, "movzx eax, byte ptr [rbp+var_78+3]"], [348, "movzx edx, al"], [349, "movzx eax, byte ptr [rbp+var_78+2]"], [350, "movzx eax, al"], [351, "mov r9d, esi"], [352, "mov r8d, ecx"], [353, "mov ecx, edx"], [354, "mov edx, eax"], [355, "mov esi, offset aSequenceContro"], [356, "mov edi, 3"], [357, "mov eax, 0"], [358, "call sub_408A77"], [359, "mov esi, offset aA3NotPresentCo"], [360, "mov edi, 3"], [361, "mov eax, 0"], [362, "call sub_408A77"], [363, "mov esi, offset aA4NotPresent"], [364, "mov edi, 3"], [365, "mov eax, 0"], [366, "call sub_408A77"], [367, "lea rax, [rbp+var_80]"], [368, "mov ecx, 0Ch"], [369, "mov rdx, rax"], [370, "mov esi, offset aPlaintextFrame"], [371, "mov edi, 3"], [372, "call sub_408D75"], [373, "lea rax, [rbp+var_80]"], [374, "add rax, 0Ch"], [375, "mov ecx, 14h"], [376, "mov rdx, rax"], [377, "mov esi, offset aPlaintextFrame_0"], [378, "mov edi, 3"], [379, "call sub_408D75"], [380, "lea r8, [rbp+var_80]"], [381, "lea rcx, [rbp+var_F8]"], [382, "lea rdx, [rbp+var_FE]"], [383, "lea rax, [rbp+var_80]"], [384, "lea rsi, [rax+2]"], [385, "lea rax, [rbp+var_50]"], [386, "lea rdi, [rbp+var_E8]"], [387, "push rdi"], [388, "mov edi, [rbp+var_30]"], [389, "push rdi"], [390, "lea rdi, [rbp+var_58]"], [391, "push rdi"], [392, "push 0Ch"], [393, "mov r9d, 20h "], [394, "mov rdi, rax"], [395, "call sub_4058E0"], [396, "add rsp, 20h"], [397, "mov [rbp+var_40], rax"], [398, "cmp [rbp+var_40], 0"], [399, "jnz short loc_4031B9"], [400, "mov esi, offset aFailedToEncryp_0"], [401, "mov edi, 5"], [402, "mov eax, 0"], [403, "call sub_408A77"], [404, "jmp loc_403AA2"], [405, "mov rax, [rbp+var_40]"], [406, "mov ecx, 0Ch"], [407, "mov rdx, rax"], [408, "mov esi, offset aEncryptedFrame"], [409, "mov edi, 3"], [410, "call sub_408D75"], [411, "mov rax, [rbp+var_E8]"], [412, "lea rdx, [rax-0Ch]"], [413, "mov rax, [rbp+var_40]"], [414, "add rax, 0Ch"], [415, "mov rcx, rdx"], [416, "mov rdx, rax"], [417, "mov esi, offset aEncryptedFrame_0"], [418, "mov edi, 3"], [419, "call sub_408D75"], [420, "mov rdx, [rbp+var_E8]"], [421, "mov rax, [rbp+var_40]"], [422, "mov rsi, rdx"], [423, "mov rdi, rax"], [424, "call sub_40896B"], [425, "mov edx, eax"], [426, "lea rax, [rbp+var_EC]"], [427, "mov esi, edx"], [428, "mov rdi, rax"], [429, "call sub_40255C"], [430, "lea rax, [rbp+var_EC]"], [431, "mov ecx, 4"], [432, "mov rdx, rax"], [433, "mov esi, offset aEncryptedFrame_1"], [434, "mov edi, 3"], [435, "call sub_408D75"], [436, "mov esi, offset aPv1TestVector2"], [437, "mov edi, 3"], [438, "mov eax, 0"], [439, "call sub_408A77"], [440, "lea rax, [rbp+var_B0]"], [441, "mov rdi, rax"], [442, "call sub_402502"], [443, "mov [rbp+var_36], ax"], [444, "movzx eax, [rbp+var_36]"], [445, "shr ax, 0Fh"], [446, "movzx ebx, al"], [447, "movzx eax, [rbp+var_36]"], [448, "and eax, 4000h"], [449, "test eax, eax"], [450, "setnz al"], [451, "movzx r11d, al"], [452, "movzx eax, [rbp+var_36]"], [453, "and eax, 2000h"], [454, "test eax, eax"], [455, "setnz al"], [456, "movzx r10d, al"], [457, "movzx eax, [rbp+var_36]"], [458, "and eax, 1000h"], [459, "test eax, eax"], [460, "setnz al"], [461, "movzx r9d, al"], [462, "movzx eax, [rbp+var_36]"], [463, "and eax, 800h"], [464, "test eax, eax"], [465, "setnz al"], [466, "movzx r8d, al"], [467, "movzx eax, [rbp+var_36]"], [468, "and eax, 400h"], [469, "test eax, eax"], [470, "setnz al"], [471, "movzx edi, al"], [472, "movzx eax, [rbp+var_36]"], [473, "and eax, 200h"], [474, "test eax, eax"], [475, "setnz al"], [476, "movzx esi, al"], [477, "movzx eax, [rbp+var_36]"], [478, "and eax, 100h"], [479, "test eax, eax"], [480, "setnz al"], [481, "movzx ecx, al"], [482, "movzx eax, [rbp+var_36]"], [483, "shr eax, 5"], [484, "and eax, 7"], [485, "mov r13d, eax"], [486, "movzx eax, [rbp+var_36]"], [487, "shr eax, 2"], [488, "and eax, 7"], [489, "mov r12d, eax"], [490, "movzx eax, [rbp+var_36]"], [491, "and eax, 3"], [492, "mov edx, eax"], [493, "movzx eax, [rbp+var_36]"], [494, "push rbx"], [495, "push r11"], [496, "push r10"], [497, "push r9"], [498, "push r8"], [499, "push rdi"], [500, "push rsi"], [501, "push rcx"], [502, "mov r9d, r13d"], [503, "mov r8d, r12d"], [504, "mov ecx, edx"], [505, "mov edx, eax"], [506, "mov esi, offset aFc0x04xPvUType"], [507, "mov edi, 3"], [508, "mov eax, 0"], [509, "call sub_408A77"], [510, "add rsp, 40h"], [511, "lea rax, [rbp+var_B0]"], [512, "add rax, 2"], [513, "add rax, 5"], [514, "movzx eax, byte ptr [rax]"], [515, "movzx esi, al"], [516, "lea rax, [rbp+var_B0]"], [517, "add rax, 2"], [518, "add rax, 4"], [519, "movzx eax, byte ptr [rax]"], [520, "movzx ecx, al"], [521, "lea rax, [rbp+var_B0]"], [522, "add rax, 2"], [523, "add rax, 3"], [524, "movzx eax, byte ptr [rax]"], [525, "movzx r8d, al"], [526, "lea rax, [rbp+var_B0]"], [527, "add rax, 2"], [528, "add rax, 2"], [529, "movzx eax, byte ptr [rax]"], [530, "movzx edi, al"], [531, "lea rax, [rbp+var_B0]"], [532, "add rax, 2"], [533, "add rax, 1"], [534, "movzx eax, byte ptr [rax]"], [535, "movzx edx, al"], [536, "movzx eax, byte ptr [rbp+var_B0+2]"], [537, "movzx eax, al"], [538, "push rsi"], [539, "push rcx"], [540, "mov r9d, r8d"], [541, "mov r8d, edi"], [542, "mov ecx, edx"], [543, "mov edx, eax"], [544, "mov esi, offset aA102x02x02x02x"], [545, "mov edi, 3"], [546, "mov eax, 0"], [547, "call sub_408A77"], [548, "add rsp, 10h"], [549, "lea rax, [rbp+var_B0]"], [550, "add rax, 8"], [551, "mov rdi, rax"], [552, "call sub_402502"], [553, "mov [rbp+var_38], ax"], [554, "movzx eax, [rbp+var_38]"], [555, "shr ax, 0Fh"], [556, "movzx esi, al"], [557, "movzx eax, [rbp+var_38]"], [558, "and eax, 4000h"], [559, "test eax, eax"], [560, "setnz al"], [561, "movzx ecx, al"], [562, "movzx eax, [rbp+var_38]"], [563, "and eax, 2000h"], [564, "test eax, eax"], [565, "setnz al"], [566, "movzx edi, al"], [567, "movzx eax, [rbp+var_38]"], [568, "and ah, 1Fh"], [569, "mov r8d, eax"], [570, "movzx eax, byte ptr [rbp+var_A8+1]"], [571, "movzx edx, al"], [572, "movzx eax, byte ptr [rbp+var_A8]"], [573, "movzx eax, al"], [574, "push rsi"], [575, "push rcx"], [576, "mov r9d, edi"], [577, "mov ecx, edx"], [578, "mov edx, eax"], [579, "mov esi, offset aA202x02xSidAid"], [580, "mov edi, 3"], [581, "mov eax, 0"], [582, "call sub_408A77"], [583, "add rsp, 10h"], [584, "lea rax, [rbp+var_B0]"], [585, "add rax, 0Ah"], [586, "mov rdi, rax"], [587, "call sub_402502"], [588, "mov [rbp+var_2A], ax"], [589, "movzx eax, [rbp+var_2A]"], [590, "shr eax, 4"], [591, "mov esi, eax"], [592, "movzx eax, [rbp+var_2A]"], [593, "and eax, 0Fh"], [594, "mov ecx, eax"], [595, "movzx eax, byte ptr [rbp+var_A8+3]"], [596, "movzx edx, al"], [597, "movzx eax, byte ptr [rbp+var_A8+2]"], [598, "movzx eax, al"], [599, "mov r9d, esi"], [600, "mov r8d, ecx"], [601, "mov ecx, edx"], [602, "mov edx, eax"], [603, "mov esi, offset aSequenceContro"], [604, "mov edi, 3"], [605, "mov eax, 0"], [606, "call sub_408A77"], [607, "lea rax, [rbp+var_B0]"], [608, "add rax, 0Ch"], [609, "add rax, 5"], [610, "movzx eax, byte ptr [rax]"], [611, "movzx esi, al"], [612, "lea rax, [rbp+var_B0]"], [613, "add rax, 0Ch"], [614, "add rax, 4"], [615, "movzx eax, byte ptr [rax]"], [616, "movzx ecx, al"], [617, "lea rax, [rbp+var_B0]"], [618, "add rax, 0Ch"], [619, "add rax, 3"], [620, "movzx eax, byte ptr [rax]"], [621, "movzx r8d, al"], [622, "lea rax, [rbp+var_B0]"], [623, "add rax, 0Ch"], [624, "add rax, 2"], [625, "movzx eax, byte ptr [rax]"], [626, "movzx edi, al"], [627, "lea rax, [rbp+var_B0]"], [628, "add rax, 0Ch"], [629, "add rax, 1"], [630, "movzx eax, byte ptr [rax]"], [631, "movzx edx, al"], [632, "movzx eax, byte ptr [rbp+var_A8+4]"], [633, "movzx eax, al"], [634, "push rsi"], [635, "push rcx"], [636, "mov r9d, r8d"], [637, "mov r8d, edi"], [638, "mov ecx, edx"], [639, "mov edx, eax"], [640, "mov esi, offset aA302x02x02x02x"], [641, "mov edi, 3"], [642, "mov eax, 0"], [643, "call sub_408A77"], [644, "add rsp, 10h"], [645, "mov esi, offset aA4NotPresent"], [646, "mov edi, 3"], [647, "mov eax, 0"], [648, "call sub_408A77"], [649, "lea rax, [rbp+var_B0]"], [650, "mov ecx, 12h"], [651, "mov rdx, rax"], [652, "mov esi, offset aPlaintextFrame"], [653, "mov edi, 3"], [654, "call sub_408D75"], [655, "lea rax, [rbp+var_B0]"], [656, "add rax, 12h"], [657, "mov ecx, 14h"], [658, "mov rdx, rax"], [659, "mov esi, offset aPlaintextFrame_0"], [660, "mov edi, 3"], [661, "call sub_408D75"], [662, "lea r8, [rbp+var_B0]"], [663, "lea rax, [rbp+var_B0]"], [664, "lea rcx, [rax+0Ch]"], [665, "lea rdx, [rbp+var_FE]"], [666, "lea rax, [rbp+var_B0]"], [667, "lea rsi, [rax+2]"], [668, "lea rax, [rbp+var_50]"], [669, "lea rdi, [rbp+var_E8]"], [670, "push rdi"], [671, "mov edi, [rbp+var_30]"], [672, "push rdi"], [673, "lea rdi, [rbp+var_58]"], [674, "push rdi"], [675, "push 12h"], [676, "mov r9d, 26h "], [677, "mov rdi, rax"], [678, "call sub_4058E0"], [679, "add rsp, 20h"], [680, "mov [rbp+var_40], rax"], [681, "cmp [rbp+var_40], 0"], [682, "jnz short loc_403618"], [683, "mov esi, offset aFailedToEncryp_0"], [684, "mov edi, 5"], [685, "mov eax, 0"], [686, "call sub_408A77"], [687, "jmp loc_403AA2"], [688, "mov rax, [rbp+var_40]"], [689, "mov ecx, 12h"], [690, "mov rdx, rax"], [691, "mov esi, offset aEncryptedFrame"], [692, "mov edi, 3"], [693, "call sub_408D75"], [694, "mov rax, [rbp+var_E8]"], [695, "lea rdx, [rax-12h]"], [696, "mov rax, [rbp+var_40]"], [697, "add rax, 12h"], [698, "mov rcx, rdx"], [699, "mov rdx, rax"], [700, "mov esi, offset aEncryptedFrame_0"], [701, "mov edi, 3"], [702, "call sub_408D75"], [703, "mov rdx, [rbp+var_E8]"], [704, "mov rax, [rbp+var_40]"], [705, "mov rsi, rdx"], [706, "mov rdi, rax"], [707, "call sub_40896B"], [708, "mov edx, eax"], [709, "lea rax, [rbp+var_EC]"], [710, "mov esi, edx"], [711, "mov rdi, rax"], [712, "call sub_40255C"], [713, "lea rax, [rbp+var_EC]"], [714, "mov ecx, 4"], [715, "mov rdx, rax"], [716, "mov esi, offset aEncryptedFrame_1"], [717, "mov edi, 3"], [718, "call sub_408D75"], [719, "mov esi, offset aPv1TestVector3"], [720, "mov edi, 3"], [721, "mov eax, 0"], [722, "call sub_408A77"], [723, "lea rax, [rbp+var_E0]"], [724, "mov rdi, rax"], [725, "call sub_402502"], [726, "mov [rbp+var_36], ax"], [727, "movzx eax, [rbp+var_36]"], [728, "shr ax, 0Fh"], [729, "movzx ebx, al"], [730, "movzx eax, [rbp+var_36]"], [731, "and eax, 4000h"], [732, "test eax, eax"], [733, "setnz al"], [734, "movzx r11d, al"], [735, "movzx eax, [rbp+var_36]"], [736, "and eax, 2000h"], [737, "test eax, eax"], [738, "setnz al"], [739, "movzx r10d, al"], [740, "movzx eax, [rbp+var_36]"], [741, "and eax, 1000h"], [742, "test eax, eax"], [743, "setnz al"], [744, "movzx r9d, al"], [745, "movzx eax, [rbp+var_36]"], [746, "and eax, 800h"], [747, "test eax, eax"], [748, "setnz al"], [749, "movzx r8d, al"], [750, "movzx eax, [rbp+var_36]"], [751, "and eax, 400h"], [752, "test eax, eax"], [753, "setnz al"], [754, "movzx edi, al"], [755, "movzx eax, [rbp+var_36]"], [756, "and eax, 200h"], [757, "test eax, eax"], [758, "setnz al"], [759, "movzx esi, al"], [760, "movzx eax, [rbp+var_36]"], [761, "and eax, 100h"], [762, "test eax, eax"], [763, "setnz al"], [764, "movzx ecx, al"], [765, "movzx eax, [rbp+var_36]"], [766, "shr eax, 5"], [767, "and eax, 7"], [768, "mov r13d, eax"], [769, "movzx eax, [rbp+var_36]"], [770, "shr eax, 2"], [771, "and eax, 7"], [772, "mov r12d, eax"], [773, "movzx eax, [rbp+var_36]"], [774, "and eax, 3"], [775, "mov edx, eax"], [776, "movzx eax, [rbp+var_36]"], [777, "push rbx"], [778, "push r11"], [779, "push r10"], [780, "push r9"], [781, "push r8"], [782, "push rdi"], [783, "push rsi"], [784, "push rcx"], [785, "mov r9d, r13d"], [786, "mov r8d, r12d"], [787, "mov ecx, edx"], [788, "mov edx, eax"], [789, "mov esi, offset aFc0x04xPvUType"], [790, "mov edi, 3"], [791, "mov eax, 0"], [792, "call sub_408A77"], [793, "add rsp, 40h"], [794, "lea rax, [rbp+var_E0]"], [795, "add rax, 2"], [796, "add rax, 5"], [797, "movzx eax, byte ptr [rax]"], [798, "movzx esi, al"], [799, "lea rax, [rbp+var_E0]"], [800, "add rax, 2"], [801, "add rax, 4"], [802, "movzx eax, byte ptr [rax]"], [803, "movzx ecx, al"], [804, "lea rax, [rbp+var_E0]"], [805, "add rax, 2"], [806, "add rax, 3"], [807, "movzx eax, byte ptr [rax]"], [808, "movzx r8d, al"], [809, "lea rax, [rbp+var_E0]"], [810, "add rax, 2"], [811, "add rax, 2"], [812, "movzx eax, byte ptr [rax]"], [813, "movzx edi, al"], [814, "lea rax, [rbp+var_E0]"], [815, "add rax, 2"], [816, "add rax, 1"], [817, "movzx eax, byte ptr [rax]"], [818, "movzx edx, al"], [819, "movzx eax, byte ptr [rbp+var_E0+2]"], [820, "movzx eax, al"], [821, "push rsi"], [822, "push rcx"], [823, "mov r9d, r8d"], [824, "mov r8d, edi"], [825, "mov ecx, edx"], [826, "mov edx, eax"], [827, "mov esi, offset aA102x02x02x02x"], [828, "mov edi, 3"], [829, "mov eax, 0"], [830, "call sub_408A77"], [831, "add rsp, 10h"], [832, "lea rax, [rbp+var_E0]"], [833, "add rax, 8"], [834, "add rax, 5"], [835, "movzx eax, byte ptr [rax]"], [836, "movzx esi, al"], [837, "lea rax, [rbp+var_E0]"], [838, "add rax, 8"], [839, "add rax, 4"], [840, "movzx eax, byte ptr [rax]"], [841, "movzx ecx, al"], [842, "lea rax, [rbp+var_E0]"], [843, "add rax, 8"], [844, "add rax, 3"], [845, "movzx eax, byte ptr [rax]"], [846, "movzx r8d, al"], [847, "lea rax, [rbp+var_E0]"], [848, "add rax, 8"], [849, "add rax, 2"], [850, "movzx eax, byte ptr [rax]"], [851, "movzx edi, al"], [852, "lea rax, [rbp+var_E0]"], [853, "add rax, 8"], [854, "add rax, 1"], [855, "movzx eax, byte ptr [rax]"], [856, "movzx edx, al"], [857, "movzx eax, byte ptr [rbp+var_D8]"], [858, "movzx eax, al"], [859, "push rsi"], [860, "push rcx"], [861, "mov r9d, r8d"], [862, "mov r8d, edi"], [863, "mov ecx, edx"], [864, "mov edx, eax"], [865, "mov esi, offset aA202x02x02x02x"], [866, "mov edi, 3"], [867, "mov eax, 0"], [868, "call sub_408A77"], [869, "add rsp, 10h"], [870, "lea rax, [rbp+var_E0]"], [871, "add rax, 0Eh"], [872, "mov rdi, rax"], [873, "call sub_402502"], [874, "mov [rbp+var_2A], ax"], [875, "movzx eax, [rbp+var_2A]"], [876, "shr eax, 4"], [877, "mov esi, eax"], [878, "movzx eax, [rbp+var_2A]"], [879, "and eax, 0Fh"], [880, "mov ecx, eax"], [881, "movzx eax, byte ptr [rbp+var_D8+7]"], [882, "movzx edx, al"], [883, "movzx eax, byte ptr [rbp+var_D8+6]"], [884, "movzx eax, al"], [885, "mov r9d, esi"], [886, "mov r8d, ecx"], [887, "mov ecx, edx"], [888, "mov edx, eax"], [889, "mov esi, offset aSequenceContro"], [890, "mov edi, 3"], [891, "mov eax, 0"], [892, "call sub_408A77"], [893, "mov esi, offset aA3NotPresentCo"], [894, "mov edi, 3"], [895, "mov eax, 0"], [896, "call sub_408A77"], [897, "mov esi, offset aA4NotPresent"], [898, "mov edi, 3"], [899, "mov eax, 0"], [900, "call sub_408A77"], [901, "lea rax, [rbp+var_E0]"], [902, "mov ecx, 10h"], [903, "mov rdx, rax"], [904, "mov esi, offset aPlaintextFrame"], [905, "mov edi, 3"], [906, "call sub_408D75"], [907, "lea rax, [rbp+var_E0]"], [908, "add rax, 10h"], [909, "mov ecx, 14h"], [910, "mov rdx, rax"], [911, "mov esi, offset aPlaintextFrame_0"], [912, "mov edi, 3"], [913, "call sub_408D75"], [914, "lea r8, [rbp+var_E0]"], [915, "lea rdx, [rbp+var_F8]"], [916, "lea rax, [rbp+var_E0]"], [917, "lea rdi, [rax+8]"], [918, "lea rax, [rbp+var_E0]"], [919, "lea rsi, [rax+2]"], [920, "lea rax, [rbp+var_50]"], [921, "lea rcx, [rbp+var_E8]"], [922, "push rcx"], [923, "mov ecx, [rbp+var_30]"], [924, "push rcx"], [925, "lea rcx, [rbp+var_58]"], [926, "push rcx"], [927, "push 10h"], [928, "mov r9d, 24h "], [929, "mov rcx, rdx"], [930, "mov rdx, rdi"], [931, "mov rdi, rax"], [932, "call sub_4058E0"], [933, "add rsp, 20h"], [934, "mov [rbp+var_40], rax"], [935, "cmp [rbp+var_40], 0"], [936, "jnz short loc_403A0E"], [937, "mov esi, offset aFailedToEncryp_0"], [938, "mov edi, 5"], [939, "mov eax, 0"], [940, "call sub_408A77"], [941, "jmp loc_403AA2"], [942, "mov rax, [rbp+var_40]"], [943, "mov ecx, 10h"], [944, "mov rdx, rax"], [945, "mov esi, offset aEncryptedFrame"], [946, "mov edi, 3"], [947, "call sub_408D75"], [948, "mov rax, [rbp+var_E8]"], [949, "lea rdx, [rax-10h]"], [950, "mov rax, [rbp+var_40]"], [951, "add rax, 10h"], [952, "mov rcx, rdx"], [953, "mov rdx, rax"], [954, "mov esi, offset aEncryptedFrame_0"], [955, "mov edi, 3"], [956, "call sub_408D75"], [957, "mov rdx, [rbp+var_E8]"], [958, "mov rax, [rbp+var_40]"], [959, "mov rsi, rdx"], [960, "mov rdi, rax"], [961, "call sub_40896B"], [962, "mov edx, eax"], [963, "lea rax, [rbp+var_EC]"], [964, "mov esi, edx"], [965, "mov rdi, rax"], [966, "call sub_40255C"], [967, "lea rax, [rbp+var_EC]"], [968, "mov ecx, 4"], [969, "mov rdx, rax"], [970, "mov esi, offset aEncryptedFrame_1"], [971, "mov edi, 3"], [972, "call sub_408D75"], [973, "mov cs:dword_416220, 3"], [974, "lea rsp, [rbp-18h]"], [975, "pop rbx"], [976, "pop r12"], [977, "pop r13"], [978, "pop rbp"], [979, "retn"]], "data_dep": [[8, 6], [9, 7], [12, 10], [13, 11], [16, 14], [17, 15], [20, 18], [21, 19], [24, 22], [25, 23], [30, 28], [31, 29], [34, 32], [35, 33], [53, 52], [54, 38], [55, 54], [57, 56], [59, 58], [61, 60], [62, 37], [63, 62], [64, 53], [65, 55], [66, 57], [67, 59], [68, 61], [69, 63], [74, 5], [76, 75], [77, 40], [78, 77], [80, 79], [82, 81], [84, 83], [85, 39], [86, 85], [87, 76], [88, 78], [89, 80], [90, 82], [91, 84], [92, 86], [97, 74], [99, 98], [100, 42], [101, 100], [103, 102], [105, 104], [107, 106], [108, 41], [109, 108], [110, 99], [111, 101], [112, 103], [113, 105], [114, 107], [115, 109], [120, 97], [121, 43], [122, 121], [127, 44], [128, 44], [129, 127], [130, 128], [135, 45], [136, 135], [137, 136], [138, 45], [139, 138], [140, 139], [141, 45], [142, 137], [143, 140], [144, 141], [149, 47], [150, 149], [155, 46], [156, 155], [161, 8], [161, 160], [163, 161], [171, 45], [172, 170], [173, 171], [174, 172], [176, 44], [177, 171], [178, 177], [179, 176], [180, 178], [182, 181], [184, 182], [192, 191], [192, 12], [193, 192], [195, 194], [196, 195], [197, 196], [198, 197], [199, 195], [200, 199], [201, 200], [202, 201], [203, 202], [204, 195], [205, 204], [206, 205], [207, 206], [208, 207], [209, 195], [210, 209], [211, 210], [212, 211], [213, 212], [214, 195], [215, 214], [216, 215], [217, 216], [218, 217], [219, 195], [220, 219], [221, 220], [222, 221], [223, 222], [224, 195], [225, 224], [226, 225], [227, 226], [228, 227], [229, 195], [230, 229], [231, 230], [232, 231], [233, 232], [234, 195], [235, 234], [236, 235], [237, 236], [238, 195], [239, 238], [240, 239], [241, 240], [242, 195], [243, 242], [244, 243], [245, 195], [246, 198], [247, 203], [248, 208], [249, 213], [250, 218], [251, 223], [252, 228], [253, 233], [254, 237], [255, 241], [256, 244], [257, 245], [262, 120], [263, 261], [263, 12], [264, 263], [265, 264], [266, 265], [267, 266], [268, 266], [268, 12], [269, 268], [270, 269], [271, 270], [272, 271], [273, 12], [273, 271], [274, 273], [275, 274], [276, 275], [277, 276], [278, 12], [278, 276], [279, 278], [280, 279], [281, 280], [282, 281], [283, 12], [283, 281], [284, 283], [285, 284], [286, 285], [287, 286], [289, 288], [290, 267], [291, 272], [292, 277], [293, 282], [294, 287], [295, 289], [300, 262], [301, 299], [301, 12], [302, 301], [303, 302], [305, 304], [306, 305], [307, 306], [308, 307], [309, 305], [310, 309], [311, 310], [312, 311], [313, 312], [314, 305], [315, 314], [316, 315], [317, 316], [318, 317], [319, 305], [320, 319], [321, 320], [323, 322], [324, 13], [325, 324], [326, 308], [327, 313], [328, 318], [329, 323], [330, 325], [335, 300], [336, 334], [336, 12], [337, 336], [338, 337], [340, 339], [341, 340], [342, 341], [343, 342], [344, 340], [345, 344], [346, 345], [348, 347], [350, 349], [351, 343], [352, 346], [353, 348], [354, 350], [367, 12], [367, 366], [369, 367], [373, 12], [373, 372], [374, 373], [376, 374], [380, 352], [380, 12], [381, 39], [381, 375], [382, 41], [382, 376], [383, 379], [383, 12], [384, 383], [384, 377], [385, 8], [385, 383], [386, 378], [387, 386], [388, 46], [389, 388], [390, 388], [391, 390], [394, 385], [396, 335], [397, 395], [398, 397], [399, 398], [405, 397], [407, 405], [412, 407], [412, 411], [413, 397], [414, 413], [415, 412], [416, 414], [421, 397], [422, 420], [423, 421], [425, 424], [426, 424], [427, 425], [428, 426], [430, 429], [432, 430], [440, 20], [440, 439], [441, 440], [443, 442], [444, 443], [445, 444], [446, 445], [447, 443], [448, 447], [449, 448], [450, 449], [451, 450], [452, 443], [453, 452], [454, 453], [455, 454], [456, 455], [457, 443], [458, 457], [459, 458], [460, 459], [461, 460], [462, 443], [463, 462], [464, 463], [465, 464], [466, 465], [467, 443], [468, 467], [469, 468], [470, 469], [471, 470], [472, 443], [473, 472], [474, 473], [475, 474], [476, 475], [477, 443], [478, 477], [479, 478], [480, 479], [481, 480], [482, 443], [483, 482], [484, 483], [485, 484], [486, 443], [487, 486], [488, 487], [489, 488], [490, 443], [491, 490], [492, 491], [493, 443], [494, 446], [495, 451], [496, 456], [497, 461], [498, 466], [499, 471], [500, 476], [501, 481], [502, 485], [503, 489], [504, 492], [505, 493], [510, 396], [511, 20], [511, 509], [512, 511], [513, 512], [514, 513], [515, 514], [516, 514], [516, 20], [517, 516], [518, 517], [519, 518], [520, 519], [521, 519], [521, 20], [522, 521], [523, 522], [524, 523], [525, 524], [526, 524], [526, 20], [527, 526], [528, 527], [529, 528], [530, 529], [531, 529], [531, 20], [532, 531], [533, 532], [534, 533], [535, 534], [537, 536], [538, 515], [539, 520], [540, 525], [541, 530], [542, 535], [543, 537], [548, 510], [549, 20], [549, 547], [550, 549], [551, 550], [553, 552], [554, 553], [555, 554], [556, 555], [557, 553], [558, 557], [559, 558], [560, 559], [561, 560], [562, 553], [563, 562], [564, 563], [565, 564], [566, 565], [567, 553], [568, 567], [569, 568], [571, 570], [572, 21], [573, 572], [574, 556], [575, 561], [576, 566], [577, 571], [578, 573], [583, 548], [584, 20], [584, 582], [585, 584], [586, 585], [588, 587], [589, 588], [590, 589], [591, 590], [592, 588], [593, 592], [594, 593], [596, 595], [598, 597], [599, 591], [600, 594], [601, 596], [602, 598], [607, 20], [607, 606], [608, 607], [609, 608], [610, 609], [611, 610], [612, 20], [612, 610], [613, 612], [614, 613], [615, 614], [616, 615], [617, 615], [617, 20], [618, 617], [619, 618], [620, 619], [621, 620], [622, 620], [622, 20], [623, 622], [624, 623], [625, 624], [626, 625], [627, 625], [627, 20], [628, 627], [629, 628], [630, 629], [631, 630], [633, 632], [634, 611], [635, 616], [636, 621], [637, 626], [638, 631], [639, 633], [644, 583], [649, 20], [649, 648], [651, 649], [655, 654], [655, 20], [656, 655], [658, 656], [662, 20], [662, 637], [663, 661], [663, 20], [664, 663], [664, 657], [665, 658], [665, 41], [666, 663], [666, 20], [667, 659], [667, 666], [668, 666], [668, 8], [669, 660], [670, 669], [671, 46], [672, 671], [673, 671], [674, 673], [677, 668], [679, 644], [680, 678], [681, 680], [682, 681], [688, 680], [690, 688], [695, 690], [695, 694], [696, 680], [697, 696], [698, 695], [699, 697], [704, 680], [705, 703], [706, 704], [708, 707], [709, 707], [710, 708], [711, 709], [713, 712], [715, 713], [723, 722], [723, 30], [724, 723], [726, 725], [727, 726], [728, 727], [729, 728], [730, 726], [731, 730], [732, 731], [733, 732], [734, 733], [735, 726], [736, 735], [737, 736], [738, 737], [739, 738], [740, 726], [741, 740], [742, 741], [743, 742], [744, 743], [745, 726], [746, 745], [747, 746], [748, 747], [749, 748], [750, 726], [751, 750], [752, 751], [753, 752], [754, 753], [755, 726], [756, 755], [757, 756], [758, 757], [759, 758], [760, 726], [761, 760], [762, 761], [763, 762], [764, 763], [765, 726], [766, 765], [767, 766], [768, 767], [769, 726], [770, 769], [771, 770], [772, 771], [773, 726], [774, 773], [775, 774], [776, 726], [777, 729], [778, 734], [779, 739], [780, 744], [781, 749], [782, 754], [783, 759], [784, 764], [785, 768], [786, 772], [787, 775], [788, 776], [793, 679], [794, 792], [794, 30], [795, 794], [796, 795], [797, 796], [798, 797], [799, 30], [799, 797], [800, 799], [801, 800], [802, 801], [803, 802], [804, 30], [804, 802], [805, 804], [806, 805], [807, 806], [808, 807], [809, 30], [809, 807], [810, 809], [811, 810], [812, 811], [813, 812], [814, 812], [814, 30], [815, 814], [816, 815], [817, 816], [818, 817], [820, 819], [821, 798], [822, 803], [823, 808], [824, 813], [825, 818], [826, 820], [831, 793], [832, 30], [832, 830], [833, 832], [834, 833], [835, 834], [836, 835], [837, 835], [837, 30], [838, 837], [839, 838], [840, 839], [841, 840], [842, 840], [842, 30], [843, 842], [844, 843], [845, 844], [846, 845], [847, 845], [847, 30], [848, 847], [849, 848], [850, 849], [851, 850], [852, 30], [852, 850], [853, 852], [854, 853], [855, 854], [856, 855], [857, 31], [858, 857], [859, 836], [860, 841], [861, 846], [862, 851], [863, 856], [864, 858], [869, 831], [870, 868], [870, 30], [871, 870], [872, 871], [874, 873], [875, 874], [876, 875], [877, 876], [878, 874], [879, 878], [880, 879], [882, 881], [884, 883], [885, 877], [886, 880], [887, 882], [888, 884], [901, 900], [901, 30], [903, 901], [907, 30], [907, 906], [908, 907], [910, 908], [914, 30], [914, 886], [915, 39], [915, 910], [916, 30], [916, 913], [917, 912], [917, 916], [918, 30], [918, 916], [919, 911], [919, 918], [920, 8], [920, 918], [921, 909], [922, 921], [923, 46], [924, 923], [925, 923], [926, 925], [929, 915], [930, 917], [931, 920], [933, 869], [934, 932], [935, 934], [936, 935], [942, 934], [944, 942], [949, 944], [949, 948], [950, 934], [951, 950], [952, 949], [953, 951], [958, 934], [959, 957], [960, 958], [962, 961], [963, 961], [964, 962], [965, 963], [967, 966], [969, 967], [974, 679], [974, 933], [974, 396], [975, 494], [975, 777], [975, 246], [976, 3], [977, 2], [978, 0], [979, 972], [979, 940], [979, 403], [979, 686]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/19c225f8d56e592731c3b1d55297bd2ac5ad747932f120be12c3c31f68aaa558_19c225f8d56e592731c3b1d55297bd2ac5ad747932f120be12c3c31f68aaa558.jsonl.gz", "strip_func_name": "sub_402AF9", "query": "\n\n\n__int64 __fastcall sub_402AF9(__int64 a1, __int64 a2, __int64 a3, int a4, int a5, int a6)\n{\nint v6; // ecx\nint v7; // er8\nint v8; // er9\nint v9; // er8\nint v10; // er9\nint v11; // er9\nint v12; // ecx\nint v13; // er8\nint v14; // er9\nint v15; // ecx\nint v16; // er8\nint v17; // er9\nint v18; // edx\nint v19; // ecx\nint v20; // er8\nint v21; // er9\nint v22; // edx\nint v23; // ecx\nint v24; // er8\nint v25; // er9\nint v26; // eax\nint v27; // edx\nint v28; // ecx\nint v29; // er8\nint v30; // er9\nint v31; // edx\nint v32; // ecx\nint v33; // er8\nint v34; // er9\nint v35; // edx\nint v36; // ecx\nint v37; // er8\nint v38; // er9\nint v39; // eax\nint v40; // edx\nint v41; // ecx\nint v42; // er8\nint v43; // er9\nint v44; // eax\nint v45; // edx\nint v46; // ecx\nint v47; // er8\nint v48; // er9\nint v49; // eax\nint v50; // edx\nint v51; // ecx\nint v52; // er8\nint v53; // er9\nint v54; // edx\nint v55; // ecx\nint v56; // er8\nint v57; // er9\nint v58; // edx\nint v59; // ecx\nint v60; // er8\nint v61; // er9\n__int64 result; // rax\nint v63; // eax\nint v64; // [rsp+2h] [rbp-FEh] BYREF\n__int16 v65; // [rsp+6h] [rbp-FAh]\nint v66; // [rsp+8h] [rbp-F8h] BYREF\n__int16 v67; // [rsp+Ch] [rbp-F4h]\nint v68; // [rsp+Eh] [rbp-F2h]\n__int16 v69; // [rsp+12h] [rbp-EEh]\nint v70; // [rsp+14h] [rbp-ECh] BYREF\n__int64 v71; // [rsp+18h] [rbp-E8h] BYREF\nint v72[2]; // [rsp+20h] [rbp-E0h] BYREF\n__int64 v73; // [rsp+28h] [rbp-D8h] BYREF\n__int64 v74[2]; // [rsp+30h] [rbp-D0h] BYREF\nint v75; // [rsp+40h] [rbp-C0h]\nint v76[2]; // [rsp+50h] [rbp-B0h] BYREF\n__int64 v77; // [rsp+58h] [rbp-A8h] BYREF\n__int64 v78[2]; // [rsp+60h] [rbp-A0h] BYREF\nint v79; // [rsp+70h] [rbp-90h]\n__int16 v80; // [rsp+74h] [rbp-8Ch]\nint v81[2]; // [rsp+80h] [rbp-80h] BYREF\n__int64 v82[4]; // [rsp+88h] [rbp-78h] BYREF\n__int64 v83; // [rsp+A8h] [rbp-58h] BYREF\nint v84[2]; // [rsp+B0h] [rbp-50h] BYREF\n__int64 v85; // [rsp+B8h] [rbp-48h]\n__int64 v86; // [rsp+C0h] [rbp-40h]\nunsigned __int16 v87; // [rsp+C8h] [rbp-38h]\nunsigned __int16 v88; // [rsp+CAh] [rbp-36h]\nint v89; // [rsp+CCh] [rbp-34h]\nint v90; // [rsp+D0h] [rbp-30h]\nunsigned __int16 v91; // [rsp+D6h] [rbp-2Ah]\nint v92; // [rsp+D8h] [rbp-28h]\n__int16 v93; // [rsp+DEh] [rbp-22h]\n\n*(_QWORD *)v84 = 0x851137CE671F7CC9LL;\nv85 = 0x2FD5BDF2198A4A51LL;\n*(_QWORD *)v81 = 0xBAFCB8A5AEA20061LL;\nv82[0] = 0x551ABAF833800007LL;\nv82[1] = 0x2FB67B96AE852FD0LL;\nv82[2] = 0x50A0787EEBA8CDB6LL;\n*(_QWORD *)v76 = 0xBAFCB8A5AEA20061LL;\nv77 = 0x28E1D20233802007LL;\nv78[0] = 0x2FD0551ABAF87CA5LL;\nv78[1] = 0xCDB62FB67B96AE85LL;\nv79 = 2021583784;\nv80 = 20640;\n*(_QWORD *)v72 = 0xBAFCB8A5AEA2006DLL;\nv73 = 0x3380084484F13052LL;\nv74[0] = 0xAE852FD0551ABAF8LL;\nv74[1] = 0xEBA8CDB62FB67B96LL;\nv75 = 1352693886;\nv68 = -1197101406;\nv69 = -17668;\nv66 = 685888002;\nv67 = 31909;\nv64 = -2064568238;\nv65 = 2116;\nv93 = 7;\nv92 = 123;\nv91 = 13184;\nv90 = 0;\nv89 = 3;\nsub_408A77(3, (unsigned int)\"\\nIEEE P802.11ah/D10.0, J.6.4 CCMP PV1 test vectors\\n\", 800488342, a4, a5, a6);\nsub_408A77(3, (unsigned int)\"BSSID: %02x:%02x:%02x:%02x:%02x:%02x\", 162, 174, 165, 184);\nsub_408A77(3, (unsigned int)\"DA: %02x:%02x:%02x:%02x:%02x:%02x\", 2, 210, 225, 40);\nsub_408A77(3, (unsigned int)\"SA: %02x:%02x:%02x:%02x:%02x:%02x\", 82, 48, 241, 132);\nsub_408A77(3, (unsigned int)\"Association ID: %u\", 7, v6, v7, v8);\nsub_408A77(3, (unsigned int)\"Base PN: %u (0x%08x)\", 123, 123, v9, v10);\nsub_408A77(3, (unsigned int)\"SC = 0x%04x (FragNum=%u SeqNum=%u)\", 13184, 0, 824, v11);\nsub_408A77(3, (unsigned int)\"TID = %u\", 3, v12, v13, v14);\nsub_408A77(3, (unsigned int)\"Key ID: %u\", 0, v15, v16, v17);\nsub_408D75(3LL, \"TK\", v84, 16LL);\nsub_408A77(3, (unsigned int)\"PN = SC||BPN\", v18, v19, v20, v21);\nsub_40252B(&v83, v91);\nsub_40255C((__int64 *)((char *)&v83 + 2), v92);\nsub_408D75(3LL, \"PN (PN0..PN5)\", &v83, 8LL);\nsub_408A77(\n3,\n(unsigned int)\"\\nPV1 test vector #1:\\nHeader compression used and A3 was previously stored at the receiver\\n\",\nv22,\nv23,\nv24,\nv25);\nv88 = sub_402502((unsigned __int16 *)v81);\nsub_408A77(\n3,\n(unsigned int)\"FC=0x%04x (PV=%u Type=%u PTID/Subtype=%u From_DS=%u More_Fragments=%u Power_Management=%u More_Data=%u\"\n\" Protected_Frame=%u End_of_SP=%u Relayed_Frame=%u Ack_Policy=%u)\",\nv88,\nv88 & 3,\n(v88 >> 2) & 7,\n(v88 >> 5) & 7);\nsub_408A77(\n3,\n(unsigned int)\"A1=%02x:%02x:%02x:%02x:%02x:%02x\",\nBYTE2(v81[0]),\nHIBYTE(v81[0]),\nLOBYTE(v81[1]),\nBYTE1(v81[1]));\nv87 = sub_402502((unsigned __int16 *)v82);\nv26 = v87;\nBYTE1(v26) = HIBYTE(v87) & 0x1F;\nsub_408A77(\n3,\n(unsigned int)\"A2=%02x %02x (SID: AID=%u A3_Present=%u A4_Present=%u A-MSDU=%u); corresponds to 52:30:f1:84:44:08 in \"\n\"uncompressed header\",\nLOBYTE(v82[0]),\nBYTE1(v82[0]),\nv26,\n(v87 & 0x2000) != 0);\nv91 = sub_402502((unsigned __int16 *)v82 + 1);\nsub_408A77(\n3,\n(unsigned int)\"Sequence Control: %02x %02x (FN=%u SN=%u)\",\nBYTE2(v82[0]),\nBYTE3(v82[0]),\nv91 & 0xF,\nv91 >> 4);\nsub_408A77(\n3,\n(unsigned int)\"A3 not present; corresponds to 02:d2:e1:28:a5:7c in uncompressed header\",\nv27,\nv28,\nv29,\nv30);\nsub_408A77(3, (unsigned int)\"A4 not present\", v31, v32, v33, v34);\nsub_408D75(3LL, \"Plaintext Frame Header\", v81, 12LL);\nsub_408D75(3LL, \"Plaintext Frame Body\", (char *)v82 + 4, 20LL);\nv86 = sub_4058E0(\n(int)v84,\n(int)v81 + 2,\n(int)&v64,\n(int)&v66,\n(int)v81,\n32,\n0xCuLL,\n(__int64)&v83,\nv90,\n(__int64)&v71);\nif ( !v86 )\nreturn sub_408A77(5, (unsigned int)\"Failed to encrypt CCMP frame\", v35, v36, v37, v38);\nsub_408D75(3LL, \"Encrypted Frame Header\", v86, 12LL);\nsub_408D75(3LL, \"Encrypted Frame Frame Body\", v86 + 12, v71 - 12);\nv39 = sub_40896B(v86, v71);\nsub_40255C(&v70, v39);\nsub_408D75(3LL, \"Encrypted Frame FCS\", &v70, 4LL);\nsub_408A77(\n3,\n(unsigned int)\"\\nPV1 test vector #2:\\nHeader compression used and A3 was not previously stored at the receiver\\n\",\nv40,\nv41,\nv42,\nv43);\nv88 = sub_402502((unsigned __int16 *)v76);\nsub_408A77(\n3,\n(unsigned int)\"FC=0x%04x (PV=%u Type=%u PTID/Subtype=%u From_DS=%u More_Fragments=%u Power_Management=%u More_Data=%u\"\n\" Protected_Frame=%u End_of_SP=%u Relayed_Frame=%u Ack_Policy=%u)\",\nv88,\nv88 & 3,\n(v88 >> 2) & 7,\n(v88 >> 5) & 7);\nsub_408A77(\n3,\n(unsigned int)\"A1=%02x:%02x:%02x:%02x:%02x:%02x\",\nBYTE2(v76[0]),\nHIBYTE(v76[0]),\nLOBYTE(v76[1]),\nBYTE1(v76[1]));\nv87 = sub_402502((unsigned __int16 *)&v77);\nv44 = v87;\nBYTE1(v44) = HIBYTE(v87) & 0x1F;\nsub_408A77(\n3,\n(unsigned int)\"A2=%02x %02x (SID: AID=%u A3_Present=%u A4_Present=%u A-MSDU=%u); corresponds to 52:30:f1:84:44:08 in \"\n\"uncompressed header\",\n(unsigned __int8)v77,\nBYTE1(v77),\nv44,\n(v87 & 0x2000) != 0);\nv91 = sub_402502((unsigned __int16 *)&v77 + 1);\nsub_408A77(3, (unsigned int)\"Sequence Control: %02x %02x (FN=%u SN=%u)\", BYTE2(v77), BYTE3(v77), v91 & 0xF, v91 >> 4);\nsub_408A77(3, (unsigned int)\"A3=%02x:%02x:%02x:%02x:%02x:%02x\", BYTE4(v77), BYTE5(v77), BYTE6(v77), HIBYTE(v77));\nsub_408A77(3, (unsigned int)\"A4 not present\", v45, v46, v47, v48);\nsub_408D75(3LL, \"Plaintext Frame Header\", v76, 18LL);\nsub_408D75(3LL, \"Plaintext Frame Body\", (char *)v78 + 2, 20LL);\nv86 = sub_4058E0(\n(int)v84,\n(int)v76 + 2,\n(int)&v64,\n(int)&v77 + 4,\n(int)v76,\n38,\n0x12uLL,\n(__int64)&v83,\nv90,\n(__int64)&v71);\nif ( !v86 )\nreturn sub_408A77(5, (unsigned int)\"Failed to encrypt CCMP frame\", v35, v36, v37, v38);\nsub_408D75(3LL, \"Encrypted Frame Header\", v86, 18LL);\nsub_408D75(3LL, \"Encrypted Frame Frame Body\", v86 + 18, v71 - 18);\nv49 = sub_40896B(v86, v71);\nsub_40255C(&v70, v49);\nsub_408D75(3LL, \"Encrypted Frame FCS\", &v70, 4LL);\nsub_408A77(\n3,\n(unsigned int)\"\\nPV1 test vector #3:\\nType 3 frame from SA to DA(=BSSID) (i.e., no separate DA in this example)\\n\",\nv50,\nv51,\nv52,\nv53);\nv88 = sub_402502((unsigned __int16 *)v72);\nsub_408A77(\n3,\n(unsigned int)\"FC=0x%04x (PV=%u Type=%u PTID/Subtype=%u From_DS=%u More_Fragments=%u Power_Management=%u More_Data=%u\"\n\" Protected_Frame=%u End_of_SP=%u Relayed_Frame=%u Ack_Policy=%u)\",\nv88,\nv88 & 3,\n(v88 >> 2) & 7,\n(v88 >> 5) & 7);\nsub_408A77(\n3,\n(unsigned int)\"A1=%02x:%02x:%02x:%02x:%02x:%02x\",\nBYTE2(v72[0]),\nHIBYTE(v72[0]),\nLOBYTE(v72[1]),\nBYTE1(v72[1]));\nsub_408A77(\n3,\n(unsigned int)\"A2=%02x:%02x:%02x:%02x:%02x:%02x\",\n(unsigned __int8)v73,\nBYTE1(v73),\nBYTE2(v73),\nBYTE3(v73));\nv91 = sub_402502((unsigned __int16 *)&v73 + 3);\nsub_408A77(3, (unsigned int)\"Sequence Control: %02x %02x (FN=%u SN=%u)\", BYTE6(v73), HIBYTE(v73), v91 & 0xF, v91 >> 4);\nsub_408A77(\n3,\n(unsigned int)\"A3 not present; corresponds to 02:d2:e1:28:a5:7c in uncompressed header\",\nv54,\nv55,\nv56,\nv57);\nsub_408A77(3, (unsigned int)\"A4 not present\", v58, v59, v60, v61);\nsub_408D75(3LL, \"Plaintext Frame Header\", v72, 16LL);\nsub_408D75(3LL, \"Plaintext Frame Body\", v74, 20LL);\nv86 = sub_4058E0(\n(int)v84,\n(int)v72 + 2,\n(int)&v73,\n(int)&v66,\n(int)v72,\n36,\n0x10uLL,\n(__int64)&v83,\nv90,\n(__int64)&v71);\nif ( !v86 )\nreturn sub_408A77(5, (unsigned int)\"Failed to encrypt CCMP frame\", v35, v36, v37, v38);\nsub_408D75(3LL, \"Encrypted Frame Header\", v86, 16LL);\nsub_408D75(3LL, \"Encrypted Frame Frame Body\", v86 + 16, v71 - 16);\nv63 = sub_40896B(v86, v71);\nsub_40255C(&v70, v63);\nresult = sub_408D75(3LL, \"Encrypted Frame FCS\", &v70, 4LL);\ndword_416220 = 3;\nreturn result;\n}\n\n\n\nQ:[v64,v66,v68,v70,v71,v72,v76,v81,v83,v84,v86,v87,v88,v89,v90,v91,v92,v93,sub_402AF9,sub_408A77,sub_408D75,sub_40252B,sub_40255C,sub_402502,sub_4058E0,sub_40896B,]\nAssistant: ", "hints": "[]", "response": "{'v64': 'sa', 'v66': 'da', 'v68': 'bssid', 'v70': 'fcs', 'v71': 'enc_len', 'v72': 'frame3', 'v76': 'frame2', 'v81': 'frame1', 'v83': 'pn', 'v84': 'tk', 'v86': 'enc', 'v87': 'sid', 'v88': 'fc', 'v89': 'tid', 'v90': 'key_id', 'v91': 'sc', 'v92': 'bpn', 'v93': 'aid', 'sub_402AF9': 'test_vector_ccmp_pv1', 'sub_408A77': 'wpa_printf', 'sub_408D75': 'wpa_hexdump', 'sub_40252B': 'WPA_PUT_LE16', 'sub_40255C': 'WPA_PUT_LE32', 'sub_402502': 'WPA_GET_LE16', 'sub_4058E0': 'ccmp_encrypt_pv1', 'sub_40896B': 'crc32'}"}
GB_run
276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de
LIJI32
SameBoy
NA
unsigned GB_run(GB_gameboy_t *gb) { GB_ASSERT_NOT_RUNNING(gb) gb->vblank_just_occured = false; if (unlikely(gb->sgb && gb->sgb->intro_animation < 96)) { /* On the SGB, the GB is halted after finishing the boot ROM. Then, after the boot animation is almost done, it's reset. Since the SGB HLE does not perform any header validity checks, we just halt the CPU (with hacky code) until the correct time. This ensures the Nintendo logo doesn't flash on screen, and the game does "run in background" while the animation is playing. */ GB_set_running_thread(gb); GB_display_run(gb, 228, true); GB_clear_running_thread(gb); gb->cycles_since_last_sync += 228; return 228; } GB_debugger_run(gb); gb->cycles_since_run = 0; GB_set_running_thread(gb); GB_cpu_run(gb); GB_clear_running_thread(gb); if (unlikely(gb->vblank_just_occured)) { GB_debugger_handle_async_commands(gb); GB_set_running_thread(gb); GB_rewind_push(gb); GB_clear_running_thread(gb); } if (!(gb->io_registers[GB_IO_IF] & 0x10) && (gb->io_registers[GB_IO_JOYP] & 0x30) != 0x30) { gb->joyp_accessed = true; } return gb->cycles_since_run; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_422C6F", "function_addr": 4336751, "binary_name": "276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "mov rax, [rax+1D630h]"], [6, "test rax, rax"], [7, "jz short loc_422CCF"], [8, "mov rax, [rbp+var_8]"], [9, "mov edx, offset aGbRun"], [10, "mov esi, offset aFunctionSMustN_1"], [11, "mov rdi, rax"], [12, "mov eax, 0"], [13, "call sub_41F0C2"], [14, "mov rax, [rbp+var_8]"], [15, "mov rax, [rax+1D630h]"], [16, "test rax, rax"], [17, "jz short loc_422CCF"], [18, "mov ecx, offset aGbRun_0"], [19, "mov edx, 48Eh"], [20, "mov esi, offset aCoreGbC"], [21, "mov edi, offset aGbRunningThrea_1"], [22, "call ___assert_fail"], [23, "mov rax, [rbp+var_8]"], [24, "mov byte ptr [rax+1D60Bh], 0"], [25, "mov rax, [rbp+var_8]"], [26, "mov rax, [rax+1C4A0h]"], [27, "test rax, rax"], [28, "setnz al"], [29, "movzx eax, al"], [30, "test rax, rax"], [31, "jz short loc_422D69"], [32, "mov rax, [rbp+var_8]"], [33, "mov rax, [rax+1C4A0h]"], [34, "movzx eax, word ptr [rax+126E6h]"], [35, "cmp ax, 5Fh "], [36, "setle al"], [37, "movzx eax, al"], [38, "test rax, rax"], [39, "jz short loc_422D69"], [40, "mov rax, [rbp+var_8]"], [41, "mov rdi, rax"], [42, "call sub_425213"], [43, "mov rax, [rbp+var_8]"], [44, "mov edx, 1"], [45, "mov esi, 0E4h"], [46, "mov rdi, rax"], [47, "call sub_41B8B1"], [48, "mov rax, [rbp+var_8]"], [49, "mov rdi, rax"], [50, "call sub_425286"], [51, "mov rax, [rbp+var_8]"], [52, "mov rax, [rax+0AE70h]"], [53, "lea rdx, [rax+0E4h]"], [54, "mov rax, [rbp+var_8]"], [55, "mov [rax+0AE70h], rdx"], [56, "mov eax, 0E4h"], [57, "jmp locret_422E2A"], [58, "mov rax, [rbp+var_8]"], [59, "mov rdi, rax"], [60, "call sub_415B26"], [61, "mov rax, [rbp+var_8]"], [62, "mov dword ptr [rax+1D60Ch], 0"], [63, "mov rax, [rbp+var_8]"], [64, "mov rdi, rax"], [65, "call sub_425213"], [66, "mov rax, [rbp+var_8]"], [67, "mov rdi, rax"], [68, "call sub_43BB60"], [69, "mov rax, [rbp+var_8]"], [70, "mov rdi, rax"], [71, "call sub_425286"], [72, "mov rax, [rbp+var_8]"], [73, "movzx eax, byte ptr [rax+1D60Bh]"], [74, "movzx eax, al"], [75, "test rax, rax"], [76, "jz short loc_422DEA"], [77, "mov rax, [rbp+var_8]"], [78, "mov rdi, rax"], [79, "call sub_415B59"], [80, "mov rax, [rbp+var_8]"], [81, "mov rdi, rax"], [82, "call sub_425213"], [83, "mov rax, [rbp+var_8]"], [84, "mov rdi, rax"], [85, "call sub_42D99D"], [86, "mov rax, [rbp+var_8]"], [87, "mov rdi, rax"], [88, "call sub_425286"], [89, "mov rax, [rbp+var_8]"], [90, "movzx eax, byte ptr [rax+1A6h]"], [91, "movzx eax, al"], [92, "and eax, 10h"], [93, "test eax, eax"], [94, "jnz short loc_422E20"], [95, "mov rax, [rbp+var_8]"], [96, "movzx eax, byte ptr [rax+197h]"], [97, "movzx eax, al"], [98, "and eax, 30h"], [99, "cmp eax, 30h "], [100, "jz short loc_422E20"], [101, "mov rax, [rbp+var_8]"], [102, "mov byte ptr [rax+0AE60h], 1"], [103, "mov rax, [rbp+var_8]"], [104, "mov eax, [rax+1D60Ch]"], [105, "leave"], [106, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 3], [11, 8], [14, 3], [15, 14], [16, 15], [17, 16], [23, 3], [24, 23], [25, 3], [26, 25], [26, 24], [27, 26], [28, 27], [29, 28], [30, 29], [31, 30], [32, 3], [33, 24], [33, 32], [34, 24], [34, 33], [35, 34], [36, 34], [37, 36], [38, 37], [39, 38], [40, 3], [41, 40], [43, 3], [46, 43], [48, 3], [49, 48], [51, 3], [52, 24], [52, 51], [52, 55], [53, 55], [53, 52], [53, 24], [53, 44], [54, 3], [55, 54], [55, 53], [58, 3], [59, 58], [61, 3], [62, 61], [63, 3], [64, 63], [66, 3], [67, 66], [69, 3], [70, 69], [72, 3], [73, 62], [73, 72], [73, 24], [74, 73], [75, 74], [76, 75], [77, 3], [78, 77], [80, 3], [81, 80], [83, 3], [84, 83], [86, 3], [87, 86], [89, 3], [90, 24], [90, 62], [90, 89], [91, 90], [92, 91], [93, 92], [94, 93], [95, 3], [96, 95], [96, 24], [96, 62], [97, 96], [98, 97], [99, 98], [100, 99], [101, 3], [102, 101], [103, 3], [104, 62], [104, 102], [104, 24], [104, 103], [106, 56], [106, 104]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de_276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de.jsonl.gz", "strip_func_name": "sub_422C6F", "query": "\n\n\n__int64 __fastcall sub_422C6F(__int64 a1, const char *a2, int a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 result; // rax\n\nif ( *(_QWORD *)(a1 + 120368) )\n{\na2 = \"Function %s must not be called in a running context.\\n\";\nsub_41F0C2(a1, \"Function %s must not be called in a running context.\\n\", (__int64)\"GB_run\", a4, a5, a6);\nif ( *(_QWORD *)(a1 + 120368) )\n__assert_fail(\"!gb->running_thread_id\", \"Core/gb.c\", 0x48Eu, \"GB_run\");\n}\n*(_BYTE *)(a1 + 120331) = 0;\nif ( *(_QWORD *)(a1 + 115872) && *(__int16 *)(*(_QWORD *)(a1 + 115872) + 75494LL) <= 95 )\n{\nsub_425213(a1);\nsub_41B8B1((_BYTE *)a1, 0xE4u, 1u);\nsub_425286(a1);\n*(_QWORD *)(a1 + 44656) += 228LL;\nresult = 228LL;\n}\nelse\n{\nsub_415B26(a1, (__int64)a2, a3, a4, a5, a6);\n*(_DWORD *)(a1 + 120332) = 0;\nsub_425213(a1);\nsub_43BB60(a1);\nsub_425286(a1);\nif ( *(_BYTE *)(a1 + 120331) )\n{\nsub_415B59(a1);\nsub_425213(a1);\nsub_42D99D(a1);\nsub_425286(a1);\n}\nif ( (*(_BYTE *)(a1 + 422) & 0x10) == 0 && (*(_BYTE *)(a1 + 407) & 0x30) != 48 )\n*(_BYTE *)(a1 + 44640) = 1;\nresult = *(unsigned int *)(a1 + 120332);\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_422C6F,sub_41F0C2,sub_425213,sub_41B8B1,sub_425286,sub_415B26,sub_43BB60,sub_415B59,sub_42D99D,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'gb', 'sub_422C6F': 'GB_run', 'sub_41F0C2': 'GB_log', 'sub_425213': 'GB_set_running_thread', 'sub_41B8B1': 'GB_display_run', 'sub_425286': 'GB_clear_running_thread', 'sub_415B26': 'GB_debugger_run', 'sub_43BB60': 'GB_cpu_run', 'sub_415B59': 'GB_debugger_handle_async_commands', 'sub_42D99D': 'GB_rewind_push'}"}
mpi_montred
3b6e3a9a45c816fa56193d458ea2c72bbd075716187e40abe88491b0c385f368
DLTcollab
tangle-accelerator
NA
static int mpi_montred( mbedtls_mpi *A, const mbedtls_mpi *N, mbedtls_mpi_uint mm, const mbedtls_mpi *T ) { mbedtls_mpi_uint z = 1; mbedtls_mpi U; U.n = U.s = (int) z; U.p = &z; return( mpi_montmul( A, &U, N, mm, T ) ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40C4F9", "function_addr": 4244729, "binary_name": "3b6e3a9a45c816fa56193d458ea2c72bbd075716187e40abe88491b0c385f368.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_40], rcx"], [7, "mov [rbp+var_8], 1"], [8, "mov rax, [rbp+var_8]"], [9, "mov [rbp+var_20], eax"], [10, "mov eax, [rbp+var_20]"], [11, "cdqe"], [12, "mov [rbp+var_18], rax"], [13, "lea rax, [rbp+var_8]"], [14, "mov [rbp+var_10], rax"], [15, "mov rdi, [rbp+var_40]"], [16, "mov rcx, [rbp+var_38]"], [17, "mov rdx, [rbp+var_30]"], [18, "lea rsi, [rbp+var_20]"], [19, "mov rax, [rbp+var_28]"], [20, "mov r8, rdi"], [21, "mov rdi, rax"], [22, "call sub_40C30D"], [23, "leave"], [24, "retn"]], "data_dep": [[8, 7], [9, 8], [10, 9], [12, 10], [13, 7], [13, 10], [14, 13], [15, 6], [16, 5], [17, 4], [18, 9], [19, 3], [20, 15], [21, 19], [24, 22]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3b6e3a9a45c816fa56193d458ea2c72bbd075716187e40abe88491b0c385f368_3b6e3a9a45c816fa56193d458ea2c72bbd075716187e40abe88491b0c385f368.jsonl.gz", "strip_func_name": "sub_40C4F9", "query": "\n\n\n__int64 __fastcall sub_40C4F9(__int64 a1, __int64 a2, __int64 a3, __int64 a4)\n{\nint v5; // [rsp+20h] [rbp-20h] BYREF\n__int64 v6; // [rsp+28h] [rbp-18h]\n__int64 *v7; // [rsp+30h] [rbp-10h]\n__int64 v8; // [rsp+38h] [rbp-8h] BYREF\n\nv8 = 1LL;\nv5 = 1;\nv6 = 1LL;\nv7 = &v8;\nreturn sub_40C30D(a1, (__int64)&v5, a2, a3, a4);\n}\n\n\n\nQ:[a3,a4,a1,a2,v5,v8,sub_40C4F9,sub_40C30D,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'mm', 'a4': 'T', 'a1': 'A', 'a2': 'N', 'v5': 'U', 'v8': 'z', 'sub_40C4F9': 'mpi_montred', 'sub_40C30D': 'mpi_montmul'}"}
query_offsets_by_time
a068192c5ba45754496e7c81fb0909b44bb45d4184f690fb3ecab6434f2e309b
edenhill
kcat
NA
int query_offsets_by_time (rd_kafka_topic_partition_list_t *offsets) { rd_kafka_resp_err_t err; #if RD_KAFKA_VERSION >= 0x00090300 char errstr[512]; if (!(conf.rk = rd_kafka_new(RD_KAFKA_PRODUCER, conf.rk_conf, errstr, sizeof(errstr)))) KC_FATAL("Failed to create producer: %s", errstr); err = rd_kafka_offsets_for_times(conf.rk, offsets, conf.metadata_timeout * 1000); #else err = RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED; #endif if (err) KC_FATAL("offsets_for_times failed: %s", rd_kafka_err2str(err)); partition_list_print(offsets, NULL); rd_kafka_destroy(conf.rk); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4098EF", "function_addr": 4233455, "binary_name": "a068192c5ba45754496e7c81fb0909b44bb45d4184f690fb3ecab6434f2e309b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 220h"], [3, "mov [rbp+var_218], rdi"], [4, "mov rax, cs:qword_4130D8"], [5, "lea rdx, [rbp+var_210]"], [6, "mov ecx, 200h"], [7, "mov rsi, rax"], [8, "mov edi, 0"], [9, "call _rd_kafka_new"], [10, "mov cs:qword_4130E8, rax"], [11, "mov rax, cs:qword_4130E8"], [12, "test rax, rax"], [13, "jnz short loc_409957"], [14, "lea rax, [rbp+var_210]"], [15, "mov rcx, rax"], [16, "mov edx, offset aFailedToCreate_2"], [17, "mov esi, 3Eh "], [18, "mov edi, offset aQueryOffsetsBy"], [19, "mov eax, 0"], [20, "call sub_4038E5"], [21, "mov eax, cs:dword_4130C0"], [22, "imul edx, eax, 3E8h"], [23, "mov rax, cs:qword_4130E8"], [24, "mov rcx, [rbp+var_218]"], [25, "mov rsi, rcx"], [26, "mov rdi, rax"], [27, "call _rd_kafka_offsets_for_times"], [28, "mov [rbp+var_4], eax"], [29, "cmp [rbp+var_4], 0"], [30, "jz short loc_4099AB"], [31, "mov eax, [rbp+var_4]"], [32, "mov edi, eax"], [33, "call _rd_kafka_err2str"], [34, "mov rcx, rax"], [35, "mov edx, offset aOffsetsForTime_0"], [36, "mov esi, 46h "], [37, "mov edi, offset aQueryOffsetsBy"], [38, "mov eax, 0"], [39, "call sub_4038E5"], [40, "mov rax, [rbp+var_218]"], [41, "mov esi, 0"], [42, "mov rdi, rax"], [43, "call sub_4097FE"], [44, "mov rax, cs:qword_4130E8"], [45, "mov rdi, rax"], [46, "call _rd_kafka_destroy"], [47, "mov eax, 0"], [48, "leave"], [49, "retn"]], "data_dep": [[7, 4], [10, 9], [11, 10], [12, 11], [13, 12], [14, 12], [15, 14], [22, 5], [22, 21], [23, 10], [24, 3], [25, 24], [26, 23], [28, 27], [29, 28], [30, 29], [31, 28], [32, 31], [34, 33], [40, 3], [42, 40], [44, 10], [45, 44], [49, 47]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/a068192c5ba45754496e7c81fb0909b44bb45d4184f690fb3ecab6434f2e309b_a068192c5ba45754496e7c81fb0909b44bb45d4184f690fb3ecab6434f2e309b.jsonl.gz", "strip_func_name": "sub_4098EF", "query": "\n\n\n__int64 __fastcall sub_4098EF(unsigned int *a1)\n{\n__int64 v1; // r8\n__int64 v2; // r9\n__int64 v3; // rax\n__int64 v4; // r8\n__int64 v5; // r9\nchar v7[524]; // [rsp+10h] [rbp-210h] BYREF\n\nqword_4130E8 = rd_kafka_new();\nif ( !qword_4130E8 )\nsub_4038E5(\"query_offsets_by_time\", 0x3Eu, \"Failed to create producer: %s\", (__int64)v7, v1, v2);\nif ( (unsigned int)rd_kafka_offsets_for_times() )\n{\nv3 = rd_kafka_err2str();\nsub_4038E5(\"query_offsets_by_time\", 0x46u, \"offsets_for_times failed: %s\", v3, v4, v5);\n}\nsub_4097FE(a1, 0LL);\nrd_kafka_destroy();\nreturn 0LL;\n}\n\n\n\nQ:[a1,v7,sub_4098EF,sub_4038E5,sub_4097FE,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'offsets', 'v7': 'errstr', 'sub_4098EF': 'query_offsets_by_time', 'sub_4038E5': 'fatal0', 'sub_4097FE': 'partition_list_print'}"}
print_string_ptr
dade8a50f9553a2c8d312f40f9e938d800aaeceed2d235843ec2760ee3f4ab45
Ricardicus
ric-script
NA
static cJSON_bool print_string_ptr(const unsigned char * const input, printbuffer * const output_buffer) { const unsigned char *input_pointer = NULL; unsigned char *output = NULL; unsigned char *output_pointer = NULL; size_t output_length = 0; /* numbers of additional characters needed for escaping */ size_t escape_characters = 0; if (output_buffer == NULL) { return false; } /* empty string */ if (input == NULL) { output = ensure(output_buffer, sizeof("\"\"")); if (output == NULL) { return false; } strcpy((char*)output, "\"\""); return true; } /* set "flag" to 1 if something needs to be escaped */ for (input_pointer = input; *input_pointer; input_pointer++) { switch (*input_pointer) { case '\"': case '\\': case '\b': case '\f': case '\n': case '\r': case '\t': /* one character escape sequence */ escape_characters++; break; default: if (*input_pointer < 32) { /* UTF-16 escape sequence uXXXX */ escape_characters += 5; } break; } } output_length = (size_t)(input_pointer - input) + escape_characters; output = ensure(output_buffer, output_length + sizeof("\"\"")); if (output == NULL) { return false; } /* no characters have to be escaped */ if (escape_characters == 0) { output[0] = '\"'; memcpy(output + 1, input, output_length); output[output_length + 1] = '\"'; output[output_length + 2] = '\0'; return true; } output[0] = '\"'; output_pointer = output + 1; /* copy the string */ for (input_pointer = input; *input_pointer != '\0'; (void)input_pointer++, output_pointer++) { if ((*input_pointer > 31) && (*input_pointer != '\"') && (*input_pointer != '\\')) { /* normal character, copy */ *output_pointer = *input_pointer; } else { /* character needs to be escaped */ *output_pointer++ = '\\'; switch (*input_pointer) { case '\\': *output_pointer = '\\'; break; case '\"': *output_pointer = '\"'; break; case '\b': *output_pointer = 'b'; break; case '\f': *output_pointer = 'f'; break; case '\n': *output_pointer = 'n'; break; case '\r': *output_pointer = 'r'; break; case '\t': *output_pointer = 't'; break; default: /* escape and print as unicode codepoint */ sprintf((char*)output_pointer, "u%04x", *input_pointer); output_pointer += 4; break; } } } output[output_length + 1] = '\"'; output[output_length + 2] = '\0'; return true; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A2CD", "function_addr": 4235981, "binary_name": "dade8a50f9553a2c8d312f40f9e938d800aaeceed2d235843ec2760ee3f4ab45.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+src], rdi"], [4, "mov [rbp+var_40], rsi"], [5, "mov [rbp+var_8], 0"], [6, "mov [rbp+var_20], 0"], [7, "mov [rbp+s], 0"], [8, "mov [rbp+n], 0"], [9, "mov [rbp+var_18], 0"], [10, "cmp [rbp+var_40], 0"], [11, "jnz short loc_40A316"], [12, "mov eax, 0"], [13, "jmp locret_40A58D"], [14, "cmp [rbp+src], 0"], [15, "jnz short loc_40A35A"], [16, "mov rax, [rbp+var_40]"], [17, "mov esi, 3"], [18, "mov rdi, rax"], [19, "call sub_40973D"], [20, "mov [rbp+var_20], rax"], [21, "cmp [rbp+var_20], 0"], [22, "jnz short loc_40A343"], [23, "mov eax, 0"], [24, "jmp locret_40A58D"], [25, "mov rax, [rbp+var_20]"], [26, "mov word ptr [rax], 2222h"], [27, "mov byte ptr [rax+2], 0"], [28, "mov eax, 1"], [29, "jmp locret_40A58D"], [30, "mov rax, [rbp+src]"], [31, "mov [rbp+var_8], rax"], [32, "jmp short loc_40A3B3"], [33, "mov rax, [rbp+var_8]"], [34, "movzx eax, byte ptr [rax]"], [35, "movzx eax, al"], [36, "cmp eax, 5Ch "], [37, "jz short loc_40A396"], [38, "cmp eax, 5Ch "], [39, "jg short loc_40A39D"], [40, "cmp eax, 22h "], [41, "jz short loc_40A396"], [42, "cmp eax, 22h "], [43, "jg short loc_40A39D"], [44, "cmp eax, 0Ah"], [45, "jg short loc_40A38E"], [46, "cmp eax, 8"], [47, "jge short loc_40A396"], [48, "jmp short loc_40A39D"], [49, "sub eax, 0Ch"], [50, "cmp eax, 1"], [51, "ja short loc_40A39D"], [52, "add [rbp+var_18], 1"], [53, "jmp short loc_40A3AE"], [54, "mov rax, [rbp+var_8]"], [55, "movzx eax, byte ptr [rax]"], [56, "cmp al, 1Fh"], [57, "ja short loc_40A3AD"], [58, "add [rbp+var_18], 5"], [59, "nop"], [60, "add [rbp+var_8], 1"], [61, "mov rax, [rbp+var_8]"], [62, "movzx eax, byte ptr [rax]"], [63, "test al, al"], [64, "jnz short loc_40A364"], [65, "mov rax, [rbp+var_8]"], [66, "sub rax, [rbp+src]"], [67, "mov rdx, rax"], [68, "mov rax, [rbp+var_18]"], [69, "add rax, rdx"], [70, "mov [rbp+n], rax"], [71, "mov rax, [rbp+n]"], [72, "lea rdx, [rax+3]"], [73, "mov rax, [rbp+var_40]"], [74, "mov rsi, rdx"], [75, "mov rdi, rax"], [76, "call sub_40973D"], [77, "mov [rbp+var_20], rax"], [78, "cmp [rbp+var_20], 0"], [79, "jnz short loc_40A400"], [80, "mov eax, 0"], [81, "jmp locret_40A58D"], [82, "cmp [rbp+var_18], 0"], [83, "jnz short loc_40A457"], [84, "mov rax, [rbp+var_20]"], [85, "mov byte ptr [rax], 22h "], [86, "mov rax, [rbp+var_20]"], [87, "lea rcx, [rax+1]"], [88, "mov rdx, [rbp+n]"], [89, "mov rax, [rbp+src]"], [90, "mov rsi, rax"], [91, "mov rdi, rcx"], [92, "call _memcpy"], [93, "mov rax, [rbp+n]"], [94, "lea rdx, [rax+1]"], [95, "mov rax, [rbp+var_20]"], [96, "add rax, rdx"], [97, "mov byte ptr [rax], 22h "], [98, "mov rax, [rbp+n]"], [99, "lea rdx, [rax+2]"], [100, "mov rax, [rbp+var_20]"], [101, "add rax, rdx"], [102, "mov byte ptr [rax], 0"], [103, "mov eax, 1"], [104, "jmp locret_40A58D"], [105, "mov rax, [rbp+var_20]"], [106, "mov byte ptr [rax], 22h "], [107, "mov rax, [rbp+var_20]"], [108, "add rax, 1"], [109, "mov [rbp+s], rax"], [110, "mov rax, [rbp+src]"], [111, "mov [rbp+var_8], rax"], [112, "jmp loc_40A555"], [113, "mov rax, [rbp+var_8]"], [114, "movzx eax, byte ptr [rax]"], [115, "cmp al, 1Fh"], [116, "jbe short loc_40A4AA"], [117, "mov rax, [rbp+var_8]"], [118, "movzx eax, byte ptr [rax]"], [119, "cmp al, 22h "], [120, "jz short loc_40A4AA"], [121, "mov rax, [rbp+var_8]"], [122, "movzx eax, byte ptr [rax]"], [123, "cmp al, 5Ch "], [124, "jz short loc_40A4AA"], [125, "mov rax, [rbp+var_8]"], [126, "movzx edx, byte ptr [rax]"], [127, "mov rax, [rbp+s]"], [128, "mov [rax], dl"], [129, "jmp loc_40A54B"], [130, "mov rax, [rbp+s]"], [131, "lea rdx, [rax+1]"], [132, "mov [rbp+s], rdx"], [133, "mov byte ptr [rax], 5Ch "], [134, "mov rax, [rbp+var_8]"], [135, "movzx eax, byte ptr [rax]"], [136, "movzx eax, al"], [137, "cmp eax, 22h "], [138, "jg short loc_40A4E1"], [139, "cmp eax, 8"], [140, "jl short def_40A4DF"], [141, "sub eax, 8"], [142, "cmp eax, 1Ah"], [143, "ja short def_40A4DF"], [144, "mov eax, eax"], [145, "mov rax, ds:jpt_40A4DF[rax*8]"], [146, "jmp rax"], [147, "cmp eax, 5Ch "], [148, "jnz short def_40A4DF"], [149, "mov rax, [rbp+s]"], [150, "mov byte ptr [rax], 5Ch "], [151, "jmp short loc_40A54B"], [152, "mov rax, [rbp+s]"], [153, "mov byte ptr [rax], 22h "], [154, "jmp short loc_40A54B"], [155, "mov rax, [rbp+s]"], [156, "mov byte ptr [rax], 62h "], [157, "jmp short loc_40A54B"], [158, "mov rax, [rbp+s]"], [159, "mov byte ptr [rax], 66h "], [160, "jmp short loc_40A54B"], [161, "mov rax, [rbp+s]"], [162, "mov byte ptr [rax], 6Eh "], [163, "jmp short loc_40A54B"], [164, "mov rax, [rbp+s]"], [165, "mov byte ptr [rax], 72h "], [166, "jmp short loc_40A54B"], [167, "mov rax, [rbp+s]"], [168, "mov byte ptr [rax], 74h "], [169, "jmp short loc_40A54B"], [170, "mov rax, [rbp+var_8]"], [171, "movzx eax, byte ptr [rax]"], [172, "movzx edx, al"], [173, "mov rax, [rbp+s]"], [174, "mov esi, offset aU04x"], [175, "mov rdi, rax"], [176, "mov eax, 0"], [177, "call _sprintf"], [178, "add [rbp+s], 4"], [179, "nop"], [180, "add [rbp+var_8], 1"], [181, "add [rbp+s], 1"], [182, "mov rax, [rbp+var_8]"], [183, "movzx eax, byte ptr [rax]"], [184, "test al, al"], [185, "jnz loc_40A477"], [186, "mov rax, [rbp+n]"], [187, "lea rdx, [rax+1]"], [188, "mov rax, [rbp+var_20]"], [189, "add rax, rdx"], [190, "mov byte ptr [rax], 22h "], [191, "mov rax, [rbp+n]"], [192, "lea rdx, [rax+2]"], [193, "mov rax, [rbp+var_20]"], [194, "add rax, rdx"], [195, "mov byte ptr [rax], 0"], [196, "mov eax, 1"], [197, "leave"], [198, "retn"]], "data_dep": [[10, 4], [11, 10], [14, 3], [15, 14], [16, 4], [18, 16], [20, 19], [21, 20], [22, 21], [25, 20], [26, 25], [27, 25], [30, 3], [31, 30], [33, 31], [33, 60], [34, 33], [35, 34], [36, 35], [37, 36], [38, 35], [39, 38], [40, 35], [41, 40], [42, 35], [43, 42], [44, 35], [45, 44], [46, 35], [47, 46], [49, 35], [50, 49], [51, 50], [52, 58], [52, 9], [52, 52], [54, 31], [54, 60], [55, 54], [56, 55], [57, 56], [58, 58], [58, 9], [58, 52], [60, 31], [60, 60], [61, 31], [61, 60], [62, 61], [63, 62], [64, 63], [65, 31], [65, 60], [66, 65], [66, 3], [67, 66], [68, 52], [68, 58], [68, 9], [69, 67], [69, 68], [70, 69], [71, 70], [72, 67], [72, 71], [73, 4], [74, 72], [75, 73], [77, 76], [78, 77], [79, 78], [82, 58], [82, 9], [82, 52], [83, 82], [84, 77], [85, 84], [86, 77], [87, 86], [87, 85], [88, 70], [89, 3], [90, 89], [91, 87], [93, 70], [94, 85], [94, 93], [94, 88], [95, 77], [96, 95], [96, 94], [97, 96], [98, 70], [99, 97], [99, 94], [99, 98], [100, 77], [101, 99], [101, 100], [102, 101], [105, 77], [106, 105], [107, 77], [108, 107], [109, 108], [110, 3], [111, 110], [113, 180], [113, 111], [114, 168], [114, 113], [114, 106], [114, 133], [114, 156], [114, 165], [114, 153], [114, 162], [114, 128], [114, 150], [114, 159], [115, 114], [116, 115], [117, 180], [117, 111], [118, 159], [118, 168], [118, 106], [118, 133], [118, 117], [118, 156], [118, 165], [118, 153], [118, 162], [118, 128], [118, 150], [119, 118], [120, 119], [121, 180], [121, 111], [122, 168], [122, 106], [122, 133], [122, 156], [122, 165], [122, 128], [122, 121], [122, 153], [122, 162], [122, 150], [122, 159], [123, 122], [124, 123], [125, 180], [125, 111], [126, 156], [126, 165], [126, 128], [126, 153], [126, 162], [126, 150], [126, 159], [126, 125], [126, 168], [126, 106], [126, 133], [127, 109], [127, 181], [128, 126], [128, 127], [130, 181], [130, 109], [131, 159], [131, 72], [131, 168], [131, 131], [131, 106], [131, 133], [131, 172], [131, 126], [131, 156], [131, 165], [131, 128], [131, 153], [131, 162], [131, 130], [131, 150], [132, 131], [133, 130], [134, 180], [134, 111], [135, 133], [135, 134], [136, 135], [137, 136], [138, 137], [139, 136], [140, 139], [141, 136], [142, 141], [143, 142], [144, 141], [146, 145], [147, 136], [148, 147], [149, 132], [150, 149], [152, 132], [153, 152], [155, 132], [156, 155], [158, 132], [159, 158], [161, 132], [162, 161], [164, 132], [165, 164], [167, 132], [168, 167], [170, 180], [170, 111], [171, 168], [171, 106], [171, 170], [171, 133], [171, 156], [171, 165], [171, 128], [171, 153], [171, 162], [171, 150], [171, 159], [172, 171], [173, 132], [175, 173], [178, 132], [180, 180], [180, 111], [181, 181], [181, 178], [181, 109], [181, 132], [182, 111], [182, 180], [183, 156], [183, 165], [183, 128], [183, 153], [183, 162], [183, 150], [183, 159], [183, 182], [183, 168], [183, 106], [183, 133], [184, 183], [185, 184], [186, 70], [187, 153], [187, 162], [187, 150], [187, 159], [187, 72], [187, 168], [187, 186], [187, 131], [187, 195], [187, 106], [187, 133], [187, 172], [187, 126], [187, 190], [187, 156], [187, 165], [187, 128], [188, 77], [189, 188], [189, 187], [190, 189], [191, 70], [192, 191], [192, 190], [192, 187], [193, 77], [194, 192], [194, 193], [195, 194], [198, 103], [198, 23], [198, 80], [198, 196], [198, 12], [198, 28]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/dade8a50f9553a2c8d312f40f9e938d800aaeceed2d235843ec2760ee3f4ab45_dade8a50f9553a2c8d312f40f9e938d800aaeceed2d235843ec2760ee3f4ab45.jsonl.gz", "strip_func_name": "sub_40A2CD", "query": "\n\n\n__int64 __fastcall sub_40A2CD(_BYTE *a1, _QWORD *a2)\n{\nint v3; // eax\nchar *v4; // rax\nsize_t n; // [rsp+18h] [rbp-28h]\nchar *v6; // [rsp+20h] [rbp-20h]\nchar *v7; // [rsp+20h] [rbp-20h]\n__int64 v8; // [rsp+28h] [rbp-18h]\nchar *s; // [rsp+30h] [rbp-10h]\n_BYTE *i; // [rsp+38h] [rbp-8h]\nunsigned __int8 *v11; // [rsp+38h] [rbp-8h]\n\nv8 = 0LL;\nif ( !a2 )\nreturn 0LL;\nif ( a1 )\n{\nfor ( i = a1; ; ++i )\n{\nif ( !*i )\n{\nn = i - a1 + v8;\nv7 = sub_40973D(a2, n + 3);\nif ( !v7 )\nreturn 0LL;\nif ( !v8 )\n{\n*v7 = 34;\nmemcpy(v7 + 1, a1, n);\nv7[n + 1] = 34;\nv7[n + 2] = 0;\nreturn 1LL;\n}\n*v7 = 34;\ns = v7 + 1;\nv11 = a1;\nwhile ( 2 )\n{\nif ( !*v11 )\n{\nv7[n + 1] = 34;\nv7[n + 2] = 0;\nreturn 1LL;\n}\nif ( *v11 > 0x1Fu && *v11 != 34 && *v11 != 92 )\n{\n*s = *v11;\nLABEL_42:\n++v11;\n++s;\ncontinue;\n}\nbreak;\n}\nv4 = s++;\n*v4 = 92;\nif ( *v11 > 0x22u )\n{\nif ( *v11 == 92 )\n{\n*s = 92;\ngoto LABEL_42;\n}\n}\nelse if ( *v11 >= 8u )\n{\nswitch ( *v11 )\n{\ncase 8u:\n*s = 98;\nbreak;\ncase 9u:\n*s = 116;\nbreak;\ncase 0xAu:\n*s = 110;\nbreak;\ncase 0xCu:\n*s = 102;\nbreak;\ncase 0xDu:\n*s = 114;\nbreak;\ncase 0x22u:\n*s = 34;\nbreak;\ndefault:\ngoto LABEL_41;\n}\ngoto LABEL_42;\n}\nLABEL_41:\nsprintf(s, \"u%04x\", *v11);\ns += 4;\ngoto LABEL_42;\n}\nv3 = (unsigned __int8)*i;\nif ( v3 == 92 )\nbreak;\nif ( (unsigned __int8)*i <= 0x5Cu )\n{\nif ( v3 == 34 )\nbreak;\nif ( (unsigned __int8)*i <= 0x22u )\n{\nif ( (unsigned __int8)*i > 0xAu )\n{\nif ( (unsigned int)(v3 - 12) <= 1 )\nbreak;\n}\nelse if ( (unsigned __int8)*i >= 8u )\n{\nbreak;\n}\n}\n}\nif ( *i <= 0x1Fu )\nv8 += 5LL;\nLABEL_19:\n;\n}\n++v8;\ngoto LABEL_19;\n}\nv6 = sub_40973D(a2, 3uLL);\nif ( !v6 )\nreturn 0LL;\nstrcpy(v6, \"\\\"\\\"\");\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,n,v6,v8,s,i,sub_40A2CD,sub_40973D,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'input', 'a2': 'output_buffer', 'n': 'output_length', 'v6': 'output', 'v8': 'escape_characters', 's': 'output_pointer', 'i': 'input_pointera', 'sub_40A2CD': 'print_string_ptr', 'sub_40973D': 'ensure'}"}
LZ4F_headerChecksum
1c441b4e92b269bdc37c280fb103bab7e83dbb901d4ecb13effebc8823d67cca
lavabit
pahoehoe
NA
static BYTE LZ4F_headerChecksum (const void* header, size_t length) { U32 const xxh = XXH32(header, length, 0); return (BYTE)(xxh >> 8); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4015D2", "function_addr": 4199890, "binary_name": "1c441b4e92b269bdc37c280fb103bab7e83dbb901d4ecb13effebc8823d67cca.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 rcx, [rbp+var_20]"], [6, "mov rax, [rbp+var_18]"], [7, "mov edx, 0"], [8, "mov rsi, rcx"], [9, "mov rdi, rax"], [10, "call sub_427FD8"], [11, "mov [rbp+var_4], eax"], [12, "mov eax, [rbp+var_4]"], [13, "shr eax, 8"], [14, "leave"], [15, "retn"]], "data_dep": [[5, 4], [6, 3], [8, 5], [9, 6], [11, 10], [12, 11], [13, 12], [15, 13]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1c441b4e92b269bdc37c280fb103bab7e83dbb901d4ecb13effebc8823d67cca_1c441b4e92b269bdc37c280fb103bab7e83dbb901d4ecb13effebc8823d67cca.jsonl.gz", "strip_func_name": "sub_4015D2", "query": "\n\n\n__int64 __fastcall sub_4015D2(__int64 a1, __int64 a2)\n{\nreturn (unsigned int)sub_427FD8(a1, a2, 0LL) >> 8;\n}\n\n\n\nQ:[a1,a2,sub_4015D2,sub_427FD8,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'header', 'a2': 'length', 'sub_4015D2': 'LZ4F_headerChecksum', 'sub_427FD8': 'LZ4_XXH32'}"}
wc_ecc_del_point
7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2
wolfSSL
wolfBoot
NA
void wc_ecc_del_point(ecc_point* p) { wc_ecc_del_point_ex(p, NULL); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_418916", "function_addr": 4294934, "binary_name": "7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "mov esi, 0"], [6, "mov rdi, rax"], [7, "call sub_41888B"], [8, "nop"], [9, "leave"], [10, "retn"]], "data_dep": [[4, 3], [6, 4], [10, 7]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2_7219b0ef569734ba548000b39f891b63e71d053f533c94257503597f308a3fd2.jsonl.gz", "strip_func_name": "sub_418916", "query": "\n\n\n__int64 __fastcall sub_418916(__int64 a1)\n{\nreturn sub_41888B(a1);\n}\n\n\n\nQ:[a1,sub_418916,sub_41888B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'p', 'sub_418916': 'wc_ecc_del_point', 'sub_41888B': 'wc_ecc_del_point_ex'}"}
actual_main
120173c2a51540264cd7e6ae45ea60871623144b8d4cf82aa088dd2c17b65daa
darwin-on-arm
xnu
NA
int actual_main(int argc, char *argv[]) { int i; int opt; extern char *optarg; char *tmp; char optstr[256]; barrier_t *b; long long startnsecs = getnsecs(); #ifdef USE_RDTSC if (getenv("LIBMICRO_HZ") == NULL) { (void) printf("LIBMICRO_HZ needed but not set\n"); exit(1); } lm_hz = strtoll(getenv("LIBMICRO_HZ"), NULL, 10); #endif lm_argc = argc; lm_argv = argv; /* before we do anything */ (void) benchmark_init(); nsecs_overhead = get_nsecs_overhead(); nsecs_resolution = get_nsecs_resolution(); /* * Set defaults */ lm_opt1 = lm_def1; lm_optB = lm_defB; lm_optD = lm_defD; lm_optH = lm_defH; lm_optN = lm_defN; lm_optP = lm_defP; lm_optS = lm_defS; lm_optT = lm_defT; /* * squirrel away the path to the current * binary in a way that works on both * Linux and Solaris */ if (*argv[0] == '/') { lm_procpath = strdup(argv[0]); *strrchr(lm_procpath, '/') = 0; } else { char path[1024]; (void) getcwd(path, 1024); (void) strcat(path, "/"); (void) strcat(path, argv[0]); *strrchr(path, '/') = 0; lm_procpath = strdup(path); } /* * name of binary */ if ((tmp = strrchr(argv[0], '/')) == NULL) (void) strcpy(lm_procname, argv[0]); else (void) strcpy(lm_procname, tmp + 1); if (lm_optN == NULL) { lm_optN = lm_procname; } /* * Parse command line arguments */ (void) sprintf(optstr, "1AB:C:D:EHI:LMN:P:RST:VW?%s", lm_optstr); while ((opt = getopt(argc, argv, optstr)) != -1) { switch (opt) { case '1': lm_opt1 = 1; break; case 'A': lm_optA = 1; break; case 'B': lm_optB = sizetoint(optarg); break; case 'C': lm_optC = sizetoint(optarg); break; case 'D': lm_optD = sizetoint(optarg); break; case 'E': lm_optE = 1; break; case 'H': lm_optH = 1; break; case 'I': lm_optI = sizetoint(optarg); break; case 'L': lm_optL = 1; break; case 'M': lm_optM = 1; break; case 'N': lm_optN = optarg; break; case 'P': lm_optP = sizetoint(optarg); break; case 'S': lm_optS = 1; break; case 'T': lm_optT = sizetoint(optarg); break; case 'V': (void) printf("%s\n", LIBMICRO_VERSION); exit(0); break; case 'W': lm_optW = 1; lm_optS = 1; break; case '?': usage(); exit(0); break; default: if (benchmark_optswitch(opt, optarg) == -1) { usage(); exit(0); } } } /* deal with implicit and overriding options */ if (lm_opt1 && lm_optP > 1) { lm_optP = 1; (void) printf("warning: -1 overrides -P\n"); } if (lm_optE) { (void) fprintf(stderr, "Running:%20s", lm_optN); (void) fflush(stderr); } if (lm_optB == 0) { /* * neither benchmark or user has specified the number * of cnts/sample, so use computed value */ if (lm_optI) lm_nsecs_per_op = lm_optI; #define BLOCK_TOCK_DURATION 10000 /* number of raw timer "tocks" ideally comprising a block of work */ lm_optB = nsecs_resolution * BLOCK_TOCK_DURATION / lm_nsecs_per_op; if (lm_optB == 0) lm_optB = 1; } /* * now that the options are set */ if (benchmark_initrun() == -1) { exit(1); } /* allocate dynamic data */ pids = (pid_t *)malloc(lm_optP * sizeof (pid_t)); if (pids == NULL) { perror("malloc(pids)"); exit(1); } tids = (pthread_t *)malloc(lm_optT * sizeof (pthread_t)); if (tids == NULL) { perror("malloc(tids)"); exit(1); } /* check that the case defines lm_tsdsize before proceeding */ if (lm_tsdsize == (size_t)-1) { (void) fprintf(stderr, "error in benchmark_init: " "lm_tsdsize not set\n"); exit(1); } /* round up tsdsize to nearest 128 to eliminate false sharing */ tsdsize = ((lm_tsdsize + 127) / 128) * 128; /* allocate sufficient TSD for each thread in each process */ tsdseg = (void *)mmap(NULL, lm_optT * lm_optP * tsdsize + 8192, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0L); if (tsdseg == NULL) { perror("mmap(tsd)"); exit(1); } /* initialise worker synchronisation */ b = barrier_create(lm_optT * lm_optP, DATASIZE); if (b == NULL) { perror("barrier_create()"); exit(1); } lm_barrier = b; b->ba_flag = 1; /* need this here so that parent and children can call exit() */ (void) fflush(stdout); (void) fflush(stderr); /* when we started and when to stop */ b->ba_starttime = getnsecs(); b->ba_deadline = (long long) (b->ba_starttime + (lm_optD * 1000000LL)); /* do the work */ if (lm_opt1) { /* single process, non-fork mode */ pindex = 0; worker_process(); } else { /* create worker processes */ for (i = 0; i < lm_optP; i++) { pids[i] = fork(); switch (pids[i]) { case 0: pindex = i; worker_process(); exit(0); break; case -1: perror("fork"); exit(1); break; default: continue; } } /* wait for worker processes */ for (i = 0; i < lm_optP; i++) { if (pids[i] > 0) { (void) waitpid(pids[i], NULL, 0); } } } b->ba_endtime = getnsecs(); /* compute results */ compute_stats(b); /* print arguments benchmark was invoked with ? */ if (lm_optL) { int l; (void) printf("# %s ", argv[0]); for (l = 1; l < argc; l++) { (void) printf("%s ", argv[l]); } (void) printf("\n"); } /* print result header (unless suppressed) */ if (!lm_optH) { (void) printf("%12s %3s %3s %12s %12s %8s %8s %s\n", "", "prc", "thr", "usecs/call", "samples", "errors", "cnt/samp", lm_header); } /* print result */ (void) printf("%-12s %3d %3d %12.5f %12d %8lld %8d %s\n", lm_optN, lm_optP, lm_optT, (lm_optM?b->ba_corrected.st_mean:b->ba_corrected.st_median), b->ba_batches, b->ba_errors, lm_optB, benchmark_result()); if (lm_optS) { print_stats(b); } /* just incase something goes awry */ (void) fflush(stdout); (void) fflush(stderr); /* cleanup by stages */ (void) benchmark_finirun(); (void) barrier_destroy(b); (void) benchmark_fini(); if (lm_optE) { (void) fprintf(stderr, " for %12.5f seconds\n", (double)(getnsecs() - startnsecs) / 1.e9); (void) fflush(stderr); } return (0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4025EB", "function_addr": 4204011, "binary_name": "120173c2a51540264cd7e6ae45ea60871623144b8d4cf82aa088dd2c17b65daa.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 548h"], [4, "mov [rbp+argc], edi"], [5, "mov [rbp+argv], rsi"], [6, "mov eax, 0"], [7, "call sub_403D1D"], [8, "mov [rbp+var_20], rax"], [9, "mov eax, [rbp+argc]"], [10, "mov cs:dword_4091E0, eax"], [11, "mov rax, [rbp+argv]"], [12, "mov cs:qword_4091E8, rax"], [13, "mov eax, 0"], [14, "call sub_4023C2"], [15, "mov eax, 0"], [16, "call sub_404EB7"], [17, "mov cs:qword_40A290, rax"], [18, "mov eax, 0"], [19, "call sub_404FA7"], [20, "mov cs:qword_40A298, rax"], [21, "mov eax, cs:dword_409230"], [22, "mov cs:dword_4091F0, eax"], [23, "mov eax, cs:dword_409234"], [24, "mov cs:dword_4091F8, eax"], [25, "mov eax, cs:dword_40918C"], [26, "mov cs:dword_4091FC, eax"], [27, "mov eax, cs:dword_409238"], [28, "mov cs:dword_409204, eax"], [29, "mov rax, cs:qword_409240"], [30, "mov cs:qword_409218, rax"], [31, "mov eax, cs:dword_409190"], [32, "mov cs:dword_409220, eax"], [33, "mov eax, cs:dword_409248"], [34, "mov cs:dword_409224, eax"], [35, "mov eax, cs:dword_409194"], [36, "mov cs:dword_409228, eax"], [37, "mov rax, [rbp+argv]"], [38, "mov rax, [rax]"], [39, "movzx eax, byte ptr [rax]"], [40, "cmp al, 2Fh "], [41, "jnz short loc_4026FD"], [42, "mov rax, [rbp+argv]"], [43, "mov rax, [rax]"], [44, "mov rdi, rax"], [45, "call _strdup"], [46, "mov cs:qword_409250, rax"], [47, "mov rax, cs:qword_409250"], [48, "mov esi, 2Fh "], [49, "mov rdi, rax"], [50, "call _strrchr"], [51, "mov byte ptr [rax], 0"], [52, "jmp short loc_40277B"], [53, "lea rax, [rbp+buf]"], [54, "mov esi, 400h"], [55, "mov rdi, rax"], [56, "call _getcwd"], [57, "lea rax, [rbp+buf]"], [58, "mov rdi, rax"], [59, "call _strlen"], [60, "mov rdx, rax"], [61, "lea rax, [rbp+buf]"], [62, "add rax, rdx"], [63, "mov word ptr [rax], 2Fh "], [64, "mov rax, [rbp+argv]"], [65, "mov rdx, [rax]"], [66, "lea rax, [rbp+buf]"], [67, "mov rsi, rdx"], [68, "mov rdi, rax"], [69, "call _strcat"], [70, "lea rax, [rbp+buf]"], [71, "mov esi, 2Fh "], [72, "mov rdi, rax"], [73, "call _strrchr"], [74, "mov byte ptr [rax], 0"], [75, "lea rax, [rbp+buf]"], [76, "mov rdi, rax"], [77, "call _strdup"], [78, "mov cs:qword_409250, rax"], [79, "mov rax, [rbp+argv]"], [80, "mov rax, [rax]"], [81, "mov esi, 2Fh "], [82, "mov rdi, rax"], [83, "call _strrchr"], [84, "mov [rbp+var_28], rax"], [85, "cmp [rbp+var_28], 0"], [86, "jnz short loc_4027B6"], [87, "mov rax, [rbp+argv]"], [88, "mov rax, [rax]"], [89, "mov rsi, rax"], [90, "mov edi, offset dest"], [91, "call _strcpy"], [92, "jmp short loc_4027CB"], [93, "mov rax, [rbp+var_28]"], [94, "add rax, 1"], [95, "mov rsi, rax"], [96, "mov edi, offset dest"], [97, "call _strcpy"], [98, "mov rax, cs:qword_409218"], [99, "test rax, rax"], [100, "jnz short loc_4027E2"], [101, "mov cs:qword_409218, offset dest"], [102, "lea rax, [rbp+s]"], [103, "mov edx, offset byte_409A60"], [104, "mov esi, offset a1abCDEhiLmnPRs"], [105, "mov rdi, rax"], [106, "mov eax, 0"], [107, "call _sprintf"], [108, "jmp loc_4029BE"], [109, "mov eax, [rbp+var_2C]"], [110, "sub eax, 31h "], [111, "cmp eax, 26h"], [112, "ja def_40281E"], [113, "mov eax, eax"], [114, "mov rax, ds:jpt_40281E[rax*8]"], [115, "jmp rax"], [116, "mov cs:dword_4091F0, 1"], [117, "jmp loc_4029BE"], [118, "mov cs:dword_4091F4, 1"], [119, "jmp loc_4029BE"], [120, "mov rax, cs:optarg"], [121, "mov rdi, rax"], [122, "mov eax, 0"], [123, "call sub_403F0F"], [124, "mov cs:dword_4091F8, eax"], [125, "jmp loc_4029BE"], [126, "mov rax, cs:optarg"], [127, "mov rdi, rax"], [128, "mov eax, 0"], [129, "call sub_403F0F"], [130, "mov cs:dword_409188, eax"], [131, "jmp loc_4029BE"], [132, "mov rax, cs:optarg"], [133, "mov rdi, rax"], [134, "mov eax, 0"], [135, "call sub_403F0F"], [136, "mov cs:dword_4091FC, eax"], [137, "jmp loc_4029BE"], [138, "mov cs:dword_409200, 1"], [139, "jmp loc_4029BE"], [140, "mov cs:dword_409204, 1"], [141, "jmp loc_4029BE"], [142, "mov rax, cs:optarg"], [143, "mov rdi, rax"], [144, "mov eax, 0"], [145, "call sub_403F0F"], [146, "mov cs:dword_409208, eax"], [147, "jmp loc_4029BE"], [148, "mov cs:dword_40920C, 1"], [149, "jmp loc_4029BE"], [150, "mov cs:dword_409210, 1"], [151, "jmp loc_4029BE"], [152, "mov rax, cs:optarg"], [153, "mov cs:qword_409218, rax"], [154, "jmp loc_4029BE"], [155, "mov rax, cs:optarg"], [156, "mov rdi, rax"], [157, "mov eax, 0"], [158, "call sub_403F0F"], [159, "mov cs:dword_409220, eax"], [160, "jmp loc_4029BE"], [161, "mov cs:dword_409224, 1"], [162, "jmp loc_4029BE"], [163, "mov rax, cs:optarg"], [164, "mov rdi, rax"], [165, "mov eax, 0"], [166, "call sub_403F0F"], [167, "mov cs:dword_409228, eax"], [168, "jmp short loc_4029BE"], [169, "mov edi, offset a040"], [170, "call _puts"], [171, "mov edi, 0"], [172, "call _exit"], [173, "mov cs:dword_40922C, 1"], [174, "mov cs:dword_409224, 1"], [175, "jmp short loc_4029BE"], [176, "mov eax, 0"], [177, "call sub_403201"], [178, "mov edi, 0"], [179, "call _exit"], [180, "mov rdx, cs:optarg"], [181, "mov eax, [rbp+var_2C]"], [182, "mov rsi, rdx"], [183, "mov edi, eax"], [184, "call sub_40240F"], [185, "cmp eax, 0FFFFFFFFh"], [186, "jnz short loc_4029BE"], [187, "mov eax, 0"], [188, "call sub_403201"], [189, "mov edi, 0"], [190, "call _exit"], [191, "lea rdx, [rbp+s]"], [192, "mov rcx, [rbp+argv]"], [193, "mov eax, [rbp+argc]"], [194, "mov rsi, rcx"], [195, "mov edi, eax"], [196, "call _getopt"], [197, "mov [rbp+var_2C], eax"], [198, "cmp [rbp+var_2C], 0FFFFFFFFh"], [199, "jnz loc_402805"], [200, "mov eax, cs:dword_4091F0"], [201, "test eax, eax"], [202, "jz short loc_402A12"], [203, "mov eax, cs:dword_409220"], [204, "cmp eax, 1"], [205, "jle short loc_402A12"], [206, "mov cs:dword_409220, 1"], [207, "mov edi, offset aWarning1Overri"], [208, "call _puts"], [209, "mov eax, cs:dword_409200"], [210, "test eax, eax"], [211, "jz short loc_402A4B"], [212, "mov rdx, cs:qword_409218"], [213, "mov rax, cs:stderr"], [214, "mov esi, offset aRunning20s"], [215, "mov rdi, rax"], [216, "mov eax, 0"], [217, "call _fprintf"], [218, "mov rax, cs:stderr"], [219, "mov rdi, rax"], [220, "call _fflush"], [221, "mov eax, cs:dword_4091F8"], [222, "test eax, eax"], [223, "jnz short loc_402AA1"], [224, "mov eax, cs:dword_409208"], [225, "test eax, eax"], [226, "jz short loc_402A6B"], [227, "mov eax, cs:dword_409208"], [228, "mov cs:dword_409198, eax"], [229, "mov rax, cs:qword_40A298"], [230, "imul rax, 2710h"], [231, "mov edx, cs:dword_409198"], [232, "movsxd rbx, edx"], [233, "cqo"], [234, "idiv rbx"], [235, "mov cs:dword_4091F8, eax"], [236, "mov eax, cs:dword_4091F8"], [237, "test eax, eax"], [238, "jnz short loc_402AA1"], [239, "mov cs:dword_4091F8, 1"], [240, "mov eax, 0"], [241, "call sub_40243A"], [242, "cmp eax, 0FFFFFFFFh"], [243, "jnz short loc_402ABA"], [244, "mov edi, 1"], [245, "call _exit"], [246, "mov eax, cs:dword_409220"], [247, "cdqe"], [248, "shl rax, 2"], [249, "mov rdi, rax"], [250, "call _malloc"], [251, "mov cs:qword_40A270, rax"], [252, "mov rax, cs:qword_40A270"], [253, "test rax, rax"], [254, "jnz short loc_402AF5"], [255, "mov edi, offset aMallocPids"], [256, "call _perror"], [257, "mov edi, 1"], [258, "call _exit"], [259, "mov eax, cs:dword_409228"], [260, "cdqe"], [261, "shl rax, 3"], [262, "mov rdi, rax"], [263, "call _malloc"], [264, "mov cs:qword_40A278, rax"], [265, "mov rax, cs:qword_40A278"], [266, "test rax, rax"], [267, "jnz short loc_402B30"], [268, "mov edi, offset aMallocTids"], [269, "call _perror"], [270, "mov edi, 1"], [271, "call _exit"], [272, "mov rax, cs:qword_40A260"], [273, "cmp rax, 0FFFFFFFFFFFFFFFFh"], [274, "jnz short loc_402B65"], [275, "mov rax, cs:stderr"], [276, "mov rcx, rax"], [277, "mov edx, 2Ch "], [278, "mov esi, 1"], [279, "mov edi, offset aErrorInBenchma"], [280, "call _fwrite"], [281, "mov edi, 1"], [282, "call _exit"], [283, "mov rax, cs:qword_40A260"], [284, "add rax, 7Fh"], [285, "and rax, 0FFFFFFFFFFFFFF80h"], [286, "mov cs:qword_40A288, rax"], [287, "mov edx, cs:dword_409228"], [288, "mov eax, cs:dword_409220"], [289, "imul eax, edx"], [290, "movsxd rdx, eax"], [291, "mov rax, cs:qword_40A288"], [292, "imul rax, rdx"], [293, "add rax, 2000h"], [294, "mov r9d, 0"], [295, "mov r8d, 0FFFFFFFFh"], [296, "mov ecx, 21h "], [297, "mov edx, 3"], [298, "mov rsi, rax"], [299, "mov edi, 0"], [300, "call _mmap"], [301, "mov cs:qword_40A280, rax"], [302, "mov rax, cs:qword_40A280"], [303, "test rax, rax"], [304, "jnz short loc_402BE8"], [305, "mov edi, offset aMmapTsd"], [306, "call _perror"], [307, "mov edi, 1"], [308, "call _exit"], [309, "mov edx, cs:dword_409228"], [310, "mov eax, cs:dword_409220"], [311, "imul eax, edx"], [312, "mov esi, 186A0h"], [313, "mov edi, eax"], [314, "call sub_403856"], [315, "mov [rbp+var_38], rax"], [316, "cmp [rbp+var_38], 0"], [317, "jnz short loc_402C22"], [318, "mov edi, offset aBarrierCreate"], [319, "call _perror"], [320, "mov edi, 1"], [321, "call _exit"], [322, "mov rax, [rbp+var_38]"], [323, "mov cs:qword_40A268, rax"], [324, "mov rax, [rbp+var_38]"], [325, "mov dword ptr [rax+4], 1"], [326, "mov rax, cs:stdout"], [327, "mov rdi, rax"], [328, "call _fflush"], [329, "mov rax, cs:stderr"], [330, "mov rdi, rax"], [331, "call _fflush"], [332, "mov eax, 0"], [333, "call sub_403D1D"], [334, "pxor xmm0, xmm0"], [335, "cvtsi2sd xmm0, rax"], [336, "mov rax, [rbp+var_38]"], [337, "movsd qword ptr [rax+38h], xmm0"], [338, "mov rax, [rbp+var_38]"], [339, "movsd xmm1, qword ptr [rax+38h]"], [340, "mov eax, cs:dword_4091FC"], [341, "cdqe"], [342, "imul rax, 0F4240h"], [343, "pxor xmm0, xmm0"], [344, "cvtsi2sd xmm0, rax"], [345, "addsd xmm0, xmm1"], [346, "cvttsd2si rdx, xmm0"], [347, "mov rax, [rbp+var_38]"], [348, "mov [rax+8], rdx"], [349, "mov eax, cs:dword_4091F0"], [350, "test eax, eax"], [351, "jz short loc_402CC7"], [352, "mov cs:dword_40919C, 0"], [353, "mov eax, 0"], [354, "call sub_403128"], [355, "jmp loc_402DA0"], [356, "mov [rbp+var_14], 0"], [357, "jmp short loc_402D3E"], [358, "mov rdx, cs:qword_40A270"], [359, "mov eax, [rbp+var_14]"], [360, "cdqe"], [361, "shl rax, 2"], [362, "lea rbx, [rdx+rax]"], [363, "call _fork"], [364, "mov [rbx], eax"], [365, "mov rdx, cs:qword_40A270"], [366, "mov eax, [rbp+var_14]"], [367, "cdqe"], [368, "shl rax, 2"], [369, "add rax, rdx"], [370, "mov eax, [rax]"], [371, "cmp eax, 0FFFFFFFFh"], [372, "jz short loc_402D26"], [373, "test eax, eax"], [374, "jnz short loc_402D3A"], [375, "mov eax, [rbp+var_14]"], [376, "mov cs:dword_40919C, eax"], [377, "mov eax, 0"], [378, "call sub_403128"], [379, "mov edi, 0"], [380, "call _exit"], [381, "mov edi, offset aFork_0"], [382, "call _perror"], [383, "mov edi, 1"], [384, "call _exit"], [385, "add [rbp+var_14], 1"], [386, "mov eax, cs:dword_409220"], [387, "cmp [rbp+var_14], eax"], [388, "jl short loc_402CD0"], [389, "mov [rbp+var_14], 0"], [390, "jmp short loc_402D95"], [391, "mov rdx, cs:qword_40A270"], [392, "mov eax, [rbp+var_14]"], [393, "cdqe"], [394, "shl rax, 2"], [395, "add rax, rdx"], [396, "mov eax, [rax]"], [397, "test eax, eax"], [398, "jle short loc_402D91"], [399, "mov rdx, cs:qword_40A270"], [400, "mov eax, [rbp+var_14]"], [401, "cdqe"], [402, "shl rax, 2"], [403, "add rax, rdx"], [404, "mov eax, [rax]"], [405, "mov edx, 0"], [406, "mov esi, 0"], [407, "mov edi, eax"], [408, "call _waitpid"], [409, "add [rbp+var_14], 1"], [410, "mov eax, cs:dword_409220"], [411, "cmp [rbp+var_14], eax"], [412, "jl short loc_402D52"], [413, "mov eax, 0"], [414, "call sub_403D1D"], [415, "pxor xmm0, xmm0"], [416, "cvtsi2sd xmm0, rax"], [417, "mov rax, [rbp+var_38]"], [418, "movsd qword ptr [rax+40h], xmm0"], [419, "mov rax, [rbp+var_38]"], [420, "mov rdi, rax"], [421, "call sub_40474F"], [422, "mov eax, cs:dword_40920C"], [423, "test eax, eax"], [424, "jz short loc_402E3C"], [425, "mov rax, [rbp+argv]"], [426, "mov rax, [rax]"], [427, "mov rsi, rax"], [428, "mov edi, offset aS"], [429, "mov eax, 0"], [430, "call _printf"], [431, "mov [rbp+var_18], 1"], [432, "jmp short loc_402E27"], [433, "mov eax, [rbp+var_18]"], [434, "cdqe"], [435, "lea rdx, ds:0[rax*8]"], [436, "mov rax, [rbp+argv]"], [437, "add rax, rdx"], [438, "mov rax, [rax]"], [439, "mov rsi, rax"], [440, "mov edi, offset aS_0"], [441, "mov eax, 0"], [442, "call _printf"], [443, "add [rbp+var_18], 1"], [444, "mov eax, [rbp+var_18]"], [445, "cmp eax, [rbp+argc]"], [446, "jl short loc_402DF7"], [447, "mov edi, 0Ah"], [448, "call _putchar"], [449, "mov eax, cs:dword_409204"], [450, "test eax, eax"], [451, "jnz short loc_402E87"], [452, "sub rsp, 8"], [453, "push offset unk_409E60"], [454, "push offset aCntSamp"], [455, "push offset aErrors"], [456, "mov r9d, offset aSamples"], [457, "mov r8d, offset aUsecsCall"], [458, "mov ecx, offset aThr"], [459, "mov edx, offset aPrc"], [460, "mov esi, offset unk_40613A"], [461, "mov edi, offset a12s3s3s12s12s8"], [462, "mov eax, 0"], [463, "call _printf"], [464, "add rsp, 20h"], [465, "mov eax, 0"], [466, "call sub_40523E"], [467, "mov rdi, rax"], [468, "mov r8d, cs:dword_4091F8"], [469, "mov rax, [rbp+var_38]"], [470, "mov r9, [rax+28h]"], [471, "mov rax, [rbp+var_38]"], [472, "mov r10d, [rax+34h]"], [473, "mov eax, cs:dword_409210"], [474, "test eax, eax"], [475, "jz short loc_402EC2"], [476, "mov rax, [rbp+var_38]"], [477, "mov rax, [rax+0A8h]"], [478, "jmp short loc_402ECD"], [479, "mov rax, [rbp+var_38]"], [480, "mov rax, [rax+0B0h]"], [481, "mov ecx, cs:dword_409228"], [482, "mov edx, cs:dword_409220"], [483, "mov rsi, cs:qword_409218"], [484, "push rdi"], [485, "push r8"], [486, "mov r8d, r10d"], [487, "movq xmm0, rax"], [488, "mov edi, offset a12s3d3d125f12d"], [489, "mov eax, 1"], [490, "call _printf"], [491, "add rsp, 10h"], [492, "mov eax, cs:dword_409224"], [493, "test eax, eax"], [494, "jz short loc_402F14"], [495, "mov rax, [rbp+var_38]"], [496, "mov rdi, rax"], [497, "call sub_403335"], [498, "mov rax, cs:stdout"], [499, "mov rdi, rax"], [500, "call _fflush"], [501, "mov rax, cs:stderr"], [502, "mov rdi, rax"], [503, "call _fflush"], [504, "mov eax, 0"], [505, "call sub_405215"], [506, "mov rax, [rbp+var_38]"], [507, "mov rdi, rax"], [508, "call sub_4039B7"], [509, "mov eax, 0"], [510, "call sub_40520A"], [511, "mov eax, cs:dword_409200"], [512, "test eax, eax"], [513, "jz short loc_402FB1"], [514, "mov eax, 0"], [515, "call sub_403D1D"], [516, "sub rax, [rbp+var_20]"], [517, "pxor xmm0, xmm0"], [518, "cvtsi2sd xmm0, rax"], [519, "movsd xmm1, cs:qword_406CC0"], [520, "divsd xmm0, xmm1"], [521, "movq rdx, xmm0"], [522, "mov rax, cs:stderr"], [523, "movq xmm0, rdx"], [524, "mov esi, offset aFor125fSeconds"], [525, "mov rdi, rax"], [526, "mov eax, 1"], [527, "call _fprintf"], [528, "mov rax, cs:stderr"], [529, "mov rdi, rax"], [530, "call _fflush"], [531, "mov eax, 0"], [532, "mov rbx, [rbp+var_8]"], [533, "leave"], [534, "retn"]], "data_dep": [[8, 7], [9, 4], [10, 9], [11, 5], [12, 11], [17, 16], [20, 19], [22, 21], [24, 23], [26, 25], [28, 27], [30, 29], [32, 31], [34, 33], [36, 35], [37, 5], [38, 37], [39, 38], [40, 39], [41, 40], [42, 5], [43, 42], [44, 43], [46, 45], [47, 46], [49, 47], [51, 50], [53, 39], [55, 53], [57, 56], [58, 57], [60, 59], [61, 59], [62, 60], [62, 61], [63, 62], [64, 5], [65, 64], [65, 63], [66, 64], [67, 65], [68, 66], [70, 69], [72, 70], [74, 73], [75, 73], [76, 75], [78, 77], [79, 5], [80, 79], [80, 51], [80, 74], [80, 63], [82, 80], [84, 83], [85, 84], [86, 85], [87, 5], [88, 51], [88, 74], [88, 87], [88, 63], [89, 88], [93, 84], [94, 93], [95, 94], [98, 30], [99, 98], [100, 99], [102, 99], [105, 102], [109, 197], [110, 109], [111, 110], [112, 111], [113, 110], [115, 114], [121, 120], [124, 123], [127, 126], [130, 129], [133, 132], [136, 135], [143, 142], [146, 145], [153, 152], [156, 155], [159, 158], [164, 163], [167, 166], [181, 197], [182, 180], [183, 181], [185, 184], [186, 185], [191, 191], [191, 180], [191, 103], [192, 5], [193, 4], [194, 192], [195, 193], [197, 196], [198, 197], [199, 198], [200, 116], [200, 22], [201, 200], [202, 201], [203, 159], [203, 32], [204, 203], [205, 204], [209, 138], [210, 209], [211, 210], [212, 153], [212, 101], [212, 30], [215, 213], [219, 218], [221, 124], [221, 24], [222, 221], [223, 222], [224, 146], [225, 224], [226, 225], [227, 146], [228, 227], [229, 20], [230, 229], [231, 228], [232, 231], [234, 232], [235, 230], [236, 235], [237, 236], [238, 237], [242, 241], [243, 242], [246, 159], [246, 32], [246, 206], [248, 246], [249, 248], [251, 250], [252, 251], [253, 252], [254, 253], [259, 167], [259, 36], [261, 259], [262, 261], [264, 263], [265, 264], [266, 265], [267, 266], [273, 272], [274, 273], [276, 275], [284, 283], [285, 284], [286, 285], [287, 167], [287, 36], [288, 206], [288, 159], [288, 32], [289, 287], [289, 288], [290, 289], [291, 286], [292, 291], [292, 290], [293, 292], [298, 293], [301, 300], [302, 301], [303, 302], [304, 303], [309, 167], [309, 36], [310, 206], [310, 159], [310, 32], [311, 310], [311, 309], [313, 311], [315, 314], [316, 315], [317, 316], [322, 315], [323, 322], [324, 315], [325, 324], [327, 326], [330, 329], [335, 334], [335, 333], [336, 315], [337, 336], [337, 335], [338, 315], [339, 338], [339, 337], [340, 26], [340, 136], [342, 340], [344, 343], [344, 342], [345, 344], [345, 339], [346, 309], [346, 345], [347, 315], [348, 346], [348, 347], [349, 22], [349, 116], [350, 349], [351, 350], [358, 251], [359, 356], [359, 385], [361, 359], [362, 74], [362, 348], [362, 325], [362, 361], [362, 63], [362, 234], [362, 337], [362, 364], [362, 51], [362, 362], [364, 363], [364, 362], [365, 251], [366, 385], [366, 356], [368, 366], [369, 368], [369, 365], [370, 369], [370, 364], [370, 51], [370, 74], [371, 370], [372, 371], [373, 370], [374, 373], [375, 385], [375, 356], [376, 375], [385, 385], [385, 356], [386, 206], [386, 159], [386, 32], [387, 386], [387, 385], [387, 356], [388, 387], [391, 251], [392, 389], [392, 409], [394, 392], [395, 394], [395, 391], [396, 364], [396, 74], [396, 51], [396, 395], [396, 348], [396, 325], [396, 63], [396, 337], [397, 396], [398, 397], [399, 251], [400, 389], [400, 409], [402, 400], [403, 402], [403, 399], [404, 51], [404, 74], [404, 348], [404, 325], [404, 63], [404, 403], [404, 337], [404, 364], [407, 404], [409, 409], [409, 389], [410, 159], [410, 206], [410, 32], [411, 389], [411, 410], [411, 409], [412, 411], [416, 415], [416, 414], [417, 315], [418, 417], [418, 416], [419, 315], [420, 419], [422, 148], [423, 422], [424, 423], [425, 5], [426, 364], [426, 74], [426, 51], [426, 418], [426, 348], [426, 325], [426, 63], [426, 337], [426, 425], [427, 426], [433, 431], [433, 443], [435, 435], [435, 391], [435, 405], [435, 365], [435, 346], [436, 5], [437, 436], [437, 435], [438, 63], [438, 337], [438, 364], [438, 74], [438, 51], [438, 325], [438, 437], [438, 418], [438, 348], [439, 438], [443, 431], [443, 443], [444, 431], [444, 443], [445, 4], [445, 444], [446, 445], [449, 140], [449, 28], [450, 449], [451, 450], [452, 3], [464, 452], [467, 466], [468, 235], [468, 239], [468, 24], [468, 124], [469, 315], [470, 364], [470, 74], [470, 348], [470, 469], [470, 51], [470, 325], [470, 418], [470, 63], [470, 337], [471, 315], [472, 364], [472, 471], [472, 74], [472, 51], [472, 325], [472, 418], [472, 348], [472, 63], [472, 337], [473, 150], [474, 473], [475, 474], [476, 315], [477, 51], [477, 325], [477, 418], [477, 63], [477, 337], [477, 476], [477, 364], [477, 74], [477, 348], [479, 315], [480, 479], [480, 74], [480, 51], [480, 325], [480, 418], [480, 348], [480, 63], [480, 337], [480, 364], [481, 167], [481, 36], [482, 206], [482, 159], [482, 32], [483, 153], [483, 101], [483, 30], [484, 467], [485, 468], [486, 472], [487, 477], [487, 480], [491, 464], [491, 3], [492, 161], [492, 174], [492, 34], [493, 492], [494, 493], [495, 315], [496, 495], [499, 498], [502, 501], [506, 315], [507, 506], [511, 138], [512, 511], [513, 512], [516, 8], [516, 515], [518, 516], [518, 517], [520, 519], [520, 518], [521, 520], [523, 521], [525, 522], [529, 528], [534, 531]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/120173c2a51540264cd7e6ae45ea60871623144b8d4cf82aa088dd2c17b65daa_120173c2a51540264cd7e6ae45ea60871623144b8d4cf82aa088dd2c17b65daa.jsonl.gz", "strip_func_name": "sub_4025EB", "query": "\n\n\n__int64 __fastcall sub_4025EB(int a1, const char **a2)\n{\nconst char *v2; // rsi\nunsigned __int64 v3; // rdi\n__int64 v4; // rdx\n__pid_t *v5; // rbx\nint v6; // eax\ndouble v7; // xmm0_8\nconst char *v8; // rdi\ndouble v9; // rax\nint v10; // eax\n__int64 result; // rax\nchar buf[1024]; // [rsp+10h] [rbp-540h] BYREF\nchar s[264]; // [rsp+410h] [rbp-140h] BYREF\n__int64 v16; // [rsp+518h] [rbp-38h]\nint v17; // [rsp+524h] [rbp-2Ch]\nchar *v18; // [rsp+528h] [rbp-28h]\n__int64 v19; // [rsp+530h] [rbp-20h]\nint j; // [rsp+538h] [rbp-18h]\nint i; // [rsp+53Ch] [rbp-14h]\n\nv19 = sub_403D1D();\ndword_4091E0 = a1;\nqword_4091E8 = (__int64)a2;\nsub_4023C2();\nqword_40A290 = sub_404EB7();\nqword_40A298 = sub_404FA7();\ndword_4091F0 = dword_409230;\ndword_4091F8 = dword_409234;\ndword_4091FC = dword_40918C;\ndword_409204 = dword_409238;\nqword_409218 = qword_409240;\ndword_409220 = dword_409190;\ndword_409224 = dword_409248;\ndword_409228 = dword_409194;\nif ( **a2 == 47 )\n{\nqword_409250 = strdup(*a2);\n*strrchr(qword_409250, 47) = 0;\n}\nelse\n{\ngetcwd(buf, 0x400uLL);\n*(_WORD *)&buf[strlen(buf)] = 47;\nstrcat(buf, *a2);\n*strrchr(buf, 47) = 0;\nqword_409250 = strdup(buf);\n}\nv18 = strrchr(*a2, 47);\nif ( v18 )\nstrcpy(dest, v18 + 1);\nelse\nstrcpy(dest, *a2);\nif ( !qword_409218 )\nqword_409218 = (__int64)dest;\nsprintf(s, \"1AB:C:D:EHI:LMN:P:RST:VW?%s\", byte_409A60);\nwhile ( 1 )\n{\nv2 = (const char *)a2;\nv3 = (unsigned int)a1;\nv17 = getopt(a1, (char *const *)a2, s);\nif ( v17 == -1 )\nbreak;\nswitch ( v17 )\n{\ncase '1':\ndword_4091F0 = 1;\nbreak;\ncase '?':\nsub_403201();\nexit(0);\ncase 'A':\ndword_4091F4 = 1;\nbreak;\ncase 'B':\ndword_4091F8 = sub_403F0F(optarg);\nbreak;\ncase 'C':\ndword_409188 = sub_403F0F(optarg);\nbreak;\ncase 'D':\ndword_4091FC = sub_403F0F(optarg);\nbreak;\ncase 'E':\ndword_409200 = 1;\nbreak;\ncase 'H':\ndword_409204 = 1;\nbreak;\ncase 'I':\ndword_409208 = sub_403F0F(optarg);\nbreak;\ncase 'L':\ndword_40920C = 1;\nbreak;\ncase 'M':\ndword_409210 = 1;\nbreak;\ncase 'N':\nqword_409218 = optarg;\nbreak;\ncase 'P':\ndword_409220 = sub_403F0F(optarg);\nbreak;\ncase 'S':\ndword_409224 = 1;\nbreak;\ncase 'T':\ndword_409228 = sub_403F0F(optarg);\nbreak;\ncase 'V':\nputs(\"0.4.0\");\nexit(0);\ncase 'W':\ndword_40922C = 1;\ndword_409224 = 1;\nbreak;\ndefault:\nif ( (unsigned int)sub_40240F(v17, (char *)optarg) == -1 )\n{\nsub_403201();\nexit(0);\n}\nreturn result;\n}\n}\nif ( dword_4091F0 && dword_409220 > 1 )\n{\ndword_409220 = 1;\nv3 = (unsigned __int64)\"warning: -1 overrides -P\";\nputs(\"warning: -1 overrides -P\");\n}\nif ( dword_409200 )\n{\nv2 = \"Running:%20s\";\nfprintf(stderr, \"Running:%20s\", (const char *)qword_409218);\nv3 = (unsigned __int64)stderr;\nfflush(stderr);\n}\nif ( !dword_4091F8 )\n{\nif ( dword_409208 )\ndword_409198 = dword_409208;\nv4 = 10000 * qword_40A298 % dword_409198;\ndword_4091F8 = 10000 * qword_40A298 / dword_409198;\nif ( !dword_4091F8 )\ndword_4091F8 = 1;\n}\nif ( (unsigned int)sub_40243A(v3, v2, v4) == -1 )\nexit(1);\nqword_40A270 = (__int64)malloc(4LL * dword_409220);\nif ( !qword_40A270 )\n{\nperror(\"malloc(pids)\");\nexit(1);\n}\nqword_40A278 = (__int64)malloc(8LL * dword_409228);\nif ( !qword_40A278 )\n{\nperror(\"malloc(tids)\");\nexit(1);\n}\nif ( qword_40A260 == -1 )\n{\nfwrite(\"error in benchmark_init: lm_tsdsize not set\\n\", 1uLL, 0x2CuLL, stderr);\nexit(1);\n}\nqword_40A288 = (qword_40A260 + 127) & 0xFFFFFFFFFFFFFF80LL;\nqword_40A280 = (__int64)mmap(\n0LL,\ndword_409228 * dword_409220 * ((qword_40A260 + 127) & 0xFFFFFFFFFFFFFF80LL) + 0x2000,\n3,\n33,\n-1,\n0LL);\nif ( !qword_40A280 )\n{\nperror(\"mmap(tsd)\");\nexit(1);\n}\nv16 = sub_403856((unsigned int)(dword_409228 * dword_409220), 100000LL);\nif ( !v16 )\n{\nperror(\"barrier_create()\");\nexit(1);\n}\nqword_40A268 = v16;\n*(_DWORD *)(v16 + 4) = 1;\nfflush(stdout);\nfflush(stderr);\n*(double *)(v16 + 56) = (double)(int)sub_403D1D();\n*(_QWORD *)(v16 + 8) = (unsigned int)(int)((double)(1000000 * dword_4091FC) + *(double *)(v16 + 56));\nif ( dword_4091F0 )\n{\ndword_40919C = 0;\nsub_403128();\n}\nelse\n{\nfor ( i = 0; i < dword_409220; ++i )\n{\nv5 = (__pid_t *)(qword_40A270 + 4LL * i);\n*v5 = fork();\nv6 = *(_DWORD *)(qword_40A270 + 4LL * i);\nif ( v6 == -1 )\n{\nperror(\"fork\");\nexit(1);\n}\nif ( !v6 )\n{\ndword_40919C = i;\nsub_403128();\nexit(0);\n}\n}\nfor ( i = 0; i < dword_409220; ++i )\n{\nif ( *(int *)(qword_40A270 + 4LL * i) > 0 )\nwaitpid(*(_DWORD *)(qword_40A270 + 4LL * i), 0LL, 0);\n}\n}\nv7 = (double)(int)sub_403D1D();\n*(double *)(v16 + 64) = v7;\nsub_40474F(v16);\nif ( dword_40920C )\n{\nprintf(\"# %s \", *a2);\nfor ( j = 1; j < a1; ++j )\nprintf(\"%s \", a2[j]);\nputchar(10);\n}\nif ( !dword_409204 )\nprintf(\n\"%12s %3s %3s %12s %12s %8s %8s %s\\n\",\nbyte_40613A,\n\"prc\",\n\"thr\",\n\"usecs/call\",\n\"samples\",\n\"errors\",\n\"cnt/samp\",\nbyte_409E60);\nv8 = (const char *)sub_40523E();\nif ( dword_409210 )\nv9 = *(double *)(v16 + 168);\nelse\nv9 = *(double *)(v16 + 176);\nprintf(\n\"%-12s %3d %3d %12.5f %12d %8lld %8d %s\\n\",\n(const char *)qword_409218,\n(unsigned int)dword_409220,\n(unsigned int)dword_409228,\nv9,\n*(unsigned int *)(v16 + 52),\n*(_QWORD *)(v16 + 40),\n(unsigned int)dword_4091F8,\nv8);\nif ( dword_409224 )\nsub_403335(v16);\nfflush(stdout);\nfflush(stderr);\nsub_405215();\nsub_4039B7(v16);\nsub_40520A();\nif ( dword_409200 )\n{\nv10 = sub_403D1D();\nfprintf(stderr, \" for %12.5f seconds\\n\", (double)(v10 - (int)v19) / 1000000000.0);\nfflush(stderr);\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v2,v6,buf,s,v16,v17,v18,v19,j,sub_4025EB,sub_403D1D,sub_4023C2,sub_404EB7,sub_404FA7,sub_403201,sub_403F0F,sub_40240F,sub_40243A,sub_403856,sub_403128,sub_40474F,sub_40523E,sub_403335,sub_405215,sub_4039B7,sub_40520A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'argc', 'a2': 'argv', 'v2': 'argv', 'v6': 'result', 'buf': 'path', 's': 'optstr', 'v16': 'b', 'v17': 'opt', 'v18': 'tmp', 'v19': 'startnsecs', 'j': 'l', 'sub_4025EB': 'actual_main', 'sub_403D1D': 'getnsecs', 'sub_4023C2': 'benchmark_init', 'sub_404EB7': 'get_nsecs_overhead', 'sub_404FA7': 'get_nsecs_resolution', 'sub_403201': 'usage', 'sub_403F0F': 'sizetoint', 'sub_40240F': 'benchmark_optswitch', 'sub_40243A': 'benchmark_initrun', 'sub_403856': 'barrier_create', 'sub_403128': 'worker_process', 'sub_40474F': 'compute_stats', 'sub_40523E': 'benchmark_result', 'sub_403335': 'print_stats', 'sub_405215': 'benchmark_finirun', 'sub_4039B7': 'barrier_destroy', 'sub_40520A': 'benchmark_fini'}"}
get_pkginclude_path
03cb21066879bf2566b6b00ca99c237086584928f4ea06d7e91f257b75439064
DataSystemsLab
hippo-postgresql
NA
void get_pkginclude_path(const char *my_exec_path, char *ret_path) { make_relative_path(ret_path, PKGINCLUDEDIR, PGBINDIR, my_exec_path); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405486", "function_addr": 4215942, "binary_name": "03cb21066879bf2566b6b00ca99c237086584928f4ea06d7e91f257b75439064.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rdx, [rbp+var_8]"], [6, "mov rax, [rbp+var_10]"], [7, "mov rcx, rdx"], [8, "mov edx, offset aUsrLocalPgsqlB"], [9, "mov esi, offset aUsrLocalPgsqlI"], [10, "mov rdi, rax"], [11, "call sub_405043"], [12, "nop"], [13, "leave"], [14, "retn"]], "data_dep": [[5, 3], [6, 4], [7, 5], [10, 6], [14, 11]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/03cb21066879bf2566b6b00ca99c237086584928f4ea06d7e91f257b75439064_03cb21066879bf2566b6b00ca99c237086584928f4ea06d7e91f257b75439064.jsonl.gz", "strip_func_name": "sub_405486", "query": "\n\n\nint __fastcall sub_405486(_BYTE *a1, char *a2)\n{\nreturn sub_405043(a2, \"/usr/local/pgsql/include\", \"/usr/local/pgsql/bin\", a1);\n}\n\n\n\nQ:[a1,a2,sub_405486,sub_405043,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'my_exec_path', 'a2': 'ret_path', 'sub_405486': 'get_pkginclude_path', 'sub_405043': 'make_relative_path'}"}
mmap_helper_device_init
42b7bb3daa242e2847b11ae8e23e10be8dfc6fadd65fe79d9f672661ebe9ac51
teslamotors
coreboot
NA
void mmap_helper_device_init(struct mmap_helper_region_device *mdev, void *cache, size_t cache_size) { mem_pool_init(&mdev->pool, cache, cache_size); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41612F", "function_addr": 4284719, "binary_name": "42b7bb3daa242e2847b11ae8e23e10be8dfc6fadd65fe79d9f672661ebe9ac51.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 18h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rax, [rbp+var_8]"], [7, "mov rdx, [rbp+var_18]"], [8, "mov rcx, [rbp+var_10]"], [9, "mov rsi, rcx"], [10, "mov rdi, rax"], [11, "call sub_415853"], [12, "nop"], [13, "leave"], [14, "retn"]], "data_dep": [[6, 3], [7, 5], [8, 4], [9, 8], [10, 6], [14, 11]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/42b7bb3daa242e2847b11ae8e23e10be8dfc6fadd65fe79d9f672661ebe9ac51_42b7bb3daa242e2847b11ae8e23e10be8dfc6fadd65fe79d9f672661ebe9ac51.jsonl.gz", "strip_func_name": "sub_41612F", "query": "\n\n\n__int64 __fastcall sub_41612F(_QWORD *a1, __int64 a2, __int64 a3)\n{\nreturn sub_415853(a1, a2, a3);\n}\n\n\n\nQ:[a3,a1,a2,sub_41612F,sub_415853,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'cache_size', 'a1': 'mdev', 'a2': 'cache', 'sub_41612F': 'mmap_helper_device_init', 'sub_415853': 'mem_pool_init'}"}
testHEX16sWithinDeltaAndCustomMessage
08f75e8cea2799daf4ab70b8df261c534a663dff963410741a43aabb6fbc7ad6
LeeLulin
esp-homekit-direct
NA
void testHEX16sWithinDeltaAndCustomMessage(void) { TEST_ASSERT_HEX16_WITHIN_MESSAGE(1, 5000, 5001, "Custom Message."); TEST_ASSERT_HEX16_WITHIN_MESSAGE(5, 5000, 4996, "Custom Message."); TEST_ASSERT_HEX16_WITHIN_MESSAGE(5, 5000, 5005, "Custom Message."); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40C9D0", "function_addr": 4245968, "binary_name": "08f75e8cea2799daf4ab70b8df261c534a663dff963410741a43aabb6fbc7ad6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:qword_43F160"], [3, "add rax, 1"], [4, "mov cs:qword_43F160, rax"], [5, "mov r9d, 42h "], [6, "mov r8d, 3F1h"], [7, "mov ecx, offset aCustomMessage"], [8, "mov edx, 1389h"], [9, "mov esi, 1388h"], [10, "mov edi, 1"], [11, "call sub_404323"], [12, "mov rax, cs:qword_43F168"], [13, "add rax, 1"], [14, "mov cs:qword_43F168, rax"], [15, "mov r9d, 42h "], [16, "mov r8d, 3F2h"], [17, "mov ecx, offset aCustomMessage"], [18, "mov edx, 1384h"], [19, "mov esi, 1388h"], [20, "mov edi, 5"], [21, "call sub_404323"], [22, "mov rax, cs:qword_43F170"], [23, "add rax, 1"], [24, "mov cs:qword_43F170, rax"], [25, "mov r9d, 42h "], [26, "mov r8d, 3F3h"], [27, "mov ecx, offset aCustomMessage"], [28, "mov edx, 138Dh"], [29, "mov esi, 1388h"], [30, "mov edi, 5"], [31, "call sub_404323"], [32, "mov rax, cs:qword_43F178"], [33, "add rax, 1"], [34, "mov cs:qword_43F178, rax"], [35, "nop"], [36, "pop rbp"], [37, "retn"]], "data_dep": [[3, 2], [4, 3], [13, 12], [14, 13], [23, 22], [24, 23], [33, 32], [34, 33], [36, 0], [37, 33]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/08f75e8cea2799daf4ab70b8df261c534a663dff963410741a43aabb6fbc7ad6_08f75e8cea2799daf4ab70b8df261c534a663dff963410741a43aabb6fbc7ad6.jsonl.gz", "strip_func_name": "sub_40C9D0", "query": "\n\n\n__int64 sub_40C9D0()\n{\n++qword_43F160;\nsub_404323(1uLL, 5000LL, 5001LL, \"Custom Message.\", 1009LL, 66);\n++qword_43F168;\nsub_404323(5uLL, 5000LL, 4996LL, \"Custom Message.\", 1010LL, 66);\n++qword_43F170;\nsub_404323(5uLL, 5000LL, 5005LL, \"Custom Message.\", 1011LL, 66);\nreturn ++qword_43F178;\n}\n\n\n\nQ:[sub_40C9D0,sub_404323,]\nAssistant: ", "hints": "[]", "response": "{'sub_40C9D0': 'testHEX16sWithinDeltaAndCustomMessage', 'sub_404323': 'UnityAssertNumbersWithin'}"}
fn_true
8ae2ab0464f0ac96a7fdeccbe9109d753af18ecfd065336c7a6978a11512a7eb
stardot
MatrixBrandy
NA
void fn_true(void) { basicvars.current++; push_int(BASTRUE); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43FAFF", "function_addr": 4455167, "binary_name": "8ae2ab0464f0ac96a7fdeccbe9109d753af18ecfd065336c7a6978a11512a7eb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:qword_4B9CE8"], [3, "add rax, 1"], [4, "mov cs:qword_4B9CE8, rax"], [5, "mov edi, 0FFFFFFFFh"], [6, "call sub_44F152"], [7, "nop"], [8, "pop rbp"], [9, "retn"]], "data_dep": [[3, 2], [4, 3], [8, 0], [9, 6]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/8ae2ab0464f0ac96a7fdeccbe9109d753af18ecfd065336c7a6978a11512a7eb_8ae2ab0464f0ac96a7fdeccbe9109d753af18ecfd065336c7a6978a11512a7eb.jsonl.gz", "strip_func_name": "sub_43FAFF", "query": "\n\n\n__int64 sub_43FAFF()\n{\n++qword_4B9CE8;\nreturn sub_44F152(0xFFFFFFFFLL);\n}\n\n\n\nQ:[sub_43FAFF,sub_44F152,]\nAssistant: ", "hints": "[]", "response": "{'sub_43FAFF': 'fn_true', 'sub_44F152': 'push_int'}"}
regcomp
639e7ba9a87f666157b0fa6d620a96d4f661aed269255221720fb5b6a597debb
EtchedPixels
CC6303
NA
int /* 0 success, otherwise REG_something */ regcomp(preg, pattern, cflags) regex_t *preg; const char *pattern; int cflags; { struct parse pa; register struct re_guts *g; register struct parse *p = &pa; register int i; register size_t len; #ifdef REDEBUG # define GOODFLAGS(f) (f) #else # define GOODFLAGS(f) ((f)&~REG_DUMP) #endif cflags = GOODFLAGS(cflags); if ((cflags&REG_EXTENDED) && (cflags&REG_NOSPEC)) return(REG_INVARG); if (cflags&REG_PEND) { if (preg->re_endp < pattern) return(REG_INVARG); len = preg->re_endp - pattern; } else len = strlen((char *)pattern); /* do the mallocs early so failure handling is easy */ g = (struct re_guts *)malloc(sizeof(struct re_guts) + (NC-1)*sizeof(cat_t)); if (g == NULL) return(REG_ESPACE); p->ssize = len/(size_t)2*(size_t)3 + (size_t)1; /* ugh */ p->strip = (sop *)malloc(p->ssize * sizeof(sop)); p->slen = 0; if (p->strip == NULL) { free((char *)g); return(REG_ESPACE); } /* set things up */ p->g = g; p->next = (char *)pattern; /* convenience; we do not modify it */ p->end = p->next + len; p->error = 0; p->ncsalloc = 0; for (i = 0; i < NPAREN; i++) { p->pbegin[i] = 0; p->pend[i] = 0; } g->csetsize = NC; g->sets = NULL; g->setbits = NULL; g->ncsets = 0; g->cflags = cflags; g->iflags = 0; g->nbol = 0; g->neol = 0; g->must = NULL; g->mlen = 0; g->nsub = 0; g->ncategories = 1; /* category 0 is "everything else" */ g->categories = &g->catspace[-(CHAR_MIN)]; (void) memset((char *)g->catspace, 0, NC*sizeof(cat_t)); g->backrefs = 0; /* do it */ EMIT(OEND, 0); g->firststate = THERE(); if (cflags&REG_EXTENDED) p_ere(p, OUT); else if (cflags&REG_NOSPEC) p_str(p); else p_bre(p, OUT, OUT); EMIT(OEND, 0); g->laststate = THERE(); /* tidy up loose ends and fill things in */ categorize(p, g); stripsnug(p, g); findmust(p, g); g->nplus = pluscount(p, g); g->magic = MAGIC2; preg->re_nsub = g->nsub; preg->re_g = g; preg->re_magic = MAGIC1; #ifndef REDEBUG /* not debugging, so can't rely on the assert() in regexec() */ if (g->iflags&BAD) SETERROR(REG_ASSERT); #endif /* win or lose, we're done */ if (p->error != 0) /* lose */ regfree(preg); return(p->error); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "regcomp", "function_addr": 4208042, "binary_name": "639e7ba9a87f666157b0fa6d620a96d4f661aed269255221720fb5b6a597debb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r13"], [3, "push r12"], [4, "push rbx"], [5, "sub rsp, 108h"], [6, "mov [rbp+var_108], rdi"], [7, "mov [rbp+s], rsi"], [8, "mov [rbp+var_114], edx"], [9, "lea r12, [rbp+var_100]"], [10, "and [rbp+var_114], 0FFFFFF7Fh"], [11, "mov eax, [rbp+var_114]"], [12, "and eax, 1"], [13, "test eax, eax"], [14, "jz short loc_403603"], [15, "mov eax, [rbp+var_114]"], [16, "and eax, 10h"], [17, "test eax, eax"], [18, "jz short loc_403603"], [19, "mov eax, 10h"], [20, "jmp loc_4038C0"], [21, "mov eax, [rbp+var_114]"], [22, "and eax, 20h"], [23, "test eax, eax"], [24, "jz short loc_403645"], [25, "mov rax, [rbp+var_108]"], [26, "mov rax, [rax+10h]"], [27, "cmp [rbp+s], rax"], [28, "jbe short loc_40362E"], [29, "mov eax, 10h"], [30, "jmp loc_4038C0"], [31, "mov rax, [rbp+var_108]"], [32, "mov rax, [rax+10h]"], [33, "sub rax, [rbp+s]"], [34, "mov r13, rax"], [35, "jmp short loc_403657"], [36, "mov rax, [rbp+s]"], [37, "mov rdi, rax"], [38, "call _strlen"], [39, "mov r13, rax"], [40, "mov edi, 18Fh"], [41, "call _malloc"], [42, "mov rbx, rax"], [43, "test rbx, rbx"], [44, "jnz short loc_403673"], [45, "mov eax, 0Ch"], [46, "jmp loc_4038C0"], [47, "mov rdx, r13"], [48, "shr rdx, 1"], [49, "mov rax, rdx"], [50, "add rax, rax"], [51, "add rax, rdx"], [52, "add rax, 1"], [53, "mov [r12+20h], rax"], [54, "mov rax, [r12+20h]"], [55, "shl rax, 3"], [56, "mov rdi, rax"], [57, "call _malloc"], [58, "mov [r12+18h], rax"], [59, "mov qword ptr [r12+28h], 0"], [60, "mov rax, [r12+18h]"], [61, "test rax, rax"], [62, "jnz short loc_4036C6"], [63, "mov rdi, rbx"], [64, "call _free"], [65, "mov eax, 0Ch"], [66, "jmp loc_4038C0"], [67, "mov [r12+38h], rbx"], [68, "mov rax, [rbp+s]"], [69, "mov [r12], rax"], [70, "mov rax, [r12]"], [71, "add rax, r13"], [72, "mov [r12+8], rax"], [73, "mov dword ptr [r12+10h], 0"], [74, "mov dword ptr [r12+30h], 0"], [75, "mov r13d, 0"], [76, "jmp short loc_40371E"], [77, "movsxd rax, r13d"], [78, "add rax, 8"], [79, "mov qword ptr [r12+rax*8], 0"], [80, "movsxd rax, r13d"], [81, "add rax, 12h"], [82, "mov qword ptr [r12+rax*8], 0"], [83, "add r13d, 1"], [84, "cmp r13d, 9"], [85, "jle short loc_4036FC"], [86, "mov dword ptr [rbx+10h], 100h"], [87, "mov qword ptr [rbx+18h], 0"], [88, "mov qword ptr [rbx+20h], 0"], [89, "mov dword ptr [rbx+14h], 0"], [90, "mov eax, [rbp+var_114]"], [91, "mov [rbx+28h], eax"], [92, "mov dword ptr [rbx+48h], 0"], [93, "mov dword ptr [rbx+4Ch], 0"], [94, "mov dword ptr [rbx+50h], 0"], [95, "mov qword ptr [rbx+60h], 0"], [96, "mov dword ptr [rbx+68h], 0"], [97, "mov qword ptr [rbx+70h], 0"], [98, "mov dword ptr [rbx+54h], 1"], [99, "lea rax, [rbx+108h]"], [100, "mov [rbx+58h], rax"], [101, "lea rax, [rbx+88h]"], [102, "mov edx, 100h"], [103, "mov esi, 0"], [104, "mov rdi, rax"], [105, "call _memset"], [106, "mov dword ptr [rbx+78h], 0"], [107, "mov edx, 0"], [108, "mov esi, 4000000h"], [109, "mov rdi, r12"], [110, "call sub_4060F4"], [111, "mov rax, [r12+28h]"], [112, "sub rax, 1"], [113, "mov [rbx+38h], rax"], [114, "mov eax, [rbp+var_114]"], [115, "and eax, 1"], [116, "test eax, eax"], [117, "jz short loc_4037E4"], [118, "mov esi, 80h"], [119, "mov rdi, r12"], [120, "call sub_4038CE"], [121, "jmp short loc_40380D"], [122, "mov eax, [rbp+var_114]"], [123, "and eax, 10h"], [124, "test eax, eax"], [125, "jz short loc_4037FB"], [126, "mov rdi, r12"], [127, "call sub_404068"], [128, "jmp short loc_40380D"], [129, "mov edx, 80h"], [130, "mov esi, 80h"], [131, "mov rdi, r12"], [132, "call sub_4040BF"], [133, "mov edx, 0"], [134, "mov esi, 4000000h"], [135, "mov rdi, r12"], [136, "call sub_4060F4"], [137, "mov rax, [r12+28h]"], [138, "sub rax, 1"], [139, "mov [rbx+40h], rax"], [140, "mov rsi, rbx"], [141, "mov rdi, r12"], [142, "call sub_405FB3"], [143, "mov rsi, rbx"], [144, "mov rdi, r12"], [145, "call sub_406340"], [146, "mov rsi, rbx"], [147, "mov rdi, r12"], [148, "call sub_40639C"], [149, "mov rsi, rbx"], [150, "mov rdi, r12"], [151, "call sub_40659A"], [152, "mov [rbx+80h], rax"], [153, "mov dword ptr [rbx], 0D245h"], [154, "mov rdx, [rbx+70h]"], [155, "mov rax, [rbp+var_108]"], [156, "mov [rax+8], rdx"], [157, "mov rax, [rbp+var_108]"], [158, "mov [rax+18h], rbx"], [159, "mov rax, [rbp+var_108]"], [160, "mov dword ptr [rax], 0F265h"], [161, "mov eax, [rbx+48h]"], [162, "and eax, 4"], [163, "test eax, eax"], [164, "jz short loc_4038A3"], [165, "mov esi, 0Fh"], [166, "mov rdi, r12"], [167, "call sub_405893"], [168, "mov eax, [r12+10h]"], [169, "test eax, eax"], [170, "jz short loc_4038BB"], [171, "mov rax, [rbp+var_108]"], [172, "mov rdi, rax"], [173, "call regfree"], [174, "mov eax, [r12+10h]"], [175, "add rsp, 108h"], [176, "pop rbx"], [177, "pop r12"], [178, "pop r13"], [179, "pop rbp"], [180, "retn"]], "data_dep": [[10, 8], [11, 10], [12, 11], [13, 12], [14, 13], [15, 10], [16, 15], [17, 16], [18, 17], [21, 10], [22, 21], [23, 22], [24, 23], [25, 6], [26, 25], [27, 26], [27, 7], [28, 27], [31, 6], [32, 31], [33, 7], [33, 32], [34, 33], [36, 7], [37, 36], [39, 38], [42, 41], [43, 42], [44, 43], [47, 34], [47, 39], [48, 47], [49, 48], [50, 49], [51, 50], [51, 48], [52, 51], [53, 9], [53, 52], [54, 53], [54, 9], [55, 54], [56, 55], [58, 9], [58, 57], [59, 9], [60, 9], [60, 59], [60, 58], [61, 60], [62, 61], [63, 43], [67, 43], [67, 9], [68, 7], [69, 9], [69, 68], [70, 9], [70, 69], [71, 39], [71, 34], [71, 70], [72, 71], [72, 9], [73, 9], [74, 9], [77, 83], [77, 75], [78, 77], [79, 78], [80, 83], [80, 75], [81, 80], [82, 81], [83, 75], [83, 83], [84, 75], [84, 83], [85, 84], [86, 43], [87, 43], [88, 43], [89, 43], [90, 10], [91, 43], [91, 90], [92, 43], [93, 43], [94, 43], [95, 43], [96, 43], [97, 43], [98, 43], [99, 90], [99, 98], [99, 43], [100, 43], [100, 99], [101, 99], [101, 43], [101, 100], [104, 101], [106, 43], [109, 9], [111, 9], [111, 59], [111, 106], [112, 111], [113, 112], [113, 43], [114, 10], [115, 114], [116, 115], [117, 116], [119, 9], [122, 10], [123, 122], [124, 123], [125, 124], [126, 9], [131, 9], [135, 9], [137, 74], [137, 95], [137, 58], [137, 113], [137, 67], [137, 88], [137, 152], [137, 97], [137, 106], [137, 53], [137, 92], [137, 156], [137, 94], [137, 158], [137, 69], [137, 87], [137, 96], [137, 160], [137, 89], [137, 153], [137, 98], [137, 9], [137, 73], [137, 82], [137, 91], [137, 100], [137, 139], [137, 93], [137, 59], [137, 86], [137, 79], [137, 72], [138, 137], [139, 43], [139, 138], [140, 43], [141, 9], [143, 43], [144, 9], [146, 43], [147, 9], [149, 43], [150, 9], [152, 151], [152, 43], [153, 43], [154, 97], [154, 153], [154, 43], [155, 6], [156, 154], [156, 155], [157, 6], [158, 157], [158, 43], [159, 6], [160, 159], [161, 92], [161, 160], [161, 43], [162, 161], [163, 162], [164, 163], [166, 9], [168, 89], [168, 153], [168, 98], [168, 9], [168, 73], [168, 82], [168, 91], [168, 100], [168, 139], [168, 93], [168, 59], [168, 86], [168, 95], [168, 79], [168, 88], [168, 152], [168, 97], [168, 72], [168, 74], [168, 113], [168, 58], [168, 67], [168, 106], [168, 69], [168, 53], [168, 92], [168, 156], [168, 158], [168, 94], [168, 87], [168, 96], [168, 160], [169, 168], [170, 169], [171, 6], [172, 171], [174, 87], [174, 96], [174, 160], [174, 59], [174, 89], [174, 153], [174, 98], [174, 9], [174, 73], [174, 82], [174, 91], [174, 100], [174, 139], [174, 93], [174, 86], [174, 95], [174, 79], [174, 88], [174, 152], [174, 97], [174, 72], [174, 74], [174, 113], [174, 58], [174, 67], [174, 106], [174, 69], [174, 53], [174, 92], [174, 156], [174, 94], [174, 158], [175, 5], [176, 4], [177, 3], [178, 2], [179, 0], [180, 29], [180, 45], [180, 65], [180, 19], [180, 174]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/639e7ba9a87f666157b0fa6d620a96d4f661aed269255221720fb5b6a597debb_639e7ba9a87f666157b0fa6d620a96d4f661aed269255221720fb5b6a597debb.jsonl.gz", "strip_func_name": "regcomp", "query": "\n\n\n__int64 __fastcall regcomp(__int64 a1, const char *a2, int a3)\n{\n__int64 result; // rax\nsize_t v4; // r13\n_DWORD *v5; // rbx\nint i; // er13\nunsigned int v7; // [rsp+Ch] [rbp-114h]\n_QWORD v8[2]; // [rsp+20h] [rbp-100h] BYREF\nunsigned int v9; // [rsp+30h] [rbp-F0h]\nvoid *v10; // [rsp+38h] [rbp-E8h]\nsize_t v11; // [rsp+40h] [rbp-E0h]\n__int64 v12; // [rsp+48h] [rbp-D8h]\nint v13; // [rsp+50h] [rbp-D0h]\n_DWORD *v14; // [rsp+58h] [rbp-C8h]\n\nv7 = a3 & 0xFFFFFF7F;\nif ( (a3 & 1) != 0 && (a3 & 0x10) != 0 )\nreturn 16LL;\nif ( (a3 & 0x20) != 0 )\n{\nif ( (unsigned __int64)a2 > *(_QWORD *)(a1 + 16) )\nreturn 16LL;\nv4 = *(_QWORD *)(a1 + 16) - (_QWORD)a2;\n}\nelse\n{\nv4 = strlen(a2);\n}\nv5 = malloc(0x18FuLL);\nif ( !v5 )\nreturn 12LL;\nv11 = 3 * (v4 >> 1) + 1;\nv10 = malloc(8 * v11);\nv12 = 0LL;\nif ( v10 )\n{\nv14 = v5;\nv8[0] = a2;\nv8[1] = &a2[v4];\nv9 = 0;\nv13 = 0;\nfor ( i = 0; i <= 9; ++i )\n{\nv8[i + 8] = 0LL;\nv8[i + 18] = 0LL;\n}\nv5[4] = 256;\n*((_QWORD *)v5 + 3) = 0LL;\n*((_QWORD *)v5 + 4) = 0LL;\nv5[5] = 0;\nv5[10] = v7;\nv5[18] = 0;\nv5[19] = 0;\nv5[20] = 0;\n*((_QWORD *)v5 + 12) = 0LL;\nv5[26] = 0;\n*((_QWORD *)v5 + 14) = 0LL;\nv5[21] = 1;\n*((_QWORD *)v5 + 11) = v5 + 66;\nmemset(v5 + 34, 0, 0x100uLL);\nv5[30] = 0;\nsub_4060F4(v8, 0x4000000LL, 0LL);\n*((_QWORD *)v5 + 7) = v12 - 1;\nif ( (v7 & 1) != 0 )\n{\nsub_4038CE(v8, 128LL);\n}\nelse if ( (v7 & 0x10) != 0 )\n{\nsub_404068(v8);\n}\nelse\n{\nsub_4040BF(v8, 128LL, 128LL);\n}\nsub_4060F4(v8, 0x4000000LL, 0LL);\n*((_QWORD *)v5 + 8) = v12 - 1;\nsub_405FB3(v8, v5);\nsub_406340(v8, v5);\nsub_40639C(v8, v5);\n*((_QWORD *)v5 + 16) = sub_40659A(v8, v5);\n*v5 = 53829;\n*(_QWORD *)(a1 + 8) = *((_QWORD *)v5 + 14);\n*(_QWORD *)(a1 + 24) = v5;\n*(_DWORD *)a1 = 62053;\nif ( (v5[18] & 4) != 0 )\nsub_405893(v8, 15LL);\nif ( v9 )\nregfree(a1);\nresult = v9;\n}\nelse\n{\nfree(v5);\nresult = 12LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v8,sub_4060F4,sub_4038CE,sub_404068,sub_4040BF,sub_405FB3,sub_406340,sub_40639C,sub_40659A,sub_405893,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'cflags', 'a1': 'preg', 'a2': 'pattern', 'v8': 'pa', 'sub_4060F4': 'doemit', 'sub_4038CE': 'p_ere', 'sub_404068': 'p_str', 'sub_4040BF': 'p_bre', 'sub_405FB3': 'categorize', 'sub_406340': 'stripsnug', 'sub_40639C': 'findmust', 'sub_40659A': 'pluscount', 'sub_405893': 'seterr'}"}