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
sk_interface_fd
b881a36ac1042d08a153dc6d79e8af7857537b515a74f12df247ec16fc2fe0b7
nxp-archive
openil_linuxptp
NA
int sk_interface_fd(void) { int fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); if (fd < 0) { pr_err("socket failed: %m"); return -1; } return fd; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40D9A9", "function_addr": 4250025, "binary_name": "b881a36ac1042d08a153dc6d79e8af7857537b515a74f12df247ec16fc2fe0b7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov edx, 11h"], [4, "mov esi, 2"], [5, "mov edi, 2"], [6, "call _socket"], [7, "mov [rbp+var_4], eax"], [8, "cmp [rbp+var_4], 0"], [9, "jns short loc_40D9E9"], [10, "mov esi, offset aSocketFailedM"], [11, "mov edi, 3"], [12, "mov eax, 0"], [13, "call sub_40B47F"], [14, "mov eax, 0FFFFFFFFh"], [15, "jmp short locret_40D9EC"], [16, "mov eax, [rbp+var_4]"], [17, "leave"], [18, "retn"]], "data_dep": [[7, 6], [8, 7], [9, 8], [16, 7], [18, 16], [18, 14]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/b881a36ac1042d08a153dc6d79e8af7857537b515a74f12df247ec16fc2fe0b7_b881a36ac1042d08a153dc6d79e8af7857537b515a74f12df247ec16fc2fe0b7.jsonl.gz", "strip_func_name": "sub_40D9A9", "query": "\n\n\n__int64 sub_40D9A9()\n{\n__int64 v0; // rdx\n__int64 v1; // rcx\n__int64 v2; // r8\n__int64 v3; // r9\nint v5; // [rsp+Ch] [rbp-4h]\n\nv5 = socket(2, 2, 17);\nif ( v5 >= 0 )\nreturn (unsigned int)v5;\nsub_40B47F(3, \"socket failed: %m\", v0, v1, v2, v3);\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[v5,sub_40D9A9,sub_40B47F,]\nAssistant: ", "hints": "[]", "response": "{'v5': 'fd', 'sub_40D9A9': 'sk_interface_fd', 'sub_40B47F': 'print'}"}
_test_trim
172a2b2342ca5d634b41adc44c9b662352f1c3d83f55ee5a5030612ff100beeb
noporpoise
seq-align
NA
void _test_trim(const char *str, const char *ans) { StrBuf *sbuf = strbuf_create(str); strbuf_trim(sbuf); ASSERT(strcmp(sbuf->b, ans) == 0); ASSERT(sbuf->end == strlen(sbuf->b)); ASSERT(sbuf->end < sbuf->size); strbuf_free(sbuf); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_412A2D", "function_addr": 4270637, "binary_name": "172a2b2342ca5d634b41adc44c9b662352f1c3d83f55ee5a5030612ff100beeb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 28h"], [4, "mov [rbp+var_28], rdi"], [5, "mov [rbp+s2], rsi"], [6, "mov rax, [rbp+var_28]"], [7, "mov rdi, rax"], [8, "call sub_415D46"], [9, "mov [rbp+var_18], rax"], [10, "mov rax, [rbp+var_18]"], [11, "mov rdi, rax"], [12, "call sub_417742"], [13, "mov rax, [rbp+var_18]"], [14, "mov rax, [rax]"], [15, "mov rdx, [rbp+s2]"], [16, "mov rsi, rdx"], [17, "mov rdi, rax"], [18, "call _strcmp"], [19, "test eax, eax"], [20, "jnz short loc_412A88"], [21, "mov rax, cs:qword_41F218"], [22, "add rax, 1"], [23, "mov cs:qword_41F218, rax"], [24, "jmp short loc_412ABF"], [25, "mov ecx, offset aStrcmpSbufBAns"], [26, "mov edx, 529h"], [27, "mov esi, offset aStrbufTestC"], [28, "mov edi, offset aFailedAssertSI"], [29, "mov eax, 0"], [30, "call warn"], [31, "mov cs:byte_41F1F8, 0"], [32, "mov rax, cs:qword_41F220"], [33, "add rax, 1"], [34, "mov cs:qword_41F220, rax"], [35, "mov rax, [rbp+var_18]"], [36, "mov rbx, [rax+8]"], [37, "mov rax, [rbp+var_18]"], [38, "mov rax, [rax]"], [39, "mov rdi, rax"], [40, "call _strlen"], [41, "cmp rbx, rax"], [42, "jnz short loc_412AEF"], [43, "mov rax, cs:qword_41F218"], [44, "add rax, 1"], [45, "mov cs:qword_41F218, rax"], [46, "jmp short loc_412B26"], [47, "mov ecx, offset aSbufEndStrlenS_0"], [48, "mov edx, 52Ah"], [49, "mov esi, offset aStrbufTestC"], [50, "mov edi, offset aFailedAssertSI"], [51, "mov eax, 0"], [52, "call warn"], [53, "mov cs:byte_41F1F8, 0"], [54, "mov rax, cs:qword_41F220"], [55, "add rax, 1"], [56, "mov cs:qword_41F220, rax"], [57, "mov rax, [rbp+var_18]"], [58, "mov rdx, [rax+8]"], [59, "mov rax, [rbp+var_18]"], [60, "mov rax, [rax+10h]"], [61, "cmp rdx, rax"], [62, "jnb short loc_412B4F"], [63, "mov rax, cs:qword_41F218"], [64, "add rax, 1"], [65, "mov cs:qword_41F218, rax"], [66, "jmp short loc_412B86"], [67, "mov ecx, offset aSbufEndSbufSiz_0"], [68, "mov edx, 52Bh"], [69, "mov esi, offset aStrbufTestC"], [70, "mov edi, offset aFailedAssertSI"], [71, "mov eax, 0"], [72, "call warn"], [73, "mov cs:byte_41F1F8, 0"], [74, "mov rax, cs:qword_41F220"], [75, "add rax, 1"], [76, "mov cs:qword_41F220, rax"], [77, "mov rax, [rbp+var_18]"], [78, "mov rdi, rax"], [79, "call sub_403BC2"], [80, "nop"], [81, "mov rbx, [rbp+var_8]"], [82, "leave"], [83, "retn"]], "data_dep": [[6, 4], [7, 6], [9, 8], [10, 9], [11, 10], [13, 9], [14, 13], [15, 5], [16, 15], [17, 14], [19, 18], [20, 19], [22, 21], [23, 22], [33, 32], [34, 33], [35, 9], [36, 35], [37, 9], [38, 37], [39, 38], [41, 40], [41, 36], [42, 41], [43, 23], [44, 43], [45, 44], [54, 34], [55, 54], [56, 55], [57, 9], [58, 57], [59, 9], [60, 59], [61, 58], [61, 60], [62, 61], [63, 45], [63, 23], [64, 63], [65, 64], [74, 56], [74, 34], [75, 74], [76, 75], [77, 9], [78, 77], [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/172a2b2342ca5d634b41adc44c9b662352f1c3d83f55ee5a5030612ff100beeb_172a2b2342ca5d634b41adc44c9b662352f1c3d83f55ee5a5030612ff100beeb.jsonl.gz", "strip_func_name": "sub_412A2D", "query": "\n\n\nvoid __fastcall sub_412A2D(__int64 a1, const char *a2)\n{\n__int64 v2; // r8\n__int64 v3; // r9\n__int64 v4; // rbx\n__int64 v5; // r8\n__int64 v6; // r9\n__int64 v7; // [rsp+18h] [rbp-18h]\n\nv7 = sub_415D46(a1);\nsub_417742(v7);\nif ( !strcmp(*(const char **)v7, a2) )\n{\n++qword_41F218;\n}\nelse\n{\nwarn(\"failed assert [%s:%i] %s\", (__int64)\"strbuf_test.c\", 1321LL, (__int64)\"strcmp(sbuf->b, ans) == 0\", v2, v3);\nbyte_41F1F8 = 0;\n++qword_41F220;\n}\nv4 = *(_QWORD *)(v7 + 8);\nif ( v4 == strlen(*(const char **)v7) )\n{\n++qword_41F218;\n}\nelse\n{\nwarn(\"failed assert [%s:%i] %s\", (__int64)\"strbuf_test.c\", 1322LL, (__int64)\"sbuf->end == strlen(sbuf->b)\", v5, v6);\nbyte_41F1F8 = 0;\n++qword_41F220;\n}\nif ( *(_QWORD *)(v7 + 8) >= *(_QWORD *)(v7 + 16) )\n{\nwarn(\"failed assert [%s:%i] %s\", (__int64)\"strbuf_test.c\", 1323LL, (__int64)\"sbuf->end < sbuf->size\", v5, v6);\nbyte_41F1F8 = 0;\n++qword_41F220;\n}\nelse\n{\n++qword_41F218;\n}\nsub_403BC2((void **)v7);\n}\n\n\n\nQ:[a1,a2,v7,sub_412A2D,sub_415D46,sub_417742,sub_403BC2,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'str', 'a2': 'ans', 'v7': 'sbuf', 'sub_412A2D': '_test_trim', 'sub_415D46': 'strbuf_create', 'sub_417742': 'strbuf_trim', 'sub_403BC2': 'strbuf_free'}"}
compare_double_double
34d708bcb60d5af2e39328b237b23bc6bb4df80dc158ca9262fb4bf1d3328aba
janet-lang
janet
NA
static int compare_double_double(double x, double y) { return (x < y) ? -1 : ((x > y) ? 1 : 0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42EF93", "function_addr": 4386707, "binary_name": "34d708bcb60d5af2e39328b237b23bc6bb4df80dc158ca9262fb4bf1d3328aba.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "movsd [rbp+var_8], xmm0"], [3, "movsd [rbp+var_10], xmm1"], [4, "movsd xmm0, [rbp+var_10]"], [5, "comisd xmm0, [rbp+var_8]"], [6, "jbe short loc_42EFB4"], [7, "mov eax, 0FFFFFFFFh"], [8, "jmp short loc_42EFC4"], [9, "movsd xmm0, [rbp+var_8]"], [10, "comisd xmm0, [rbp+var_10]"], [11, "setnbe al"], [12, "movzx eax, al"], [13, "pop rbp"], [14, "retn"]], "data_dep": [[4, 3], [5, 4], [5, 2], [9, 2], [10, 3], [10, 9], [12, 11], [13, 0], [14, 7], [14, 12]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/34d708bcb60d5af2e39328b237b23bc6bb4df80dc158ca9262fb4bf1d3328aba_34d708bcb60d5af2e39328b237b23bc6bb4df80dc158ca9262fb4bf1d3328aba.jsonl.gz", "strip_func_name": "sub_42EF93", "query": "\n\n\n__int64 __fastcall sub_42EF93(double a1, double a2)\n{\n__int64 result; // rax\n\nif ( a2 <= a1 )\nresult = a1 > a2;\nelse\nresult = 0xFFFFFFFFLL;\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_42EF93,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'x', 'a2': 'y', 'sub_42EF93': 'compare_double_double'}"}
statement_expr_test
99d8712cbbfe274c938e7547310841d0b1586a69ff267bc04c703b785905dcc7
LuaDist
tcc
NA
void statement_expr_test(void) { int a, i; a = 0; for(i=0;i<10;i++) { a += 1 + ( { int b, j; b = 0; for(j=0;j<5;j++) b += j; b; } ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406645", "function_addr": 4220485, "binary_name": "99d8712cbbfe274c938e7547310841d0b1586a69ff267bc04c703b785905dcc7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], 0"], [4, "mov [rbp+var_8], 0"], [5, "jmp short loc_40668A"], [6, "mov [rbp+var_C], 0"], [7, "mov [rbp+var_10], 0"], [8, "jmp short loc_406677"], [9, "mov eax, [rbp+var_10]"], [10, "add [rbp+var_C], eax"], [11, "add [rbp+var_10], 1"], [12, "cmp [rbp+var_10], 4"], [13, "jle short loc_40666D"], [14, "mov eax, [rbp+var_C]"], [15, "add eax, 1"], [16, "add [rbp+var_4], eax"], [17, "add [rbp+var_8], 1"], [18, "cmp [rbp+var_8], 9"], [19, "jle short loc_40665D"], [20, "mov eax, [rbp+var_4]"], [21, "mov esi, eax"], [22, "mov edi, offset aAD"], [23, "mov eax, 0"], [24, "call _printf"], [25, "nop"], [26, "leave"], [27, "retn"]], "data_dep": [[9, 11], [9, 7], [10, 6], [10, 9], [10, 10], [11, 11], [11, 7], [12, 7], [12, 11], [13, 12], [14, 10], [14, 6], [15, 14], [16, 16], [16, 3], [16, 15], [17, 17], [17, 4], [18, 17], [18, 4], [19, 18], [20, 16], [20, 3], [21, 20], [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/99d8712cbbfe274c938e7547310841d0b1586a69ff267bc04c703b785905dcc7_99d8712cbbfe274c938e7547310841d0b1586a69ff267bc04c703b785905dcc7.jsonl.gz", "strip_func_name": "sub_406645", "query": "\n\n\nint sub_406645()\n{\nint j; // [rsp+0h] [rbp-10h]\nint v2; // [rsp+4h] [rbp-Ch]\nint i; // [rsp+8h] [rbp-8h]\nunsigned int v4; // [rsp+Ch] [rbp-4h]\n\nv4 = 0;\nfor ( i = 0; i <= 9; ++i )\n{\nv2 = 0;\nfor ( j = 0; j <= 4; ++j )\nv2 += j;\nv4 += v2 + 1;\n}\nreturn printf(\"a=%d\\n\", v4);\n}\n\n\n\nQ:[v2,v4,sub_406645,]\nAssistant: ", "hints": "[]", "response": "{'v2': 'b', 'v4': 'a', 'sub_406645': 'statement_expr_test'}"}
check_buffer
1d2464e15ddd3dd6b5b5796f52af69985739bec93ed2d4b96db23109c584a00d
C-Chads
tinygl
NA
static GLint check_buffer(GLint handle) { GLContext* c = gl_get_context(); GLSharedState* s = &(c->shared_state); if (handle == 0 || handle > MAX_BUFFERS) return 2; handle--; if (s->buffers[handle]) return 1; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43B553", "function_addr": 4437331, "binary_name": "1d2464e15ddd3dd6b5b5796f52af69985739bec93ed2d4b96db23109c584a00d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 18h"], [3, "mov [rbp+var_14], edi"], [4, "call sub_43B007"], [5, "mov [rbp+var_8], rax"], [6, "mov rax, [rbp+var_8]"], [7, "add rax, 0D50h"], [8, "mov [rbp+var_10], rax"], [9, "cmp [rbp+var_14], 0"], [10, "jz short loc_43B584"], [11, "cmp [rbp+var_14], 800h"], [12, "jle short loc_43B58B"], [13, "mov eax, 2"], [14, "jmp short locret_43B5B7"], [15, "sub [rbp+var_14], 1"], [16, "mov rax, [rbp+var_10]"], [17, "mov rdx, [rax+10h]"], [18, "mov eax, [rbp+var_14]"], [19, "cdqe"], [20, "shl rax, 3"], [21, "add rax, rdx"], [22, "mov rax, [rax]"], [23, "test rax, rax"], [24, "jz short loc_43B5B2"], [25, "mov eax, 1"], [26, "jmp short locret_43B5B7"], [27, "mov eax, 0"], [28, "leave"], [29, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 7], [9, 3], [10, 9], [11, 3], [12, 11], [15, 3], [16, 8], [17, 16], [18, 15], [20, 18], [21, 17], [21, 20], [22, 21], [23, 22], [24, 23], [29, 13], [29, 25], [29, 27]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1d2464e15ddd3dd6b5b5796f52af69985739bec93ed2d4b96db23109c584a00d_1d2464e15ddd3dd6b5b5796f52af69985739bec93ed2d4b96db23109c584a00d.jsonl.gz", "strip_func_name": "sub_43B553", "query": "\n\n\n__int64 __fastcall sub_43B553(int a1)\n{\n__int64 result; // rax\nchar *v2; // [rsp+8h] [rbp-10h]\n\nv2 = (char *)sub_43B007() + 3408;\nif ( a1 && a1 <= 2048 )\nresult = *(_QWORD *)(*((_QWORD *)v2 + 2) + 8LL * (a1 - 1)) != 0LL;\nelse\nresult = 2LL;\nreturn result;\n}\n\n\n\nQ:[a1,v2,sub_43B553,sub_43B007,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'handle', 'v2': 's', 'sub_43B553': 'check_buffer', 'sub_43B007': 'gl_get_context_12'}"}
xdr_qcsapi_wifi_get_supported_tx_power_levels_rpcdata
501cccf918b79847e8ca63bec31f6c1a738c67ece900875150908962c3feed30
coolsnowwolf
lede
NA
bool_t xdr_qcsapi_wifi_get_supported_tx_power_levels_rpcdata (XDR *xdrs, qcsapi_wifi_get_supported_tx_power_levels_rpcdata *objp) { register int32_t *buf; if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) return FALSE; if (!xdr_pointer (xdrs, (char **)&objp->available_percentages, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) return FALSE; if (!xdr_int (xdrs, &objp->return_code)) return FALSE; return TRUE; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_439A0F", "function_addr": 4430351, "binary_name": "501cccf918b79847e8ca63bec31f6c1a738c67ece900875150908962c3feed30.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+xdrs], rdi"], [4, "mov [rbp+objpp], rsi"], [5, "mov rsi, [rbp+objpp]"], [6, "mov rax, [rbp+xdrs]"], [7, "mov rdx, offset xdr_obj"], [8, "mov rcx, rdx"], [9, "mov edx, 8"], [10, "mov rdi, rax"], [11, "call _xdr_pointer"], [12, "test eax, eax"], [13, "jnz short loc_439A49"], [14, "mov eax, 0"], [15, "jmp short locret_439A9E"], [16, "mov rax, [rbp+objpp]"], [17, "lea rsi, [rax+8]"], [18, "mov rax, [rbp+xdrs]"], [19, "mov rdx, offset xdr_obj"], [20, "mov rcx, rdx"], [21, "mov edx, 8"], [22, "mov rdi, rax"], [23, "call _xdr_pointer"], [24, "test eax, eax"], [25, "jnz short loc_439A77"], [26, "mov eax, 0"], [27, "jmp short locret_439A9E"], [28, "mov rax, [rbp+objpp]"], [29, "lea rdx, [rax+10h]"], [30, "mov rax, [rbp+xdrs]"], [31, "mov rsi, rdx"], [32, "mov rdi, rax"], [33, "call xdr_int"], [34, "test eax, eax"], [35, "jnz short loc_439A99"], [36, "mov eax, 0"], [37, "jmp short locret_439A9E"], [38, "mov eax, 1"], [39, "leave"], [40, "retn"]], "data_dep": [[5, 4], [6, 3], [8, 7], [10, 6], [12, 11], [13, 12], [16, 4], [17, 5], [17, 16], [18, 3], [20, 19], [22, 18], [24, 23], [25, 24], [28, 4], [29, 28], [29, 21], [30, 3], [31, 29], [32, 30], [34, 33], [35, 34], [40, 14], [40, 26], [40, 38], [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/501cccf918b79847e8ca63bec31f6c1a738c67ece900875150908962c3feed30_501cccf918b79847e8ca63bec31f6c1a738c67ece900875150908962c3feed30.jsonl.gz", "strip_func_name": "sub_439A0F", "query": "\n\n\n_BOOL8 __fastcall sub_439A0F(XDR *a1, void *a2)\n{\nif ( !xdr_pointer(a1, (char **)a2, 8u, (xdrproc_t)xdr_obj) )\nreturn 0LL;\nif ( xdr_pointer(a1, (char **)a2 + 1, 8u, (xdrproc_t)xdr_obj) )\nreturn xdr_int(a1, (int *)a2 + 4) != 0;\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,sub_439A0F,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'xdrs', 'a2': 'objp', 'sub_439A0F': 'xdr_qcsapi_wifi_get_supported_tx_power_levels_rpcdata'}"}
dsk_chsel
c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7
open-simh
simh
NA
t_stat dsk_chsel (uint32 ch, uint32 sel, uint32 unit) { uint32 u; dsk_ch = ch; if (dsk_sta != DSK_IDLE) /* not idle? seq check */ dsk_uend (ch, DSKS_INVS); switch (sel) { case CHSL_CTL: /* control */ ch_req |= REQ_CH (ch); /* request channel */ break; case CHSL_SNS: /* sense */ if (sim_is_active (&dsk_unit[DSK_SNS])) /* already sensing? */ return dsk_uend (ch, DSKS_INVS); /* sequence error */ sim_activate (&dsk_unit[DSK_SNS], dsk_ctime); /* set timer */ dsk_stop = 0; break; case CHSL_RDS: /* read */ if (dsk_mode == DSKC_WFMT) /* write format? */ return dsk_uend (ch, DSKS_INVS); /* sequence error */ case CHSL_WRS: /* write */ if (dsk_mode == 0) /* no mode? seq check */ dsk_uend (ch, DSKS_INVS); if (dsk_mode == DSKC_WFMT) /* format? fake sel */ sel = CHSL_FMT; u = (dsk_acc * DSK_NUMDR) + dsk_mod; /* access unit number */ if (sim_is_active (&dsk_unit[u])) /* access in use? */ return dsk_uend (ch, DSKS_ACCN); /* access not ready */ sim_activate (&dsk_unit[u], dsk_rtime); /* rotational time */ break; default: /* other */ return STOP_ILLIOP; } dsk_sta = sel; /* set new state */ return SCPE_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41315C", "function_addr": 4272476, "binary_name": "c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_14], edi"], [4, "mov [rbp+var_18], esi"], [5, "mov [rbp+var_1C], edx"], [6, "mov eax, [rbp+var_14]"], [7, "mov cs:dword_4E274C, eax"], [8, "mov eax, cs:dword_50F728"], [9, "test eax, eax"], [10, "jz short loc_413194"], [11, "mov eax, [rbp+var_14]"], [12, "mov rsi, 10000000000000h"], [13, "mov edi, eax"], [14, "call sub_414A98"], [15, "cmp [rbp+var_18], 4"], [16, "jz short loc_4131C9"], [17, "cmp [rbp+var_18], 4"], [18, "ja loc_413304"], [19, "cmp [rbp+var_18], 3"], [20, "jz short loc_4131E8"], [21, "cmp [rbp+var_18], 3"], [22, "ja loc_413304"], [23, "cmp [rbp+var_18], 1"], [24, "jz short loc_413230"], [25, "cmp [rbp+var_18], 2"], [26, "jz loc_413254"], [27, "jmp loc_413304"], [28, "mov eax, [rbp+var_14]"], [29, "mov edx, 1"], [30, "mov ecx, eax"], [31, "shl edx, cl"], [32, "mov eax, cs:dword_4FACE8"], [33, "or eax, edx"], [34, "mov cs:dword_4FACE8, eax"], [35, "jmp loc_41330B"], [36, "mov edi, offset unk_4E3C20"], [37, "call sub_4363ED"], [38, "test eax, eax"], [39, "jz short loc_41320F"], [40, "mov eax, [rbp+var_14]"], [41, "mov rsi, 10000000000000h"], [42, "mov edi, eax"], [43, "call sub_414A98"], [44, "jmp locret_413319"], [45, "mov eax, cs:dword_4E2750"], [46, "mov esi, eax"], [47, "mov edi, offset unk_4E3C20"], [48, "call sub_435B1D"], [49, "mov cs:dword_50F740, 0"], [50, "jmp loc_41330B"], [51, "mov eax, cs:dword_50F72C"], [52, "cmp eax, 3"], [53, "jnz short loc_413254"], [54, "mov eax, [rbp+var_14]"], [55, "mov rsi, 10000000000000h"], [56, "mov edi, eax"], [57, "call sub_414A98"], [58, "jmp locret_413319"], [59, "mov eax, cs:dword_50F72C"], [60, "test eax, eax"], [61, "jnz short loc_413272"], [62, "mov eax, [rbp+var_14]"], [63, "mov rsi, 10000000000000h"], [64, "mov edi, eax"], [65, "call sub_414A98"], [66, "mov eax, cs:dword_50F72C"], [67, "cmp eax, 3"], [68, "jnz short loc_413284"], [69, "mov [rbp+var_18], 5"], [70, "mov edx, cs:dword_50F720"], [71, "mov eax, edx"], [72, "shl eax, 2"], [73, "add eax, edx"], [74, "add eax, eax"], [75, "mov edx, eax"], [76, "mov eax, cs:dword_50F724"], [77, "add eax, edx"], [78, "mov [rbp+var_4], eax"], [79, "mov edx, [rbp+var_4]"], [80, "mov rax, rdx"], [81, "shl rax, 5"], [82, "add rax, rdx"], [83, "shl rax, 3"], [84, "add rax, 4E2780h"], [85, "mov rdi, rax"], [86, "call sub_4363ED"], [87, "test eax, eax"], [88, "jz short loc_4132D9"], [89, "mov eax, [rbp+var_14]"], [90, "mov rsi, 4000000000h"], [91, "mov edi, eax"], [92, "call sub_414A98"], [93, "jmp short locret_413319"], [94, "mov eax, cs:dword_4E2758"], [95, "mov ecx, eax"], [96, "mov edx, [rbp+var_4]"], [97, "mov rax, rdx"], [98, "shl rax, 5"], [99, "add rax, rdx"], [100, "shl rax, 3"], [101, "add rax, 4E2780h"], [102, "mov esi, ecx"], [103, "mov rdi, rax"], [104, "call sub_435B1D"], [105, "jmp short loc_41330B"], [106, "mov eax, 0Dh"], [107, "jmp short locret_413319"], [108, "mov eax, [rbp+var_18]"], [109, "mov cs:dword_50F728, eax"], [110, "mov eax, 0"], [111, "leave"], [112, "retn"]], "data_dep": [[6, 3], [7, 6], [9, 8], [10, 9], [11, 3], [13, 11], [15, 4], [16, 15], [17, 4], [18, 17], [19, 4], [20, 19], [21, 4], [22, 21], [23, 4], [24, 23], [25, 4], [26, 25], [28, 3], [30, 28], [31, 29], [31, 30], [33, 31], [33, 32], [34, 33], [38, 37], [39, 38], [40, 3], [42, 40], [46, 45], [52, 51], [53, 52], [54, 3], [56, 54], [60, 59], [61, 60], [62, 3], [64, 62], [67, 66], [68, 67], [71, 70], [72, 71], [73, 70], [73, 72], [74, 73], [75, 74], [77, 76], [77, 75], [78, 77], [79, 78], [80, 79], [81, 80], [82, 79], [82, 81], [83, 82], [84, 83], [85, 84], [87, 86], [88, 87], [89, 3], [91, 89], [95, 94], [96, 78], [97, 96], [98, 97], [99, 96], [99, 98], [100, 99], [101, 100], [102, 95], [103, 101], [108, 4], [108, 69], [109, 108], [112, 57], [112, 43], [112, 106], [112, 92], [112, 110]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7_c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7.jsonl.gz", "strip_func_name": "sub_41315C", "query": "\n\n\n__int64 __fastcall sub_41315C(unsigned int a1, unsigned int a2)\n{\nint v3; // [rsp+8h] [rbp-18h]\nunsigned int v4; // [rsp+1Ch] [rbp-4h]\n\nv3 = a2;\ndword_4E274C = a1;\nif ( dword_50F728 )\nsub_414A98(a1, 0x10000000000000LL);\nif ( a2 == 4 )\n{\ndword_4FACE8 |= 1 << a1;\n}\nelse\n{\nif ( a2 > 4 )\nreturn 13LL;\nif ( a2 != 3 )\n{\nif ( a2 != 1 )\n{\nif ( a2 != 2 )\nreturn 13LL;\ngoto LABEL_14;\n}\nif ( dword_50F72C != 3 )\n{\nLABEL_14:\nif ( !dword_50F72C )\nsub_414A98(a1, 0x10000000000000LL);\nif ( dword_50F72C == 3 )\nv3 = 5;\nv4 = 10 * dword_50F720 + dword_50F724;\nif ( (unsigned int)sub_4363ED(264LL * v4 + 5121920) )\nreturn sub_414A98(a1, 0x4000000000LL);\nsub_435B1D(264LL * v4 + 5121920, (unsigned int)dword_4E2758);\ngoto LABEL_22;\n}\nreturn sub_414A98(a1, 0x10000000000000LL);\n}\nif ( (unsigned int)sub_4363ED(&unk_4E3C20) )\nreturn sub_414A98(a1, 0x10000000000000LL);\nsub_435B1D(&unk_4E3C20, (unsigned int)dword_4E2750);\ndword_50F740 = 0;\n}\nLABEL_22:\ndword_50F728 = v3;\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,v4,sub_41315C,sub_414A98,sub_4363ED,sub_435B1D,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ch_0', 'a2': 'sel', 'v3': 'sela', 'v4': 'u', 'sub_41315C': 'dsk_chsel', 'sub_414A98': 'dsk_uend', 'sub_4363ED': 'sim_is_active', 'sub_435B1D': 'sim_activate'}"}
scannumber
815e6dd565c24b174a532ad0914eeb37231588b33948a1144a50c5abe5f366b9
dariomanesku
cmftStudio
NA
ReturnCode scannumber(struct Global *global, int c, /* First char of number */ /* Output/store func: */ ReturnCode (*outfun)(struct Global *, int)) { /* * Process a number. We know that c is from 0 to 9 or dot. * Algorithm from Dave Conroy's Decus C. */ int radix; /* 8, 10, or 16 */ int expseen; /* 'e' seen in floater */ int signseen; /* '+' or '-' seen */ int octal89; /* For bad octal test */ int dotflag; /* TRUE if '.' was seen */ ReturnCode ret; char done=FALSE; expseen = FALSE; /* No exponent seen yet */ signseen = TRUE; /* No +/- allowed yet */ octal89 = FALSE; /* No bad octal yet */ radix = 10; /* Assume decimal */ if ((dotflag = (c == '.')) != FALSE) {/* . something? */ ret=(*outfun)(global, '.'); /* Always out the dot */ if(ret) return(ret); if (type[(c = get(global))] != DIG) { /* If not a float numb, */ unget(global); /* Rescan strange char */ return(FPP_OK); /* All done for now */ } } /* End of float test */ else if (c == '0') { /* Octal or hex? */ ret=(*outfun)(global, c); /* Stuff initial zero */ if(ret) return(ret); radix = 8; /* Assume it's octal */ c = get(global); /* Look for an 'x' */ if (c == 'x' || c == 'X') { /* Did we get one? */ radix = 16; /* Remember new radix */ ret=(*outfun)(global, c); /* Stuff the 'x' */ if(ret) return(ret); c = get(global); /* Get next character */ } } while (!done) { /* Process curr. char. */ /* * Note that this algorithm accepts "012e4" and "03.4" * as legitimate floating-point numbers. */ if (radix != 16 && (c == 'e' || c == 'E')) { if (expseen) /* Already saw 'E'? */ break; /* Exit loop, bad nbr. */ expseen = TRUE; /* Set exponent seen */ signseen = FALSE; /* We can read '+' now */ radix = 10; /* Decimal exponent */ } else if (radix != 16 && c == '.') { if (dotflag) /* Saw dot already? */ break; /* Exit loop, two dots */ dotflag = TRUE; /* Remember the dot */ radix = 10; /* Decimal fraction */ } else if (c == '+' || c == '-') { /* 1.0e+10 */ if (signseen) /* Sign in wrong place? */ break; /* Exit loop, not nbr. */ /* signseen = TRUE; */ /* Remember we saw it */ } else { /* Check the digit */ switch (c) { case '8': case '9': /* Sometimes wrong */ octal89 = TRUE; /* Do check later */ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': break; /* Always ok */ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': if (radix == 16) /* Alpha's are ok only */ break; /* if reading hex. */ default: /* At number end */ done=TRUE; /* Break from for loop */ continue; } /* End of switch */ } /* End general case */ ret=(*outfun)(global, c); /* Accept the character */ if(ret) return(ret); signseen = TRUE; /* Don't read sign now */ c = get(global); /* Read another char */ } /* End of scan loop */ /* * When we break out of the scan loop, c contains the first * character (maybe) not in the number. If the number is an * integer, allow a trailing 'L' for long and/or a trailing 'U' * for unsigned. If not those, push the trailing character back * on the input stream. Floating point numbers accept a trailing * 'L' for "long double". */ if (dotflag || expseen) { /* Floating point? */ if (c == 'l' || c == 'L') { ret=(*outfun)(global, c); if(ret) return(ret); c = get(global); /* Ungotten later */ } } else { /* Else it's an integer */ /* * We know that dotflag and expseen are both zero, now: * dotflag signals "saw 'L'", and * expseen signals "saw 'U'". */ done=TRUE; while(done) { switch (c) { case 'l': case 'L': if (dotflag) { done=FALSE; continue; } dotflag = TRUE; break; case 'u': case 'U': if (expseen) { done=FALSE; continue; } expseen = TRUE; break; default: done=FALSE; continue; } ret=(*outfun)(global, c); /* Got 'L' or 'U'. */ if(ret) return(ret); c = get(global); /* Look at next, too. */ } } unget(global); /* Not part of a number */ if(!(global->webmode)) { if (octal89 && radix == 8) cwarn(global, WARN_ILLEGAL_OCTAL); } return(FPP_OK); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406D8A", "function_addr": 4222346, "binary_name": "815e6dd565c24b174a532ad0914eeb37231588b33948a1144a50c5abe5f366b9.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_15], 0"], [7, "mov [rbp+var_8], 0"], [8, "mov [rbp+var_C], 1"], [9, "mov [rbp+var_10], 0"], [10, "mov [rbp+var_4], 0Ah"], [11, "cmp [rbp+var_2C], 2Eh "], [12, "setz al"], [13, "movzx eax, al"], [14, "mov [rbp+var_14], eax"], [15, "cmp [rbp+var_14], 0"], [16, "jz short loc_406E2C"], [17, "mov rax, [rbp+var_28]"], [18, "mov rdx, [rbp+var_38]"], [19, "mov esi, 2Eh "], [20, "mov rdi, rax"], [21, "call rdx"], [22, "mov [rbp+var_1C], eax"], [23, "cmp [rbp+var_1C], 0"], [24, "jz short loc_406DF3"], [25, "mov eax, [rbp+var_1C]"], [26, "jmp locret_4070F3"], [27, "mov rax, [rbp+var_28]"], [28, "mov rdi, rax"], [29, "call sub_40790E"], [30, "mov [rbp+var_2C], eax"], [31, "mov eax, [rbp+var_2C]"], [32, "cdqe"], [33, "movzx eax, byte_40E380[rax]"], [34, "cmp al, 1"], [35, "jz loc_406FB3"], [36, "mov rax, [rbp+var_28]"], [37, "mov rdi, rax"], [38, "call sub_407FCA"], [39, "mov eax, 0"], [40, "jmp locret_4070F3"], [41, "cmp [rbp+var_2C], 30h "], [42, "jnz loc_406FB3"], [43, "mov edx, [rbp+var_2C]"], [44, "mov rax, [rbp+var_28]"], [45, "mov rcx, [rbp+var_38]"], [46, "mov esi, edx"], [47, "mov rdi, rax"], [48, "call rcx"], [49, "mov [rbp+var_1C], eax"], [50, "cmp [rbp+var_1C], 0"], [51, "jz short loc_406E59"], [52, "mov eax, [rbp+var_1C]"], [53, "jmp locret_4070F3"], [54, "mov [rbp+var_4], 8"], [55, "mov rax, [rbp+var_28]"], [56, "mov rdi, rax"], [57, "call sub_40790E"], [58, "mov [rbp+var_2C], eax"], [59, "cmp [rbp+var_2C], 78h "], [60, "jz short loc_406E7F"], [61, "cmp [rbp+var_2C], 58h "], [62, "jnz loc_406FB3"], [63, "mov [rbp+var_4], 10h"], [64, "mov edx, [rbp+var_2C]"], [65, "mov rax, [rbp+var_28]"], [66, "mov rcx, [rbp+var_38]"], [67, "mov esi, edx"], [68, "mov rdi, rax"], [69, "call rcx"], [70, "mov [rbp+var_1C], eax"], [71, "cmp [rbp+var_1C], 0"], [72, "jz short loc_406EA9"], [73, "mov eax, [rbp+var_1C]"], [74, "jmp locret_4070F3"], [75, "mov rax, [rbp+var_28]"], [76, "mov rdi, rax"], [77, "call sub_40790E"], [78, "mov [rbp+var_2C], eax"], [79, "jmp loc_406FB3"], [80, "cmp [rbp+var_4], 10h"], [81, "jz short loc_406EF3"], [82, "cmp [rbp+var_2C], 65h "], [83, "jz short loc_406ECF"], [84, "cmp [rbp+var_2C], 45h "], [85, "jnz short loc_406EF3"], [86, "cmp [rbp+var_8], 0"], [87, "jnz loc_406FBF"], [88, "mov [rbp+var_8], 1"], [89, "mov [rbp+var_C], 0"], [90, "mov [rbp+var_4], 0Ah"], [91, "jmp loc_406F7A"], [92, "cmp [rbp+var_4], 10h"], [93, "jz short loc_406F19"], [94, "cmp [rbp+var_2C], 2Eh "], [95, "jnz short loc_406F19"], [96, "cmp [rbp+var_14], 0"], [97, "jnz loc_406FC2"], [98, "mov [rbp+var_14], 1"], [99, "mov [rbp+var_4], 0Ah"], [100, "jmp short loc_406F7A"], [101, "cmp [rbp+var_2C], 2Bh "], [102, "jz short loc_406F25"], [103, "cmp [rbp+var_2C], 2Dh "], [104, "jnz short loc_406F30"], [105, "cmp [rbp+var_C], 0"], [106, "jz short loc_406F7A"], [107, "jmp loc_406FC3"], [108, "cmp [rbp+var_2C], 66h "], [109, "jg short loc_406F70"], [110, "cmp [rbp+var_2C], 61h "], [111, "jge short loc_406F6A"], [112, "cmp [rbp+var_2C], 46h "], [113, "jg short loc_406F70"], [114, "cmp [rbp+var_2C], 41h "], [115, "jge short loc_406F6A"], [116, "cmp [rbp+var_2C], 37h "], [117, "jg short loc_406F56"], [118, "cmp [rbp+var_2C], 30h "], [119, "jge short loc_406F76"], [120, "jmp short loc_406F70"], [121, "mov eax, [rbp+var_2C]"], [122, "sub eax, 38h "], [123, "cmp eax, 1"], [124, "ja short loc_406F70"], [125, "mov [rbp+var_10], 1"], [126, "jmp short loc_406F76"], [127, "cmp [rbp+var_4], 10h"], [128, "jz short loc_406F79"], [129, "mov [rbp+var_15], 1"], [130, "jmp short loc_406FB3"], [131, "nop"], [132, "jmp short loc_406F7A"], [133, "nop"], [134, "mov edx, [rbp+var_2C]"], [135, "mov rax, [rbp+var_28]"], [136, "mov rcx, [rbp+var_38]"], [137, "mov esi, edx"], [138, "mov rdi, rax"], [139, "call rcx"], [140, "mov [rbp+var_1C], eax"], [141, "cmp [rbp+var_1C], 0"], [142, "jz short loc_406F9D"], [143, "mov eax, [rbp+var_1C]"], [144, "jmp locret_4070F3"], [145, "mov [rbp+var_C], 1"], [146, "mov rax, [rbp+var_28]"], [147, "mov rdi, rax"], [148, "call sub_40790E"], [149, "mov [rbp+var_2C], eax"], [150, "cmp [rbp+var_15], 0"], [151, "jz loc_406EBD"], [152, "jmp short loc_406FC3"], [153, "nop"], [154, "jmp short loc_406FC3"], [155, "nop"], [156, "cmp [rbp+var_14], 0"], [157, "jnz short loc_406FCF"], [158, "cmp [rbp+var_8], 0"], [159, "jz short loc_407016"], [160, "cmp [rbp+var_2C], 6Ch "], [161, "jz short loc_406FDF"], [162, "cmp [rbp+var_2C], 4Ch "], [163, "jnz loc_4070B0"], [164, "mov edx, [rbp+var_2C]"], [165, "mov rax, [rbp+var_28]"], [166, "mov rcx, [rbp+var_38]"], [167, "mov esi, edx"], [168, "mov rdi, rax"], [169, "call rcx"], [170, "mov [rbp+var_1C], eax"], [171, "cmp [rbp+var_1C], 0"], [172, "jz short loc_407002"], [173, "mov eax, [rbp+var_1C]"], [174, "jmp locret_4070F3"], [175, "mov rax, [rbp+var_28]"], [176, "mov rdi, rax"], [177, "call sub_40790E"], [178, "mov [rbp+var_2C], eax"], [179, "jmp loc_4070B0"], [180, "mov [rbp+var_15], 1"], [181, "jmp loc_4070A4"], [182, "cmp [rbp+var_2C], 75h "], [183, "jz short loc_40705A"], [184, "cmp [rbp+var_2C], 75h "], [185, "jg short loc_40706F"], [186, "cmp [rbp+var_2C], 6Ch "], [187, "jz short loc_407045"], [188, "cmp [rbp+var_2C], 6Ch "], [189, "jg short loc_40706F"], [190, "cmp [rbp+var_2C], 4Ch "], [191, "jz short loc_407045"], [192, "cmp [rbp+var_2C], 55h "], [193, "jz short loc_40705A"], [194, "jmp short loc_40706F"], [195, "cmp [rbp+var_14], 0"], [196, "jz short loc_407051"], [197, "mov [rbp+var_15], 0"], [198, "jmp short loc_4070A4"], [199, "mov [rbp+var_14], 1"], [200, "jmp short loc_407075"], [201, "cmp [rbp+var_8], 0"], [202, "jz short loc_407066"], [203, "mov [rbp+var_15], 0"], [204, "jmp short loc_4070A4"], [205, "mov [rbp+var_8], 1"], [206, "jmp short loc_407075"], [207, "mov [rbp+var_15], 0"], [208, "jmp short loc_4070A4"], [209, "mov edx, [rbp+var_2C]"], [210, "mov rax, [rbp+var_28]"], [211, "mov rcx, [rbp+var_38]"], [212, "mov esi, edx"], [213, "mov rdi, rax"], [214, "call rcx"], [215, "mov [rbp+var_1C], eax"], [216, "cmp [rbp+var_1C], 0"], [217, "jz short loc_407095"], [218, "mov eax, [rbp+var_1C]"], [219, "jmp short locret_4070F3"], [220, "mov rax, [rbp+var_28]"], [221, "mov rdi, rax"], [222, "call sub_40790E"], [223, "mov [rbp+var_2C], eax"], [224, "cmp [rbp+var_15], 0"], [225, "jnz loc_40701F"], [226, "jmp short loc_4070B1"], [227, "nop"], [228, "mov rax, [rbp+var_28]"], [229, "mov rdi, rax"], [230, "call sub_407FCA"], [231, "mov rax, [rbp+var_28]"], [232, "movzx eax, byte ptr [rax+0C5Dh]"], [233, "test al, al"], [234, "jnz short loc_4070EE"], [235, "cmp [rbp+var_10], 0"], [236, "jz short loc_4070EE"], [237, "cmp [rbp+var_4], 8"], [238, "jnz short loc_4070EE"], [239, "mov rax, [rbp+var_28]"], [240, "mov esi, 2Eh "], [241, "mov rdi, rax"], [242, "mov eax, 0"], [243, "call sub_4082DE"], [244, "mov eax, 0"], [245, "leave"], [246, "retn"]], "data_dep": [[11, 4], [12, 11], [13, 12], [14, 13], [15, 14], [16, 15], [17, 3], [18, 5], [20, 17], [21, 18], [22, 21], [23, 22], [24, 23], [25, 22], [27, 3], [28, 27], [30, 29], [31, 30], [34, 33], [35, 34], [36, 3], [37, 36], [41, 4], [42, 41], [43, 4], [44, 3], [45, 5], [46, 43], [47, 44], [48, 45], [49, 48], [50, 49], [51, 50], [52, 49], [55, 3], [56, 55], [58, 57], [59, 58], [60, 59], [61, 58], [62, 61], [64, 58], [65, 3], [66, 5], [67, 64], [68, 65], [69, 66], [70, 69], [71, 70], [72, 71], [73, 70], [75, 3], [76, 75], [78, 77], [80, 90], [80, 99], [80, 10], [80, 54], [80, 63], [81, 80], [82, 149], [82, 4], [82, 78], [82, 58], [82, 30], [83, 82], [84, 4], [84, 78], [84, 58], [84, 30], [84, 149], [85, 84], [86, 7], [86, 88], [87, 86], [92, 54], [92, 63], [92, 90], [92, 99], [92, 10], [93, 92], [94, 30], [94, 149], [94, 4], [94, 78], [94, 58], [95, 94], [96, 98], [96, 14], [97, 96], [101, 149], [101, 4], [101, 78], [101, 58], [101, 30], [102, 101], [103, 78], [103, 58], [103, 30], [103, 149], [103, 4], [104, 103], [105, 145], [105, 8], [106, 105], [108, 58], [108, 30], [108, 149], [108, 4], [108, 78], [109, 108], [110, 149], [110, 4], [110, 78], [110, 58], [110, 30], [111, 110], [112, 149], [112, 4], [112, 78], [112, 58], [112, 30], [113, 112], [114, 78], [114, 58], [114, 30], [114, 149], [114, 4], [115, 114], [116, 58], [116, 30], [116, 149], [116, 4], [116, 78], [117, 116], [118, 149], [118, 4], [118, 78], [118, 58], [118, 30], [119, 118], [121, 30], [121, 149], [121, 4], [121, 78], [121, 58], [122, 121], [123, 122], [124, 123], [127, 54], [127, 63], [127, 10], [127, 90], [127, 99], [128, 127], [134, 149], [134, 4], [134, 78], [134, 58], [134, 30], [135, 3], [136, 5], [137, 134], [138, 135], [139, 136], [140, 139], [141, 140], [142, 141], [143, 140], [146, 3], [147, 146], [149, 148], [150, 129], [150, 6], [151, 150], [156, 98], [156, 14], [157, 156], [158, 88], [158, 7], [159, 158], [160, 78], [160, 58], [160, 30], [160, 149], [160, 4], [161, 160], [162, 58], [162, 30], [162, 149], [162, 4], [162, 78], [163, 162], [164, 78], [164, 4], [164, 58], [164, 30], [164, 149], [165, 3], [166, 5], [167, 164], [168, 165], [169, 166], [170, 169], [171, 170], [172, 171], [173, 170], [175, 3], [176, 175], [178, 177], [182, 78], [182, 58], [182, 30], [182, 223], [182, 149], [182, 4], [183, 182], [184, 58], [184, 30], [184, 223], [184, 149], [184, 4], [184, 78], [185, 184], [186, 149], [186, 223], [186, 78], [186, 4], [186, 58], [186, 30], [187, 186], [188, 223], [188, 149], [188, 4], [188, 78], [188, 58], [188, 30], [189, 188], [190, 58], [190, 30], [190, 149], [190, 223], [190, 78], [190, 4], [191, 190], [192, 58], [192, 30], [192, 223], [192, 149], [192, 4], [192, 78], [193, 192], [195, 14], [195, 98], [195, 199], [196, 195], [201, 7], [201, 205], [201, 88], [202, 201], [209, 58], [209, 30], [209, 223], [209, 78], [209, 149], [209, 4], [210, 3], [211, 5], [212, 209], [213, 210], [214, 211], [215, 214], [216, 215], [217, 216], [218, 215], [220, 3], [221, 220], [223, 222], [224, 180], [224, 203], [224, 207], [224, 197], [225, 224], [228, 3], [229, 228], [231, 3], [232, 231], [233, 232], [234, 233], [235, 9], [235, 125], [236, 235], [237, 54], [237, 63], [237, 90], [237, 99], [237, 10], [238, 237], [239, 3], [241, 239], [246, 173], [246, 218], [246, 143], [246, 244], [246, 73], [246, 39], [246, 25], [246, 52]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/815e6dd565c24b174a532ad0914eeb37231588b33948a1144a50c5abe5f366b9_815e6dd565c24b174a532ad0914eeb37231588b33948a1144a50c5abe5f366b9.jsonl.gz", "strip_func_name": "sub_406D8A", "query": "\n\n\n__int64 __fastcall sub_406D8A(__int64 a1, int a2, __int64 (__fastcall *a3)(__int64, __int64))\n{\nint v4; // edx\nint v5; // ecx\nint v6; // er8\nint v7; // er9\nint v9; // [rsp+14h] [rbp-2Ch]\nunsigned int v10; // [rsp+24h] [rbp-1Ch]\nunsigned int v11; // [rsp+24h] [rbp-1Ch]\nunsigned int v12; // [rsp+24h] [rbp-1Ch]\nunsigned int v13; // [rsp+24h] [rbp-1Ch]\nunsigned int v14; // [rsp+24h] [rbp-1Ch]\nunsigned int v15; // [rsp+24h] [rbp-1Ch]\nchar v16; // [rsp+2Bh] [rbp-15h]\nchar v17; // [rsp+2Bh] [rbp-15h]\n_BOOL4 v18; // [rsp+2Ch] [rbp-14h]\nint v19; // [rsp+30h] [rbp-10h]\nint v20; // [rsp+38h] [rbp-8h]\nint v21; // [rsp+3Ch] [rbp-4h]\n\nv9 = a2;\nv16 = 0;\nv20 = 0;\nv19 = 0;\nv21 = 10;\nv18 = a2 == 46;\nif ( a2 == 46 )\n{\nv10 = a3(a1, 46LL);\nif ( v10 )\nreturn v10;\nv9 = sub_40790E(a1);\nif ( byte_40E380[v9] == 1 )\ngoto LABEL_40;\nsub_407FCA(a1);\nreturn 0LL;\n}\nif ( a2 != 48 )\ngoto LABEL_40;\nv11 = a3(a1, 48LL);\nif ( v11 )\nreturn v11;\nv21 = 8;\nv9 = sub_40790E(a1);\nif ( v9 == 120 || v9 == 88 )\n{\nv21 = 16;\nv12 = a3(a1, (unsigned int)v9);\nif ( !v12 )\ngoto LABEL_39;\nreturn v12;\n}\nLABEL_40:\nwhile ( !v16 )\n{\nif ( v21 != 16 && (v9 == 101 || v9 == 69) )\n{\nif ( v20 )\nbreak;\nv20 = 1;\nv21 = 10;\ngoto LABEL_37;\n}\nif ( v21 == 16 || v9 != 46 )\n{\nif ( v9 == 43 || v9 == 45 )\nbreak;\nif ( v9 <= 102 )\n{\nif ( v9 >= 97 )\ngoto LABEL_35;\nif ( v9 > 70 )\ngoto LABEL_36;\nif ( v9 >= 65 )\n{\nLABEL_35:\nif ( v21 == 16 )\ngoto LABEL_37;\n}\nelse if ( v9 > 55 )\n{\nif ( (unsigned int)(v9 - 56) <= 1 )\n{\nv19 = 1;\ngoto LABEL_37;\n}\n}\nelse if ( v9 >= 48 )\n{\ngoto LABEL_37;\n}\n}\nLABEL_36:\nv16 = 1;\n}\nelse\n{\nif ( v18 )\nbreak;\nv18 = 1;\nv21 = 10;\nLABEL_37:\nv13 = a3(a1, (unsigned int)v9);\nif ( v13 )\nreturn v13;\nLABEL_39:\nv9 = sub_40790E(a1);\n}\n}\nif ( !v18 && !v20 )\n{\nv17 = 1;\nwhile ( 1 )\n{\nif ( !v17 )\ngoto LABEL_67;\nif ( v9 == 117 )\ngoto LABEL_59;\nif ( v9 > 117 )\ngoto LABEL_62;\nif ( v9 == 108 )\ngoto LABEL_56;\nif ( v9 > 108 )\ngoto LABEL_62;\nif ( v9 == 76 )\n{\nLABEL_56:\nif ( !v18 )\n{\nv18 = 1;\ngoto LABEL_63;\n}\nv17 = 0;\n}\nelse if ( v9 == 85 )\n{\nLABEL_59:\nif ( v20 )\n{\nv17 = 0;\n}\nelse\n{\nv20 = 1;\nLABEL_63:\nv15 = a3(a1, (unsigned int)v9);\nif ( v15 )\nreturn v15;\nv9 = sub_40790E(a1);\n}\n}\nelse\n{\nLABEL_62:\nv17 = 0;\n}\n}\n}\nif ( v9 == 108 || v9 == 76 )\n{\nv14 = a3(a1, (unsigned int)v9);\nif ( v14 )\nreturn v14;\nsub_40790E(a1);\n}\nLABEL_67:\nsub_407FCA(a1);\nif ( !*(_BYTE *)(a1 + 3165) && v19 && v21 == 8 )\nsub_4082DE(a1, 46, v4, v5, v6, v7);\nreturn 0LL;\n}\n\n\n\nQ:[a3,a1,a2,v4,v9,v10,v16,v18,v19,v20,v21,sub_406D8A,sub_40790E,sub_407FCA,sub_4082DE,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'outfun', 'a1': 'global', 'a2': 'c', 'v4': 'outfun', 'v9': 'ca', 'v10': 'retc', 'v16': 'done', 'v18': 'dotflag', 'v19': 'octal89', 'v20': 'expseen', 'v21': 'radix', 'sub_406D8A': 'scannumber', 'sub_40790E': 'get', 'sub_407FCA': 'unget', 'sub_4082DE': 'cerror'}"}
sim_putchar
bf7ae1a4450b359f92e96f59068a71bc49375889282b3e96663c3c09631e7838
open-simh
simh
NA
t_stat sim_putchar (int32 c) { sim_exp_check (&sim_con_expect, c); if ((sim_con_tmxr.master == 0) && /* not Telnet? */ (sim_con_ldsc.serport == 0)) { /* and not serial port */ ++sim_con_pos; /* bookkeeping */ if (sim_log) /* log file? */ fputc (c, sim_log); sim_debug (DBG_XMT, &sim_con_telnet, "sim_putchar('%c' (0x%02X)\n", sim_isprint (c) ? c : '.', c); return sim_os_putchar (c); /* in-window version */ } if (!sim_con_ldsc.conn) { /* no Telnet or serial connection? */ if (!sim_con_ldsc.txbfd) /* unbuffered? */ return SCPE_LOST; /* connection lost */ if (tmxr_poll_conn (&sim_con_tmxr) >= 0) /* poll connect */ sim_con_ldsc.rcve = 1; /* rcv enabled */ } tmxr_putc_ln (&sim_con_ldsc, c); /* output char */ ++sim_con_pos; /* bookkeeping */ tmxr_poll_tx (&sim_con_tmxr); /* poll xmt */ return SCPE_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44E6FF", "function_addr": 4515583, "binary_name": "bf7ae1a4450b359f92e96f59068a71bc49375889282b3e96663c3c09631e7838.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], edi"], [4, "mov eax, [rbp+var_4]"], [5, "movzx eax, al"], [6, "mov esi, eax"], [7, "mov edi, offset off_4EC1A0"], [8, "call sub_43C311"], [9, "mov eax, cs:dword_4EB0D0"], [10, "test eax, eax"], [11, "jnz loc_44E7D1"], [12, "mov rax, cs:qword_5650F8"], [13, "test rax, rax"], [14, "jnz loc_44E7D1"], [15, "mov eax, cs:dword_5652A8"], [16, "add eax, 1"], [17, "mov cs:dword_5652A8, eax"], [18, "mov rax, cs:qword_542510"], [19, "test rax, rax"], [20, "jz short loc_44E771"], [21, "mov rax, cs:qword_542510"], [22, "mov edx, [rbp+var_4]"], [23, "mov esi, offset aC_12"], [24, "mov rdi, rax"], [25, "mov eax, 0"], [26, "call sub_440784"], [27, "mov rax, cs:qword_542520"], [28, "test rax, rax"], [29, "jz short loc_44E7C5"], [30, "mov eax, cs:dword_4EB074"], [31, "and eax, 100000h"], [32, "test eax, eax"], [33, "jz short loc_44E7C5"], [34, "mov eax, [rbp+var_4]"], [35, "mov edi, eax"], [36, "call sub_451A40"], [37, "test eax, eax"], [38, "jz short loc_44E79F"], [39, "mov eax, [rbp+var_4]"], [40, "jmp short loc_44E7A4"], [41, "mov eax, 2Eh "], [42, "mov edx, [rbp+var_4]"], [43, "mov r8d, edx"], [44, "mov ecx, eax"], [45, "mov edx, offset aSimPutcharC0x0"], [46, "mov esi, offset off_4EB000"], [47, "mov edi, 100000h"], [48, "mov eax, 0"], [49, "call sub_440055"], [50, "mov eax, [rbp+var_4]"], [51, "mov edi, eax"], [52, "call sub_44F5B4"], [53, "jmp short locret_44E831"], [54, "mov eax, cs:dword_564FC0"], [55, "test eax, eax"], [56, "jnz short loc_44E804"], [57, "mov eax, cs:dword_565048"], [58, "test eax, eax"], [59, "jnz short loc_44E7EC"], [60, "mov eax, 67h "], [61, "jmp short locret_44E831"], [62, "mov edi, offset unk_4EB0C0"], [63, "call sub_4604C9"], [64, "test eax, eax"], [65, "js short loc_44E804"], [66, "mov cs:dword_564FFC, 1"], [67, "mov eax, [rbp+var_4]"], [68, "mov esi, eax"], [69, "mov edi, offset dword_564FC0"], [70, "call sub_465CFA"], [71, "mov eax, cs:dword_5652A8"], [72, "add eax, 1"], [73, "mov cs:dword_5652A8, eax"], [74, "mov edi, offset unk_4EB0C0"], [75, "call sub_466563"], [76, "mov eax, 0"], [77, "leave"], [78, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [10, 9], [11, 10], [13, 12], [14, 13], [16, 15], [17, 16], [19, 18], [20, 19], [22, 3], [24, 21], [28, 27], [29, 28], [31, 30], [32, 31], [33, 32], [34, 3], [35, 34], [37, 36], [38, 37], [39, 3], [42, 3], [43, 42], [44, 39], [44, 41], [50, 3], [51, 50], [55, 54], [56, 55], [58, 57], [59, 58], [64, 63], [65, 64], [67, 3], [68, 67], [72, 71], [73, 72], [78, 52], [78, 76], [78, 60]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/bf7ae1a4450b359f92e96f59068a71bc49375889282b3e96663c3c09631e7838_bf7ae1a4450b359f92e96f59068a71bc49375889282b3e96663c3c09631e7838.jsonl.gz", "strip_func_name": "sub_44E6FF", "query": "\n\n\n__int64 __fastcall sub_44E6FF(unsigned int a1, __int64 a2, __int64 a3, __int64 a4, int a5, int a6)\n{\n__int64 v6; // rcx\n__int64 v7; // r8\n__int64 v8; // r9\n__int64 v9; // r9\nunsigned int v10; // eax\n__int64 result; // rax\n\nsub_43C311((__int64)&off_4EC1A0, a1, a3, a4, a5, a6);\nif ( dword_4EB0D0 || qword_5650F8 )\n{\nif ( !dword_564FC0 )\n{\nif ( !dword_565048 )\nreturn 103LL;\nif ( (int)sub_4604C9(&unk_4EB0C0) >= 0 )\ndword_564FFC = 1;\n}\nsub_465CFA(&dword_564FC0, a1);\n++dword_5652A8;\nsub_466563(&unk_4EB0C0);\nresult = 0LL;\n}\nelse\n{\n++dword_5652A8;\nif ( qword_542510 )\nsub_440784(qword_542510, \"%c\", a1, v6, v7, v8);\nif ( qword_542520 && (dword_4EB074 & 0x100000) != 0 )\n{\nif ( (unsigned int)sub_451A40(a1) )\nv10 = a1;\nelse\nv10 = 46;\nsub_440055(0x100000, (__int64)&off_4EB000, \"sim_putchar('%c' (0x%02X)\\n\", v10, a1, v9);\n}\nresult = sub_44F5B4(a1);\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_44E6FF,sub_43C311,sub_4604C9,sub_465CFA,sub_466563,sub_440784,sub_451A40,sub_440055,sub_44F5B4,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'c', 'sub_44E6FF': 'sim_putchar', 'sub_43C311': 'sim_exp_check', 'sub_4604C9': 'tmxr_poll_conn', 'sub_465CFA': 'tmxr_putc_ln', 'sub_466563': 'tmxr_poll_tx', 'sub_440784': 'Fprintf', 'sub_451A40': 'sim_isprint', 'sub_440055': '_sim_debug_device', 'sub_44F5B4': 'sim_os_putchar'}"}
tty_putc
90556a47fefcfda68e6eb666e01c067d4d365ed7e43da31d3f3302166768f124
mptre
pick
NA
int tty_putc(int c) { if (putc(c, tty_out) == EOF) err(1, "putc"); return c; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403D29", "function_addr": 4209961, "binary_name": "90556a47fefcfda68e6eb666e01c067d4d365ed7e43da31d3f3302166768f124.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+c], edi"], [4, "mov rdx, cs:stream"], [5, "mov eax, [rbp+c]"], [6, "mov rsi, rdx"], [7, "mov edi, eax"], [8, "call _putc"], [9, "cmp eax, 0FFFFFFFFh"], [10, "jnz short loc_403D61"], [11, "mov esi, offset aPutc_0"], [12, "mov edi, 1"], [13, "mov eax, 0"], [14, "call _err"], [15, "mov eax, [rbp+c]"], [16, "leave"], [17, "retn"]], "data_dep": [[5, 3], [6, 4], [7, 5], [9, 8], [10, 9], [15, 3], [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/90556a47fefcfda68e6eb666e01c067d4d365ed7e43da31d3f3302166768f124_90556a47fefcfda68e6eb666e01c067d4d365ed7e43da31d3f3302166768f124.jsonl.gz", "strip_func_name": "sub_403D29", "query": "\n\n\n__int64 __fastcall sub_403D29(unsigned int a1)\n{\nif ( putc(a1, stream) == -1 )\nerr(1, \"putc\");\nreturn a1;\n}\n\n\n\nQ:[a1,sub_403D29,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'c', 'sub_403D29': 'tty_putc'}"}
uf_string_treat_argument_next
6abc3b568fccbba8f2e9e15816c1e50556bda75cc469dc0805143ef800e3dc8b
QuentinPerez
42-toolkit
NA
static bool uf_string_treat_argument_next(t_string *v_this, va_list *ap, const char **fmt) { if (**fmt == 's') { if (D_STRING(add_str)(v_this, va_arg(*ap, char *)) == false) return (false); } else if (**fmt == 'p') { if (D_STRING(add_ptr)(v_this, va_arg(*ap, void *)) == false) return (false); } return (true); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40144D", "function_addr": 4199501, "binary_name": "6abc3b568fccbba8f2e9e15816c1e50556bda75cc469dc0805143ef800e3dc8b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rax, [rbp+var_18]"], [7, "mov rax, [rax]"], [8, "movzx eax, byte ptr [rax]"], [9, "cmp al, 73h "], [10, "jnz short loc_4014D2"], [11, "mov rax, [rbp+var_10]"], [12, "mov eax, [rax]"], [13, "cmp eax, 2Fh "], [14, "ja short loc_40149E"], [15, "mov rax, [rbp+var_10]"], [16, "mov rdx, [rax+10h]"], [17, "mov rax, [rbp+var_10]"], [18, "mov eax, [rax]"], [19, "mov eax, eax"], [20, "add rax, rdx"], [21, "mov rdx, [rbp+var_10]"], [22, "mov edx, [rdx]"], [23, "lea ecx, [rdx+8]"], [24, "mov rdx, [rbp+var_10]"], [25, "mov [rdx], ecx"], [26, "jmp short loc_4014B2"], [27, "mov rax, [rbp+var_10]"], [28, "mov rax, [rax+8]"], [29, "lea rcx, [rax+8]"], [30, "mov rdx, [rbp+var_10]"], [31, "mov [rdx+8], rcx"], [32, "mov rdx, [rax]"], [33, "mov rax, [rbp+var_8]"], [34, "mov rsi, rdx"], [35, "mov rdi, rax"], [36, "call sub_402888"], [37, "xor eax, 1"], [38, "test al, al"], [39, "jz short loc_401543"], [40, "mov eax, 0"], [41, "jmp short locret_401548"], [42, "mov rax, [rbp+var_18]"], [43, "mov rax, [rax]"], [44, "movzx eax, byte ptr [rax]"], [45, "cmp al, 70h "], [46, "jnz short loc_401543"], [47, "mov rax, [rbp+var_10]"], [48, "mov eax, [rax]"], [49, "cmp eax, 2Fh "], [50, "ja short loc_40150F"], [51, "mov rax, [rbp+var_10]"], [52, "mov rdx, [rax+10h]"], [53, "mov rax, [rbp+var_10]"], [54, "mov eax, [rax]"], [55, "mov eax, eax"], [56, "add rax, rdx"], [57, "mov rdx, [rbp+var_10]"], [58, "mov edx, [rdx]"], [59, "lea ecx, [rdx+8]"], [60, "mov rdx, [rbp+var_10]"], [61, "mov [rdx], ecx"], [62, "jmp short loc_401523"], [63, "mov rax, [rbp+var_10]"], [64, "mov rax, [rax+8]"], [65, "lea rcx, [rax+8]"], [66, "mov rdx, [rbp+var_10]"], [67, "mov [rdx+8], rcx"], [68, "mov rdx, [rax]"], [69, "mov rax, [rbp+var_8]"], [70, "mov rsi, rdx"], [71, "mov rdi, rax"], [72, "call sub_402770"], [73, "xor eax, 1"], [74, "test al, al"], [75, "jz short loc_401543"], [76, "mov eax, 0"], [77, "jmp short locret_401548"], [78, "mov eax, 1"], [79, "leave"], [80, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 4], [12, 11], [13, 12], [14, 13], [15, 4], [16, 15], [17, 4], [18, 17], [19, 18], [20, 19], [20, 16], [21, 4], [22, 21], [23, 22], [24, 4], [25, 23], [25, 24], [27, 4], [28, 27], [29, 28], [30, 4], [31, 29], [31, 30], [32, 25], [32, 20], [32, 31], [32, 28], [33, 3], [34, 32], [35, 33], [37, 36], [38, 37], [39, 38], [42, 5], [43, 42], [44, 43], [45, 44], [46, 45], [47, 4], [48, 47], [49, 48], [50, 49], [51, 4], [52, 51], [53, 4], [54, 53], [55, 54], [56, 55], [56, 52], [57, 4], [58, 57], [59, 58], [60, 4], [61, 60], [61, 59], [63, 4], [64, 63], [65, 64], [66, 4], [67, 65], [67, 66], [68, 61], [68, 56], [68, 67], [68, 64], [69, 3], [70, 68], [71, 69], [73, 72], [74, 73], [75, 74], [80, 40], [80, 76], [80, 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/6abc3b568fccbba8f2e9e15816c1e50556bda75cc469dc0805143ef800e3dc8b_6abc3b568fccbba8f2e9e15816c1e50556bda75cc469dc0805143ef800e3dc8b.jsonl.gz", "strip_func_name": "sub_40144D", "query": "\n\n\n__int64 __fastcall sub_40144D(__int64 a1, unsigned int *a2, _BYTE **a3)\n{\n_QWORD *v3; // rax\n_QWORD *v5; // rax\n\nif ( **a3 == 115 )\n{\nif ( *a2 > 0x2F )\n{\nv3 = (_QWORD *)*((_QWORD *)a2 + 1);\n*((_QWORD *)a2 + 1) = v3 + 1;\n}\nelse\n{\nv3 = (_QWORD *)(*((_QWORD *)a2 + 2) + *a2);\n*a2 += 8;\n}\nif ( (unsigned __int8)sub_402888(a1, *v3) != 1 )\nreturn 0LL;\n}\nelse if ( **a3 == 112 )\n{\nif ( *a2 > 0x2F )\n{\nv5 = (_QWORD *)*((_QWORD *)a2 + 1);\n*((_QWORD *)a2 + 1) = v5 + 1;\n}\nelse\n{\nv5 = (_QWORD *)(*((_QWORD *)a2 + 2) + *a2);\n*a2 += 8;\n}\nif ( (unsigned __int8)sub_402770(a1, *v5) != 1 )\nreturn 0LL;\n}\nreturn 1LL;\n}\n\n\n\nQ:[a3,a1,a2,sub_40144D,sub_402888,sub_402770,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'fmt', 'a1': 'v_this', 'a2': 'ap', 'sub_40144D': 'uf_string_treat_argument_next', 'sub_402888': 'f_string_add_str', 'sub_402770': 'f_string_add_ptr'}"}
pg_utf_dsplen
06da0488267dd12f9cfef76fa3ce57da628849c8d7a4879a3dd7f0e5e3ba1747
sraoss
pgsql-ivm
NA
static int pg_utf_dsplen(const unsigned char *s) { return ucs_wcwidth(utf8_to_unicode(s)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_45DD21", "function_addr": 4578593, "binary_name": "06da0488267dd12f9cfef76fa3ce57da628849c8d7a4879a3dd7f0e5e3ba1747.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 rdi, rax"], [6, "call sub_45DBF4"], [7, "mov edi, eax"], [8, "call sub_45DB72"], [9, "leave"], [10, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [10, 8]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/06da0488267dd12f9cfef76fa3ce57da628849c8d7a4879a3dd7f0e5e3ba1747_06da0488267dd12f9cfef76fa3ce57da628849c8d7a4879a3dd7f0e5e3ba1747.jsonl.gz", "strip_func_name": "sub_45DD21", "query": "\n\n\n__int64 __fastcall sub_45DD21(unsigned __int8 *a1)\n{\nunsigned int v1; // eax\n\nv1 = sub_45DBF4(a1);\nreturn sub_45DB72(v1);\n}\n\n\n\nQ:[a1,sub_45DD21,sub_45DBF4,sub_45DB72,]\nAssistant: ", "hints": "[]", "response": "{'a1': 's', 'sub_45DD21': 'pg_utf_dsplen', 'sub_45DBF4': 'utf8_to_unicode_0', 'sub_45DB72': 'ucs_wcwidth'}"}
parse_mapping_num_all
5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0
multipath-tcp
iproute-mptcp
NA
int parse_mapping_num_all(__u32 *keyp, const char *key) { if (matches(key, "all") == 0) { *keyp = (__u32) -1; return 0; } return parse_mapping_num(keyp, key); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "parse_mapping_num_all", "function_addr": 4592596, "binary_name": "5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0.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, "lea rsi, aAll"], [7, "mov rdi, rax"], [8, "call matches"], [9, "xor eax, 1"], [10, "test al, al"], [11, "jz short loc_46140F"], [12, "mov rax, [rbp+var_8]"], [13, "mov dword ptr [rax], 0FFFFFFFFh"], [14, "mov eax, 0"], [15, "jmp short locret_461422"], [16, "mov rdx, [rbp+var_10]"], [17, "mov rax, [rbp+var_8]"], [18, "mov rsi, rdx"], [19, "mov rdi, rax"], [20, "call sub_4613AA"], [21, "leave"], [22, "retn"]], "data_dep": [[5, 4], [7, 5], [9, 8], [10, 9], [11, 10], [12, 3], [13, 12], [16, 4], [17, 3], [18, 16], [19, 17], [22, 20], [22, 14]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0_5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0.jsonl.gz", "strip_func_name": "parse_mapping_num_all", "query": "\n\n\n__int64 __fastcall parse_mapping_num_all(_DWORD *a1, char *a2)\n{\nif ( matches(a2, \"all\") )\nreturn sub_4613AA(a1, a2);\n*a1 = -1;\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,sub_4613AA,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'keyp', 'a2': 'key', 'sub_4613AA': 'parse_mapping_num'}"}
cursor_left
efec0669d8928f35c10d441625aa516e9c89e71dc034afe38aaa2fe73d307505
klange
ponyos
NA
static void cursor_left(void) { if (column > 0) column--; rline_place_cursor(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_477B08", "function_addr": 4684552, "binary_name": "efec0669d8928f35c10d441625aa516e9c89e71dc034afe38aaa2fe73d307505.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, cs:dword_497264"], [3, "test eax, eax"], [4, "jle short loc_477B25"], [5, "mov eax, cs:dword_497264"], [6, "sub eax, 1"], [7, "mov cs:dword_497264, eax"], [8, "call rline_place_cursor"], [9, "nop"], [10, "pop rbp"], [11, "retn"]], "data_dep": [[3, 2], [4, 3], [6, 5], [7, 6], [10, 0], [11, 8]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/efec0669d8928f35c10d441625aa516e9c89e71dc034afe38aaa2fe73d307505_efec0669d8928f35c10d441625aa516e9c89e71dc034afe38aaa2fe73d307505.jsonl.gz", "strip_func_name": "sub_477B08", "query": "\n\n\nint sub_477B08()\n{\nif ( dword_497264 > 0 )\n--dword_497264;\nreturn rline_place_cursor();\n}\n\n\n\nQ:[sub_477B08,]\nAssistant: ", "hints": "[]", "response": "{'sub_477B08': 'cursor_left'}"}
generic_default_transition_time_status_handler
1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca
micropython
micropython-unicorn
NA
static void generic_default_transition_time_status_handler(mesh_model_t *mesh_model, mesh_pdu_t * pdu){ if (!mesh_model->model_packet_handler){ log_error("model_packet_handler == NULL"); } mesh_access_parser_state_t parser; mesh_access_parser_init(&parser, (mesh_pdu_t*) pdu); uint8_t transition_time_gdtt = mesh_access_parser_get_u8(&parser); uint8_t event[7] = {HCI_EVENT_MESH_META, 5, MESH_SUBEVENT_GENERIC_DEFAULT_TRANSITION_TIME}; int pos = 3; // dest little_endian_store_16(event, pos, mesh_pdu_src(pdu)); pos += 2; event[pos++] = ERROR_CODE_SUCCESS; event[pos++] = transition_time_gdtt; (*mesh_model->model_packet_handler)(HCI_EVENT_PACKET, 0, event, pos); mesh_access_message_processed(pdu); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_437C61", "function_addr": 4422753, "binary_name": "1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_40], rsi"], [5, "mov rax, [rbp+var_38]"], [6, "mov rax, [rax+40h]"], [7, "test rax, rax"], [8, "jnz short loc_437C9C"], [9, "mov ecx, 7Ah "], [10, "mov edx, offset aMeshGenericDef"], [11, "mov esi, offset aSUModelPacketH"], [12, "mov edi, 2"], [13, "mov eax, 0"], [14, "call sub_412F63"], [15, "mov rdx, [rbp+var_40]"], [16, "lea rax, [rbp+var_20]"], [17, "mov rsi, rdx"], [18, "mov rdi, rax"], [19, "call sub_42C4B4"], [20, "lea rax, [rbp+var_20]"], [21, "mov rdi, rax"], [22, "call sub_42C54A"], [23, "mov [rbp+var_1], al"], [24, "mov [rbp+var_27], 3505F5h"], [25, "mov [rbp+var_23], 0"], [26, "mov [rbp+var_21], 0"], [27, "mov [rbp+var_8], 3"], [28, "mov rax, [rbp+var_40]"], [29, "mov rdi, rax"], [30, "call sub_42C105"], [31, "movzx edx, ax"], [32, "mov eax, [rbp+var_8]"], [33, "movzx ecx, ax"], [34, "lea rax, [rbp+var_27]"], [35, "mov esi, ecx"], [36, "mov rdi, rax"], [37, "call sub_405E68"], [38, "add [rbp+var_8], 2"], [39, "mov eax, [rbp+var_8]"], [40, "lea edx, [rax+1]"], [41, "mov [rbp+var_8], edx"], [42, "cdqe"], [43, "mov byte ptr [rbp+rax+var_27], 0"], [44, "mov eax, [rbp+var_8]"], [45, "lea edx, [rax+1]"], [46, "mov [rbp+var_8], edx"], [47, "cdqe"], [48, "movzx edx, [rbp+var_1]"], [49, "mov byte ptr [rbp+rax+var_27], dl"], [50, "mov rax, [rbp+var_38]"], [51, "mov r8, [rax+40h]"], [52, "mov eax, [rbp+var_8]"], [53, "movzx edx, ax"], [54, "lea rax, [rbp+var_27]"], [55, "mov ecx, edx"], [56, "mov rdx, rax"], [57, "mov esi, 0"], [58, "mov edi, 4"], [59, "call r8"], [60, "mov rax, [rbp+var_40]"], [61, "mov rdi, rax"], [62, "call sub_42D3F7"], [63, "nop"], [64, "leave"], [65, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [15, 4], [16, 7], [16, 14], [17, 15], [18, 16], [20, 19], [21, 20], [23, 22], [28, 4], [29, 28], [31, 30], [32, 27], [33, 32], [34, 24], [34, 32], [35, 33], [36, 34], [38, 27], [39, 38], [40, 31], [40, 39], [41, 40], [43, 39], [44, 41], [45, 40], [45, 44], [46, 45], [48, 23], [49, 44], [49, 48], [50, 3], [51, 50], [52, 46], [53, 52], [54, 52], [54, 24], [55, 53], [56, 54], [59, 51], [60, 4], [61, 60], [65, 62]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca_1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca.jsonl.gz", "strip_func_name": "sub_437C61", "query": "\n\n\n__int64 __fastcall sub_437C61(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int16 v6; // ax\nint v7; // eax\nint v8; // eax\nint v10; // [rsp+19h] [rbp-27h] BYREF\n__int16 v11; // [rsp+1Dh] [rbp-23h]\nchar v12; // [rsp+1Fh] [rbp-21h]\nchar v13[24]; // [rsp+20h] [rbp-20h] BYREF\nint v14; // [rsp+38h] [rbp-8h]\nchar v15; // [rsp+3Fh] [rbp-1h]\n\nif ( !*(_QWORD *)(a1 + 64) )\nsub_412F63(\n2,\n\"%s.%u: model_packet_handler == NULL\",\n(__int64)\"mesh_generic_default_transition_time_client.c\",\n122LL,\na5,\na6);\nsub_42C4B4((__int64)v13, a2);\nv15 = sub_42C54A((__int64)v13);\nv10 = 3474933;\nv11 = 0;\nv12 = 0;\nv14 = 3;\nv6 = sub_42C105(a2);\nsub_405E68((__int64)&v10, v14, v6);\nv14 += 2;\nv7 = v14++;\n*((_BYTE *)&v10 + v7) = 0;\nv8 = v14++;\n*((_BYTE *)&v10 + v8) = v15;\n(*(void (__fastcall **)(__int64, _QWORD, int *, _QWORD))(a1 + 64))(4LL, 0LL, &v10, (unsigned __int16)v14);\nreturn sub_42D3F7(a2);\n}\n\n\n\nQ:[a1,a2,v10,v13,v14,v15,sub_437C61,sub_412F63,sub_42C4B4,sub_42C54A,sub_42C105,sub_405E68,sub_42D3F7,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'mesh_model', 'a2': 'pdu', 'v10': 'event', 'v13': 'parser', 'v14': 'pos', 'v15': 'transition_time_gdtt', 'sub_437C61': 'generic_default_transition_time_status_handler', 'sub_412F63': 'hci_dump_log', 'sub_42C4B4': 'mesh_access_parser_init', 'sub_42C54A': 'mesh_access_parser_get_u8', 'sub_42C105': 'mesh_pdu_src', 'sub_405E68': 'little_endian_store_16', 'sub_42D3F7': 'mesh_access_message_processed'}"}
KeccakP1600OnWords
ff5fb2245b6a77f2fbe963c076157efad15325bbe7a27650504c609bda59002b
microsoft
Picnic
NA
void KeccakP1600OnWords(tKeccakLane *state, unsigned int nrRounds) { unsigned int i; #ifdef KeccakReference displayStateAsLanes(3, "Same, with lanes as 64-bit words", state, 1600); #endif for(i=(maxNrRounds-nrRounds); i<maxNrRounds; i++) KeccakP1600Round(state, i); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_410152", "function_addr": 4260178, "binary_name": "ff5fb2245b6a77f2fbe963c076157efad15325bbe7a27650504c609bda59002b.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 eax, 18h"], [6, "sub eax, [rbp+var_1C]"], [7, "mov [rbp+var_4], eax"], [8, "jmp short loc_410183"], [9, "mov edx, [rbp+var_4]"], [10, "mov rax, [rbp+var_18]"], [11, "mov esi, edx"], [12, "mov rdi, rax"], [13, "call sub_41018D"], [14, "add [rbp+var_4], 1"], [15, "cmp [rbp+var_4], 17h"], [16, "jbe short loc_41016E"], [17, "nop"], [18, "nop"], [19, "leave"], [20, "retn"]], "data_dep": [[6, 5], [6, 4], [7, 6], [9, 14], [9, 7], [10, 3], [11, 9], [12, 10], [14, 14], [14, 7], [15, 14], [15, 7], [16, 15], [20, 13], [20, 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/ff5fb2245b6a77f2fbe963c076157efad15325bbe7a27650504c609bda59002b_ff5fb2245b6a77f2fbe963c076157efad15325bbe7a27650504c609bda59002b.jsonl.gz", "strip_func_name": "sub_410152", "query": "\n\n\n__int64 __fastcall sub_410152(__int64 a1, int a2)\n{\n__int64 result; // rax\nunsigned int i; // [rsp+1Ch] [rbp-4h]\n\nresult = (unsigned int)(24 - a2);\nfor ( i = 24 - a2; i <= 0x17; ++i )\nresult = sub_41018D(a1, i);\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_410152,sub_41018D,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'state', 'a2': 'nrRounds', 'sub_410152': 'KeccakP1600OnWords', 'sub_41018D': 'KeccakP1600Round'}"}
sm_reset_setup
0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26
Matheus-Garbelini
esp32_bluetooth_classic_sniffer
NA
static void sm_reset_setup(void){ // fill in sm setup setup->sm_state_vars = 0; setup->sm_keypress_notification = 0; sm_reset_tk(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_418F79", "function_addr": 4296569, "binary_name": "0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:off_44A2A0"], [3, "mov byte ptr [rax+0BAh], 0"], [4, "mov rax, cs:off_44A2A0"], [5, "mov byte ptr [rax+21h], 0"], [6, "call sub_417B7A"], [7, "nop"], [8, "pop rbp"], [9, "retn"]], "data_dep": [[3, 2], [5, 4], [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/0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26_0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26.jsonl.gz", "strip_func_name": "sub_418F79", "query": "\n\n\n__int64 sub_418F79()\n{\n*((_BYTE *)off_44A2A0 + 186) = 0;\n*((_BYTE *)off_44A2A0 + 33) = 0;\nreturn sub_417B7A();\n}\n\n\n\nQ:[sub_418F79,sub_417B7A,]\nAssistant: ", "hints": "[]", "response": "{'sub_418F79': 'sm_reset_setup', 'sub_417B7A': 'sm_reset_tk'}"}
clx_n_get_base_ratio
8883d55eea563c3c7ea5ebbd78dc0518030d7eb1eaa0be8652ca26aff996c2bc
frank-w
BPI-Router-Linux
NA
static int clx_n_get_base_ratio(void) { FILE *fp; char *begin, *end, *line = NULL; char number[5]; float value = 0; size_t n = 0; fp = fopen("/proc/cpuinfo", "r"); if (!fp) err(-1, "cannot open /proc/cpuinfo\n"); while (getline(&line, &n, fp) > 0) { if (strstr(line, "model name")) { /* this is true for CascadeLake-N */ begin = strstr(line, "@ ") + 2; end = strstr(line, "GHz"); strncpy(number, begin, end - begin); value = atof(number) * 10; break; } } free(line); fclose(fp); return (int)(value); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404CCF", "function_addr": 4213967, "binary_name": "8883d55eea563c3c7ea5ebbd78dc0518030d7eb1eaa0be8652ca26aff996c2bc.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+haystack], 0"], [4, "pxor xmm0, xmm0"], [5, "movss [rbp+var_4], xmm0"], [6, "mov [rbp+n], 0"], [7, "mov esi, offset modes"], [8, "mov edi, offset filename"], [9, "call _fopen"], [10, "mov [rbp+stream], rax"], [11, "cmp [rbp+stream], 0"], [12, "jnz loc_404DA7"], [13, "mov esi, offset format"], [14, "mov edi, 0FFFFFFFFh"], [15, "mov eax, 0"], [16, "call _err"], [17, "mov rax, [rbp+haystack]"], [18, "mov esi, offset needle"], [19, "mov rdi, rax"], [20, "call _strstr"], [21, "test rax, rax"], [22, "jz short loc_404DA7"], [23, "mov rax, [rbp+haystack]"], [24, "mov esi, offset asc_40FC19"], [25, "mov rdi, rax"], [26, "call _strstr"], [27, "add rax, 2"], [28, "mov [rbp+src], rax"], [29, "mov rax, [rbp+haystack]"], [30, "mov esi, offset aGhz"], [31, "mov rdi, rax"], [32, "call _strstr"], [33, "mov [rbp+var_20], rax"], [34, "mov rax, [rbp+var_20]"], [35, "sub rax, [rbp+src]"], [36, "mov rdx, rax"], [37, "mov rcx, [rbp+src]"], [38, "lea rax, [rbp+dest]"], [39, "mov rsi, rcx"], [40, "mov rdi, rax"], [41, "call _strncpy"], [42, "lea rax, [rbp+dest]"], [43, "mov rdi, rax"], [44, "call _atof"], [45, "movsd xmm1, cs:qword_4120B8"], [46, "mulsd xmm0, xmm1"], [47, "cvtsd2ss xmm0, xmm0"], [48, "movss [rbp+var_4], xmm0"], [49, "jmp short loc_404DC7"], [50, "mov rdx, [rbp+stream]"], [51, "lea rcx, [rbp+n]"], [52, "lea rax, [rbp+haystack]"], [53, "mov rsi, rcx"], [54, "mov rdi, rax"], [55, "call _getline"], [56, "test rax, rax"], [57, "jg loc_404D22"], [58, "mov rax, [rbp+haystack]"], [59, "mov rdi, rax"], [60, "call _free"], [61, "mov rax, [rbp+stream]"], [62, "mov rdi, rax"], [63, "call _fclose"], [64, "movss xmm0, [rbp+var_4]"], [65, "cvttss2si eax, xmm0"], [66, "leave"], [67, "retn"]], "data_dep": [[5, 4], [10, 9], [11, 10], [12, 11], [17, 3], [19, 17], [21, 20], [22, 21], [23, 3], [25, 23], [27, 26], [28, 27], [29, 3], [31, 29], [33, 32], [34, 33], [35, 28], [35, 34], [36, 35], [37, 28], [38, 35], [39, 37], [40, 38], [42, 41], [43, 42], [46, 45], [46, 4], [47, 46], [48, 47], [50, 10], [51, 6], [51, 51], [52, 9], [52, 3], [52, 21], [53, 51], [54, 52], [56, 55], [57, 56], [58, 3], [59, 58], [61, 10], [62, 61], [64, 5], [64, 48], [65, 64], [65, 63], [67, 65]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/8883d55eea563c3c7ea5ebbd78dc0518030d7eb1eaa0be8652ca26aff996c2bc_8883d55eea563c3c7ea5ebbd78dc0518030d7eb1eaa0be8652ca26aff996c2bc.jsonl.gz", "strip_func_name": "sub_404CCF", "query": "\n\n\n__int64 sub_404CCF()\n{\nfloat v0; // xmm0_4\nsize_t n; // [rsp+8h] [rbp-38h] BYREF\nchar dest[5]; // [rsp+13h] [rbp-2Dh] BYREF\nchar *haystack; // [rsp+18h] [rbp-28h] BYREF\nchar *v5; // [rsp+20h] [rbp-20h]\nchar *src; // [rsp+28h] [rbp-18h]\nFILE *stream; // [rsp+30h] [rbp-10h]\nfloat v8; // [rsp+3Ch] [rbp-4h]\n\nhaystack = 0LL;\nv8 = 0.0;\nn = 0LL;\nstream = fopen(\"/proc/cpuinfo\", \"r\");\nif ( !stream )\nerr(-1, \"cannot open /proc/cpuinfo\\n\");\nwhile ( getline(&haystack, &n, stream) > 0 )\n{\nif ( strstr(haystack, \"model name\") )\n{\nsrc = strstr(haystack, \"@ \") + 2;\nv5 = strstr(haystack, \"GHz\");\nstrncpy(dest, src, v5 - src);\nv0 = atof(dest) * 10.0;\nv8 = v0;\nbreak;\n}\n}\nfree(haystack);\nfclose(stream);\nreturn (unsigned int)(int)v8;\n}\n\n\n\nQ:[dest,haystack,v5,src,stream,v8,sub_404CCF,]\nAssistant: ", "hints": "[]", "response": "{'dest': 'number', 'haystack': 'line', 'v5': 'end', 'src': 'begin', 'stream': 'fp', 'v8': 'value', 'sub_404CCF': 'clx_n_get_base_ratio'}"}
get_next_offset
da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b
axboe
fio
NA
static int get_next_offset(struct thread_data *td, struct io_u *io_u, bool *is_random) { struct fio_file *f = io_u->file; enum fio_ddir ddir = io_u->ddir; int rw_seq_hit = 0; assert(ddir_rw(ddir)); if (td->o.ddir_seq_nr && !--td->ddir_seq_nr) { rw_seq_hit = 1; td->ddir_seq_nr = td->o.ddir_seq_nr; } if (get_next_block(td, io_u, ddir, rw_seq_hit, is_random)) return 1; if (io_u->offset >= f->io_size) { dprint(FD_IO, "get_next_offset: offset %llu >= io_size %llu\n", (unsigned long long) io_u->offset, (unsigned long long) f->io_size); return 1; } io_u->offset += f->file_offset; if (io_u->offset >= f->real_file_size) { dprint(FD_IO, "get_next_offset: offset %llu >= size %llu\n", (unsigned long long) io_u->offset, (unsigned long long) f->real_file_size); return 1; } /* * For randtrimwrite, we decide whether to issue a trim or a write * based on whether the offsets for the most recent trim and write * operations match. If they don't match that means we just issued a * new trim and the next operation should be a write. If they *do* * match that means we just completed a trim+write pair and the next * command should be a trim. * * This works fine for sequential workloads but for random workloads * it's possible to complete a trim+write pair and then have the next * randomly generated offset match the previous offset. If that happens * we need to alter the offset for the last write operation in order * to ensure that we issue a write operation the next time through. */ if (td_randtrimwrite(td) && ddir == DDIR_TRIM && f->last_start[DDIR_TRIM] == io_u->offset) f->last_start[DDIR_WRITE]--; io_u->verify_offset = io_u->offset; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_451029", "function_addr": 4526121, "binary_name": "da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov rax, [rbp+var_30]"], [7, "mov rax, [rax+20h]"], [8, "mov [rbp+var_10], rax"], [9, "mov rax, [rbp+var_30]"], [10, "mov eax, [rax+2Ch]"], [11, "mov [rbp+var_14], eax"], [12, "mov [rbp+var_4], 0"], [13, "mov eax, [rbp+var_14]"], [14, "mov edi, eax"], [15, "call sub_44F0A2"], [16, "test eax, eax"], [17, "jnz short loc_451081"], [18, "mov ecx, offset aGetNextOffset"], [19, "mov edx, 1EBh"], [20, "mov esi, offset aIoUC"], [21, "mov edi, offset aDdirRwDdir_1"], [22, "call ___assert_fail"], [23, "mov rax, [rbp+var_28]"], [24, "mov eax, [rax+0C0h]"], [25, "test eax, eax"], [26, "jz short loc_4510CF"], [27, "mov rax, [rbp+var_28]"], [28, "mov eax, [rax+2E7FCh]"], [29, "lea edx, [rax-1]"], [30, "mov rax, [rbp+var_28]"], [31, "mov [rax+2E7FCh], edx"], [32, "mov rax, [rbp+var_28]"], [33, "mov eax, [rax+2E7FCh]"], [34, "test eax, eax"], [35, "jnz short loc_4510CF"], [36, "mov [rbp+var_4], 1"], [37, "mov rax, [rbp+var_28]"], [38, "mov edx, [rax+0C0h]"], [39, "mov rax, [rbp+var_28]"], [40, "mov [rax+2E7FCh], edx"], [41, "mov rdi, [rbp+var_38]"], [42, "mov ecx, [rbp+var_4]"], [43, "mov edx, [rbp+var_14]"], [44, "mov rsi, [rbp+var_30]"], [45, "mov rax, [rbp+var_28]"], [46, "mov r8, rdi"], [47, "mov rdi, rax"], [48, "call sub_450D10"], [49, "test eax, eax"], [50, "jz short loc_4510FA"], [51, "mov eax, 1"], [52, "jmp locret_451227"], [53, "mov rax, [rbp+var_30]"], [54, "mov rdx, [rax+48h]"], [55, "mov rax, [rbp+var_10]"], [56, "mov rax, [rax+40h]"], [57, "cmp rdx, rax"], [58, "jb short loc_451155"], [59, "mov rax, cs:fio_debug"], [60, "and eax, 4"], [61, "test rax, rax"], [62, "jz short loc_45114A"], [63, "mov rax, [rbp+var_10]"], [64, "mov rdx, [rax+40h]"], [65, "mov rax, [rbp+var_30]"], [66, "mov rax, [rax+48h]"], [67, "mov rcx, rdx"], [68, "mov rdx, rax"], [69, "mov esi, offset aGetNextOffsetO"], [70, "mov edi, 2"], [71, "mov eax, 0"], [72, "call __dprint"], [73, "jmp short loc_45114B"], [74, "nop"], [75, "mov eax, 1"], [76, "jmp locret_451227"], [77, "mov rax, [rbp+var_30]"], [78, "mov rdx, [rax+48h]"], [79, "mov rax, [rbp+var_10]"], [80, "mov rax, [rax+38h]"], [81, "add rdx, rax"], [82, "mov rax, [rbp+var_30]"], [83, "mov [rax+48h], rdx"], [84, "mov rax, [rbp+var_30]"], [85, "mov rdx, [rax+48h]"], [86, "mov rax, [rbp+var_10]"], [87, "mov rax, [rax+30h]"], [88, "cmp rdx, rax"], [89, "jb short loc_4511C8"], [90, "mov rax, cs:fio_debug"], [91, "and eax, 4"], [92, "test rax, rax"], [93, "jz short loc_4511C0"], [94, "mov rax, [rbp+var_10]"], [95, "mov rdx, [rax+30h]"], [96, "mov rax, [rbp+var_30]"], [97, "mov rax, [rax+48h]"], [98, "mov rcx, rdx"], [99, "mov rdx, rax"], [100, "mov esi, offset aGetNextOffsetO_0"], [101, "mov edi, 2"], [102, "mov eax, 0"], [103, "call __dprint"], [104, "jmp short loc_4511C1"], [105, "nop"], [106, "mov eax, 1"], [107, "jmp short locret_451227"], [108, "mov rax, [rbp+var_28]"], [109, "mov eax, [rax+0B0h]"], [110, "and eax, 0Eh"], [111, "cmp eax, 0Eh"], [112, "jnz short loc_451212"], [113, "cmp [rbp+var_14], 2"], [114, "jnz short loc_451212"], [115, "mov rax, [rbp+var_10]"], [116, "mov rdx, [rax+88h]"], [117, "mov rax, [rbp+var_30]"], [118, "mov rax, [rax+48h]"], [119, "cmp rdx, rax"], [120, "jnz short loc_451212"], [121, "mov rax, [rbp+var_10]"], [122, "mov rax, [rax+80h]"], [123, "lea rdx, [rax-1]"], [124, "mov rax, [rbp+var_10]"], [125, "mov [rax+80h], rdx"], [126, "mov rax, [rbp+var_30]"], [127, "mov rdx, [rax+48h]"], [128, "mov rax, [rbp+var_30]"], [129, "mov [rax+50h], rdx"], [130, "mov eax, 0"], [131, "leave"], [132, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 7], [9, 4], [10, 9], [11, 10], [13, 11], [14, 13], [16, 15], [17, 16], [23, 3], [24, 23], [25, 24], [26, 25], [27, 3], [28, 27], [29, 28], [30, 3], [31, 29], [31, 30], [32, 3], [33, 31], [33, 32], [34, 33], [35, 34], [37, 3], [38, 31], [38, 40], [38, 37], [39, 3], [40, 38], [40, 39], [41, 5], [42, 36], [42, 12], [43, 11], [44, 4], [45, 3], [46, 41], [47, 45], [49, 48], [50, 49], [53, 4], [54, 31], [54, 40], [54, 53], [55, 8], [56, 55], [56, 31], [56, 40], [57, 54], [57, 56], [58, 57], [60, 59], [61, 60], [62, 61], [63, 8], [64, 63], [64, 31], [64, 40], [65, 4], [66, 31], [66, 40], [66, 65], [67, 64], [68, 66], [77, 4], [78, 77], [78, 31], [78, 40], [78, 83], [79, 8], [80, 31], [80, 40], [80, 83], [80, 79], [81, 78], [81, 80], [82, 4], [83, 82], [83, 81], [84, 4], [85, 84], [85, 83], [86, 8], [87, 86], [87, 83], [88, 85], [88, 87], [89, 88], [91, 90], [92, 91], [93, 92], [94, 8], [95, 31], [95, 40], [95, 83], [95, 94], [96, 4], [97, 31], [97, 40], [97, 83], [97, 96], [98, 95], [99, 97], [108, 3], [109, 31], [109, 40], [109, 108], [109, 83], [110, 109], [111, 110], [112, 111], [113, 11], [114, 113], [115, 8], [116, 31], [116, 40], [116, 115], [116, 83], [117, 4], [118, 40], [118, 117], [118, 83], [118, 31], [119, 116], [119, 118], [120, 119], [121, 8], [122, 40], [122, 121], [122, 31], [122, 125], [122, 83], [123, 116], [123, 125], [123, 31], [123, 40], [123, 122], [123, 83], [124, 8], [125, 123], [125, 124], [126, 4], [127, 125], [127, 129], [127, 31], [127, 40], [127, 126], [127, 83], [128, 4], [129, 128], [129, 127], [132, 130], [132, 75], [132, 106], [132, 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/da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b_da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b.jsonl.gz", "strip_func_name": "sub_451029", "query": "\n\n\n__int64 __fastcall sub_451029(_DWORD *a1, __int64 a2, _BYTE *a3)\n{\nint v3; // er8\nint v4; // er9\n__int64 result; // rax\nint v7; // [rsp+2Ch] [rbp-14h]\n_QWORD *v8; // [rsp+30h] [rbp-10h]\nint v9; // [rsp+3Ch] [rbp-4h]\n\nv8 = *(_QWORD **)(a2 + 32);\nv7 = *(_DWORD *)(a2 + 44);\nv9 = 0;\nif ( !sub_44F0A2(v7) )\n__assert_fail(\"ddir_rw(ddir)\", \"io_u.c\", 0x1EBu, \"get_next_offset\");\nif ( a1[48] )\n{\nif ( !--a1[47615] )\n{\nv9 = 1;\na1[47615] = a1[48];\n}\n}\nif ( (unsigned int)sub_450D10(a1, a2, v7, v9, a3) )\nreturn 1LL;\nif ( *(_QWORD *)(a2 + 72) < v8[8] )\n{\n*(_QWORD *)(a2 + 72) += v8[7];\nif ( *(_QWORD *)(a2 + 72) < v8[6] )\n{\nif ( (a1[44] & 0xE) == 14 && v7 == 2 && v8[17] == *(_QWORD *)(a2 + 72) )\n--v8[16];\n*(_QWORD *)(a2 + 80) = *(_QWORD *)(a2 + 72);\nresult = 0LL;\n}\nelse\n{\nif ( (fio_debug & 4) != 0 )\n_dprint(2, (unsigned int)\"get_next_offset: offset %llu >= size %llu\\n\", *(_QWORD *)(a2 + 72), v8[6], v3, v4);\nresult = 1LL;\n}\n}\nelse\n{\nif ( (fio_debug & 4) != 0 )\n_dprint(2, (unsigned int)\"get_next_offset: offset %llu >= io_size %llu\\n\", *(_QWORD *)(a2 + 72), v8[8], v3, v4);\nresult = 1LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v7,v8,v9,sub_451029,sub_44F0A2,sub_450D10,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'is_random', 'a1': 'td', 'a2': 'io_u', 'v7': 'ddir', 'v8': 'f', 'v9': 'rw_seq_hit', 'sub_451029': 'get_next_offset', 'sub_44F0A2': 'ddir_rw_2', 'sub_450D10': 'get_next_block'}"}
raid_rec1of1
3b54f47e52feafa99f2a322077ce94adba76d924a1cf198effa3f45eb32a206c
amadvance
snapraid
NA
void raid_rec1of1(int *id, int nd, size_t size, void **v) { void *p; void *pa; /* for PAR1 we can directly compute the missing block */ /* and we don't need to use the zero buffer */ p = v[nd]; pa = v[id[0]]; /* use the parity as missing data block */ v[id[0]] = p; /* compute the parity over the missing data block */ v[nd] = pa; /* compute */ raid_gen(nd, 1, size, v); /* restore as before */ v[id[0]] = pa; v[nd] = p; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4018CF", "function_addr": 4200655, "binary_name": "3b54f47e52feafa99f2a322077ce94adba76d924a1cf198effa3f45eb32a206c.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_28], rdx"], [6, "mov [rbp+var_30], rcx"], [7, "mov eax, [rbp+var_1C]"], [8, "cdqe"], [9, "lea rdx, ds:0[rax*8]"], [10, "mov rax, [rbp+var_30]"], [11, "add rax, rdx"], [12, "mov rax, [rax]"], [13, "mov [rbp+var_8], rax"], [14, "mov rax, [rbp+var_18]"], [15, "mov eax, [rax]"], [16, "cdqe"], [17, "lea rdx, ds:0[rax*8]"], [18, "mov rax, [rbp+var_30]"], [19, "add rax, rdx"], [20, "mov rax, [rax]"], [21, "mov [rbp+var_10], rax"], [22, "mov rax, [rbp+var_18]"], [23, "mov eax, [rax]"], [24, "cdqe"], [25, "lea rdx, ds:0[rax*8]"], [26, "mov rax, [rbp+var_30]"], [27, "add rdx, rax"], [28, "mov rax, [rbp+var_8]"], [29, "mov [rdx], rax"], [30, "mov eax, [rbp+var_1C]"], [31, "cdqe"], [32, "lea rdx, ds:0[rax*8]"], [33, "mov rax, [rbp+var_30]"], [34, "add rdx, rax"], [35, "mov rax, [rbp+var_10]"], [36, "mov [rdx], rax"], [37, "mov rcx, [rbp+var_30]"], [38, "mov rdx, [rbp+var_28]"], [39, "mov eax, [rbp+var_1C]"], [40, "mov esi, 1"], [41, "mov edi, eax"], [42, "call sub_40122C"], [43, "mov rax, [rbp+var_18]"], [44, "mov eax, [rax]"], [45, "cdqe"], [46, "lea rdx, ds:0[rax*8]"], [47, "mov rax, [rbp+var_30]"], [48, "add rdx, rax"], [49, "mov rax, [rbp+var_10]"], [50, "mov [rdx], rax"], [51, "mov eax, [rbp+var_1C]"], [52, "cdqe"], [53, "lea rdx, ds:0[rax*8]"], [54, "mov rax, [rbp+var_30]"], [55, "add rdx, rax"], [56, "mov rax, [rbp+var_8]"], [57, "mov [rdx], rax"], [58, "nop"], [59, "leave"], [60, "retn"]], "data_dep": [[7, 4], [10, 6], [11, 10], [11, 9], [12, 11], [13, 12], [14, 3], [15, 14], [17, 9], [18, 6], [19, 18], [19, 17], [20, 19], [21, 20], [22, 3], [23, 22], [25, 17], [26, 6], [27, 25], [27, 26], [28, 13], [29, 28], [29, 27], [30, 4], [32, 27], [33, 6], [34, 33], [34, 32], [35, 21], [36, 34], [36, 35], [37, 6], [38, 5], [39, 4], [41, 39], [43, 3], [44, 36], [44, 43], [46, 38], [47, 6], [48, 47], [48, 46], [49, 21], [50, 49], [50, 48], [51, 4], [53, 48], [54, 6], [55, 53], [55, 54], [56, 13], [57, 56], [57, 55], [60, 56]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3b54f47e52feafa99f2a322077ce94adba76d924a1cf198effa3f45eb32a206c_3b54f47e52feafa99f2a322077ce94adba76d924a1cf198effa3f45eb32a206c.jsonl.gz", "strip_func_name": "sub_4018CF", "query": "\n\n\n__int64 __fastcall sub_4018CF(int *a1, signed int a2, __int64 a3, __int64 a4)\n{\n__int64 result; // rax\n__int64 v6; // [rsp+20h] [rbp-10h]\n__int64 v7; // [rsp+28h] [rbp-8h]\n\nv7 = *(_QWORD *)(8LL * a2 + a4);\nv6 = *(_QWORD *)(8LL * *a1 + a4);\n*(_QWORD *)(a4 + 8LL * *a1) = v7;\n*(_QWORD *)(a4 + 8LL * a2) = v6;\nsub_40122C(a2, 1, a3, a4);\n*(_QWORD *)(a4 + 8LL * *a1) = v6;\nresult = v7;\n*(_QWORD *)(a4 + 8LL * a2) = v7;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v6,v7,sub_4018CF,sub_40122C,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'size', 'a4': 'v', 'a1': 'id', 'a2': 'nd', 'v6': 'pa', 'v7': 'p', 'sub_4018CF': 'raid_rec1of1', 'sub_40122C': 'raid_gen'}"}
sz
3deaa26b246f8964cefc554f8e45c3fa1927a4b1f93f252cc3bdaf69e1399b61
EtchedPixels
EmulatorKit
NA
static void sz(struct am_context *ctx) { if (IS_SINGLE) { if ((*stpos(-1) | *stpos(-2)) == 0) ctx->status |= AM_ZERO; } else if (IS_FIXED) { if ((*stpos(-1) | *stpos(-2) | *stpos(-3) | *stpos(-4)) == 0) ctx->status |= AM_ZERO; } else { if ((*stpos(-2) & 0x80) == 0) ctx->status |= AM_ZERO; } if (*stpos(-1) & 0x80) ctx->status |= AM_SIGN; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43DD6E", "function_addr": 4447598, "binary_name": "3deaa26b246f8964cefc554f8e45c3fa1927a4b1f93f252cc3bdaf69e1399b61.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, "movzx eax, byte ptr [rax+21h]"], [5, "movzx eax, al"], [6, "and eax, 60h"], [7, "cmp eax, 60h "], [8, "jnz short loc_43DDDE"], [9, "mov rdx, [rbp+var_8]"], [10, "mov rax, [rbp+var_8]"], [11, "mov eax, [rax+10h]"], [12, "sub eax, 1"], [13, "cdqe"], [14, "and eax, 0Fh"], [15, "add rax, rdx"], [16, "movzx edx, byte ptr [rax]"], [17, "mov rcx, [rbp+var_8]"], [18, "mov rax, [rbp+var_8]"], [19, "mov eax, [rax+10h]"], [20, "sub eax, 2"], [21, "cdqe"], [22, "and eax, 0Fh"], [23, "add rax, rcx"], [24, "movzx eax, byte ptr [rax]"], [25, "or eax, edx"], [26, "test al, al"], [27, "jnz loc_43DEAB"], [28, "mov rax, [rbp+var_8]"], [29, "movzx eax, byte ptr [rax+20h]"], [30, "or eax, 20h"], [31, "mov edx, eax"], [32, "mov rax, [rbp+var_8]"], [33, "mov [rax+20h], dl"], [34, "jmp loc_43DEAB"], [35, "mov rax, [rbp+var_8]"], [36, "movzx eax, byte ptr [rax+21h]"], [37, "movzx eax, al"], [38, "and eax, 20h"], [39, "test eax, eax"], [40, "jz loc_43DE7A"], [41, "mov rdx, [rbp+var_8]"], [42, "mov rax, [rbp+var_8]"], [43, "mov eax, [rax+10h]"], [44, "sub eax, 1"], [45, "cdqe"], [46, "and eax, 0Fh"], [47, "add rax, rdx"], [48, "movzx edx, byte ptr [rax]"], [49, "mov rcx, [rbp+var_8]"], [50, "mov rax, [rbp+var_8]"], [51, "mov eax, [rax+10h]"], [52, "sub eax, 2"], [53, "cdqe"], [54, "and eax, 0Fh"], [55, "add rax, rcx"], [56, "movzx eax, byte ptr [rax]"], [57, "mov ecx, edx"], [58, "or ecx, eax"], [59, "mov rdx, [rbp+var_8]"], [60, "mov rax, [rbp+var_8]"], [61, "mov eax, [rax+10h]"], [62, "sub eax, 3"], [63, "cdqe"], [64, "and eax, 0Fh"], [65, "add rax, rdx"], [66, "movzx eax, byte ptr [rax]"], [67, "or ecx, eax"], [68, "mov rdx, [rbp+var_8]"], [69, "mov rax, [rbp+var_8]"], [70, "mov eax, [rax+10h]"], [71, "sub eax, 4"], [72, "cdqe"], [73, "and eax, 0Fh"], [74, "add rax, rdx"], [75, "movzx eax, byte ptr [rax]"], [76, "or eax, ecx"], [77, "test al, al"], [78, "jnz short loc_43DEAB"], [79, "mov rax, [rbp+var_8]"], [80, "movzx eax, byte ptr [rax+20h]"], [81, "or eax, 20h"], [82, "mov edx, eax"], [83, "mov rax, [rbp+var_8]"], [84, "mov [rax+20h], dl"], [85, "jmp short loc_43DEAB"], [86, "mov rdx, [rbp+var_8]"], [87, "mov rax, [rbp+var_8]"], [88, "mov eax, [rax+10h]"], [89, "sub eax, 2"], [90, "cdqe"], [91, "and eax, 0Fh"], [92, "add rax, rdx"], [93, "movzx eax, byte ptr [rax]"], [94, "test al, al"], [95, "js short loc_43DEAB"], [96, "mov rax, [rbp+var_8]"], [97, "movzx eax, byte ptr [rax+20h]"], [98, "or eax, 20h"], [99, "mov edx, eax"], [100, "mov rax, [rbp+var_8]"], [101, "mov [rax+20h], dl"], [102, "mov rdx, [rbp+var_8]"], [103, "mov rax, [rbp+var_8]"], [104, "mov eax, [rax+10h]"], [105, "sub eax, 1"], [106, "cdqe"], [107, "and eax, 0Fh"], [108, "add rax, rdx"], [109, "movzx eax, byte ptr [rax]"], [110, "test al, al"], [111, "jns short loc_43DEDC"], [112, "mov rax, [rbp+var_8]"], [113, "movzx eax, byte ptr [rax+20h]"], [114, "or eax, 40h"], [115, "mov edx, eax"], [116, "mov rax, [rbp+var_8]"], [117, "mov [rax+20h], dl"], [118, "nop"], [119, "pop rbp"], [120, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 2], [10, 2], [11, 10], [12, 11], [14, 12], [15, 14], [15, 9], [16, 15], [17, 2], [18, 2], [19, 18], [20, 19], [22, 20], [23, 22], [23, 17], [24, 23], [25, 24], [25, 16], [26, 25], [27, 26], [28, 2], [29, 28], [30, 29], [31, 30], [32, 2], [33, 31], [33, 32], [35, 2], [36, 35], [37, 36], [38, 37], [39, 38], [40, 39], [41, 2], [42, 2], [43, 42], [44, 43], [46, 44], [47, 41], [47, 46], [48, 47], [49, 2], [50, 2], [51, 50], [52, 51], [54, 52], [55, 54], [55, 49], [56, 55], [57, 48], [58, 56], [58, 57], [59, 2], [60, 2], [61, 60], [62, 61], [64, 62], [65, 64], [65, 59], [66, 65], [67, 58], [67, 66], [68, 2], [69, 2], [70, 69], [71, 70], [73, 71], [74, 73], [74, 68], [75, 74], [76, 67], [76, 75], [77, 76], [78, 77], [79, 2], [80, 79], [81, 80], [82, 81], [83, 2], [84, 83], [84, 82], [86, 2], [87, 2], [88, 87], [89, 88], [91, 89], [92, 91], [92, 86], [93, 92], [94, 93], [95, 94], [96, 2], [97, 96], [98, 97], [99, 98], [100, 2], [101, 99], [101, 100], [102, 2], [103, 2], [104, 84], [104, 33], [104, 101], [104, 103], [105, 104], [107, 105], [108, 107], [108, 102], [109, 33], [109, 108], [109, 101], [109, 84], [110, 109], [111, 110], [112, 2], [113, 117], [113, 101], [113, 112], [113, 84], [113, 33], [114, 113], [115, 114], [116, 2], [117, 116], [117, 115], [119, 0], [120, 110], [120, 116]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3deaa26b246f8964cefc554f8e45c3fa1927a4b1f93f252cc3bdaf69e1399b61_3deaa26b246f8964cefc554f8e45c3fa1927a4b1f93f252cc3bdaf69e1399b61.jsonl.gz", "strip_func_name": "sub_43DD6E", "query": "\n\n\n__int64 __fastcall sub_43DD6E(__int64 a1)\n{\n__int64 result; // rax\n\nif ( (*(_BYTE *)(a1 + 33) & 0x60) == 96 )\n{\nif ( !(*(_BYTE *)(a1 + (((unsigned __int8)*(_DWORD *)(a1 + 16) - 1) & 0xF)) | *(_BYTE *)(a1\n+ (((unsigned __int8)*(_DWORD *)(a1 + 16)\n- 2) & 0xF))) )\n*(_BYTE *)(a1 + 32) |= 0x20u;\n}\nelse if ( (*(_BYTE *)(a1 + 33) & 0x20) != 0 )\n{\nif ( !((unsigned __int8)(*(_BYTE *)(a1 + (((unsigned __int8)*(_DWORD *)(a1 + 16) - 3) & 0xF)) | *(_BYTE *)(a1 + (((unsigned __int8)*(_DWORD *)(a1 + 16) - 2) & 0xF)) | *(_BYTE *)(a1 + (((unsigned __int8)*(_DWORD *)(a1 + 16) - 1) & 0xF))) | *(_BYTE *)(a1 + (((unsigned __int8)*(_DWORD *)(a1 + 16) - 4) & 0xF))) )\n*(_BYTE *)(a1 + 32) |= 0x20u;\n}\nelse if ( *(char *)(a1 + (((unsigned __int8)*(_DWORD *)(a1 + 16) - 2) & 0xF)) >= 0 )\n{\n*(_BYTE *)(a1 + 32) |= 0x20u;\n}\nresult = *(unsigned __int8 *)(a1 + (((unsigned __int8)*(_DWORD *)(a1 + 16) - 1) & 0xF));\nif ( (result & 0x80u) != 0LL )\n{\nresult = a1;\n*(_BYTE *)(a1 + 32) |= 0x40u;\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_43DD6E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ctx', 'sub_43DD6E': 'sz'}"}
beacon_handle_secure_beacon
0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb
bluekitchen
btstack
NA
static void beacon_handle_secure_beacon(uint8_t * packet, uint16_t size){ if (size != SECURE_NETWORK_BEACON_LEN) return; // lookup subnet and netkey by network id uint8_t * beacon_network_id = &packet[2]; mesh_subnet_iterator_t it; mesh_subnet_iterator_init(&it); mesh_subnet_t * subnet = NULL; mesh_network_key_t * network_key = NULL; while (mesh_subnet_iterator_has_more(&it)){ mesh_subnet_t * item = mesh_subnet_iterator_get_next(&it); if (memcmp(item->old_key->network_id, beacon_network_id, 8) == 0 ) { subnet = item; network_key = item->old_key; } if (item->new_key != NULL && memcmp(item->new_key->network_id, beacon_network_id, 8) == 0 ) { subnet = item; network_key = item->new_key; } break; } if (subnet == NULL) return; // count beacon subnet->beacon_observation_counter++; // check if new flags are set uint8_t current_flags = mesh_secure_network_beacon_get_flags(subnet); uint8_t new_flags = packet[1] & (~current_flags); if (new_flags == 0) return; // validate beacon - if crytpo ready if (mesh_secure_network_beacon_active) return; mesh_secure_network_beacon_active = 1; (void)memcpy(mesh_secure_network_beacon_validate_buffer, &packet[0], SECURE_NETWORK_BEACON_LEN); btstack_crypto_aes128_cmac_message(&mesh_secure_network_beacon_cmac_request, network_key->beacon_key, 13, &mesh_secure_network_beacon_validate_buffer[1], mesh_secure_network_beacon_auth_value, &beacon_handle_secure_beacon_auth_value_calculated, subnet); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43570D", "function_addr": 4413197, "binary_name": "0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 58h"], [4, "mov [rbp+var_58], rdi"], [5, "mov eax, esi"], [6, "mov [rbp+var_5C], ax"], [7, "cmp [rbp+var_5C], 16h"], [8, "jnz loc_4358C0"], [9, "mov rax, [rbp+var_58]"], [10, "add rax, 2"], [11, "mov [rbp+s2], rax"], [12, "lea rax, [rbp+var_50]"], [13, "mov rdi, rax"], [14, "call sub_44CDA0"], [15, "mov [rbp+var_18], 0"], [16, "mov [rbp+var_20], 0"], [17, "nop"], [18, "lea rax, [rbp+var_50]"], [19, "mov rdi, rax"], [20, "call sub_44CDC0"], [21, "test eax, eax"], [22, "jz loc_4357F6"], [23, "lea rax, [rbp+var_50]"], [24, "mov rdi, rax"], [25, "call sub_44CDDD"], [26, "mov [rbp+var_30], rax"], [27, "mov rax, [rbp+var_30]"], [28, "mov rax, [rax+10h]"], [29, "lea rcx, [rax+3Dh]"], [30, "mov rax, [rbp+s2]"], [31, "mov edx, 8"], [32, "mov rsi, rax"], [33, "mov rdi, rcx"], [34, "call _memcmp"], [35, "test eax, eax"], [36, "jnz short loc_4357B0"], [37, "mov rax, [rbp+var_30]"], [38, "mov [rbp+var_18], rax"], [39, "mov rax, [rbp+var_30]"], [40, "mov rax, [rax+10h]"], [41, "mov [rbp+var_20], rax"], [42, "mov rax, [rbp+var_30]"], [43, "mov rax, [rax+18h]"], [44, "test rax, rax"], [45, "jz short loc_4357F5"], [46, "mov rax, [rbp+var_30]"], [47, "mov rax, [rax+18h]"], [48, "lea rcx, [rax+3Dh]"], [49, "mov rax, [rbp+s2]"], [50, "mov edx, 8"], [51, "mov rsi, rax"], [52, "mov rdi, rcx"], [53, "call _memcmp"], [54, "test eax, eax"], [55, "jnz short loc_4357F5"], [56, "mov rax, [rbp+var_30]"], [57, "mov [rbp+var_18], rax"], [58, "mov rax, [rbp+var_30]"], [59, "mov rax, [rax+18h]"], [60, "mov [rbp+var_20], rax"], [61, "nop"], [62, "cmp [rbp+var_18], 0"], [63, "jz loc_4358C3"], [64, "mov rax, [rbp+var_18]"], [65, "movzx eax, word ptr [rax+84h]"], [66, "lea edx, [rax+1]"], [67, "mov rax, [rbp+var_18]"], [68, "mov [rax+84h], dx"], [69, "mov rax, [rbp+var_18]"], [70, "mov rdi, rax"], [71, "call sub_435348"], [72, "mov [rbp+var_31], al"], [73, "mov rax, [rbp+var_58]"], [74, "add rax, 1"], [75, "movzx eax, byte ptr [rax]"], [76, "mov edx, eax"], [77, "movzx eax, [rbp+var_31]"], [78, "not eax"], [79, "and eax, edx"], [80, "mov [rbp+var_32], al"], [81, "cmp [rbp+var_32], 0"], [82, "jz short loc_4358C6"], [83, "mov eax, cs:dword_48B178"], [84, "test eax, eax"], [85, "jnz short loc_4358C9"], [86, "mov cs:dword_48B178, 1"], [87, "mov rax, [rbp+var_58]"], [88, "mov rcx, [rax]"], [89, "mov rbx, [rax+8]"], [90, "mov cs:qword_48B180, rcx"], [91, "mov cs:qword_48B188, rbx"], [92, "mov edx, [rax+10h]"], [93, "mov cs:dword_48B190, edx"], [94, "movzx eax, word ptr [rax+14h]"], [95, "mov cs:word_48B194, ax"], [96, "mov rax, [rbp+var_20]"], [97, "add rax, 2Dh "], [98, "sub rsp, 8"], [99, "push [rbp+var_18]"], [100, "mov r9d, offset sub_4356A9"], [101, "mov r8d, offset qword_48B160"], [102, "mov ecx, 48B181h"], [103, "mov edx, 0Dh"], [104, "mov rsi, rax"], [105, "mov edi, offset unk_48B120"], [106, "call sub_4288A6"], [107, "add rsp, 10h"], [108, "jmp short loc_4358CA"], [109, "nop"], [110, "jmp short loc_4358CA"], [111, "nop"], [112, "jmp short loc_4358CA"], [113, "nop"], [114, "jmp short loc_4358CA"], [115, "nop"], [116, "mov rbx, [rbp+var_8]"], [117, "leave"], [118, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 7], [9, 4], [10, 9], [11, 10], [12, 10], [13, 12], [18, 14], [19, 18], [21, 20], [22, 21], [23, 21], [24, 23], [26, 25], [27, 26], [28, 27], [29, 28], [30, 11], [32, 30], [33, 29], [35, 34], [36, 35], [37, 26], [38, 37], [39, 26], [40, 39], [41, 40], [42, 26], [43, 42], [44, 43], [45, 44], [46, 26], [47, 46], [48, 29], [48, 47], [49, 11], [51, 49], [52, 48], [54, 53], [55, 54], [56, 26], [57, 56], [58, 26], [59, 58], [60, 59], [62, 57], [62, 38], [62, 15], [63, 62], [64, 57], [64, 15], [64, 38], [65, 64], [66, 50], [66, 31], [66, 65], [67, 38], [67, 15], [67, 57], [68, 66], [68, 67], [69, 57], [69, 15], [69, 38], [70, 69], [72, 71], [73, 4], [74, 73], [75, 74], [75, 68], [76, 75], [77, 72], [78, 77], [79, 76], [79, 78], [80, 79], [81, 80], [82, 81], [84, 83], [85, 84], [87, 4], [88, 87], [88, 68], [89, 68], [89, 87], [90, 88], [91, 89], [92, 87], [92, 68], [93, 92], [94, 87], [94, 68], [95, 94], [96, 60], [96, 41], [96, 16], [97, 96], [98, 3], [99, 38], [99, 57], [99, 15], [104, 97], [107, 98], [118, 106], [118, 44], [118, 21], [118, 5], [118, 84], [118, 59], [118, 79], [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/0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb_0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb.jsonl.gz", "strip_func_name": "sub_43570D", "query": "\n\n\nchar __fastcall sub_43570D(__int64 a1, __int16 a2)\n{\n__int64 v2; // rax\n__int64 v3; // rbx\nchar v5[31]; // [rsp+10h] [rbp-50h] BYREF\nchar v6; // [rsp+2Fh] [rbp-31h]\n__int64 v7; // [rsp+30h] [rbp-30h]\nvoid *s2; // [rsp+38h] [rbp-28h]\n__int64 v9; // [rsp+40h] [rbp-20h]\n__int64 v10; // [rsp+48h] [rbp-18h]\n\nLOBYTE(v2) = a2;\nif ( a2 == 22 )\n{\ns2 = (void *)(a1 + 2);\nsub_44CDA0(v5);\nv10 = 0LL;\nv9 = 0LL;\nLODWORD(v2) = sub_44CDC0(v5);\nif ( (_DWORD)v2 )\n{\nv7 = sub_44CDDD(v5);\nif ( !memcmp((const void *)(*(_QWORD *)(v7 + 16) + 61LL), s2, 8uLL) )\n{\nv10 = v7;\nv9 = *(_QWORD *)(v7 + 16);\n}\nv2 = *(_QWORD *)(v7 + 24);\nif ( v2 )\n{\nLODWORD(v2) = memcmp((const void *)(*(_QWORD *)(v7 + 24) + 61LL), s2, 8uLL);\nif ( !(_DWORD)v2 )\n{\nv10 = v7;\nv2 = *(_QWORD *)(v7 + 24);\nv9 = v2;\n}\n}\n}\nif ( v10 )\n{\n++*(_WORD *)(v10 + 132);\nv6 = sub_435348(v10);\nLOBYTE(v2) = *(_BYTE *)(a1 + 1) & ~v6;\nv5[30] = v2;\nif ( (_BYTE)v2 )\n{\nLOBYTE(v2) = dword_48B178;\nif ( !dword_48B178 )\n{\ndword_48B178 = 1;\nv3 = *(_QWORD *)(a1 + 8);\nqword_48B180 = *(_QWORD *)a1;\nqword_48B188 = v3;\ndword_48B190 = *(_DWORD *)(a1 + 16);\nword_48B194 = *(_WORD *)(a1 + 20);\nLOBYTE(v2) = sub_4288A6(\n(__int64)&unk_48B120,\nv9 + 45,\n13,\n4764033LL,\n(__int64)&qword_48B160,\n(__int64)sub_4356A9,\nv10);\n}\n}\n}\n}\nreturn v2;\n}\n\n\n\nQ:[a1,a2,v5,v6,v7,s2,v9,v10,sub_43570D,sub_44CDA0,sub_44CDC0,sub_44CDDD,sub_435348,sub_4288A6,sub_4356A9,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'packet', 'a2': 'size', 'v5': 'it', 'v6': 'current_flags', 'v7': 'item', 's2': 'beacon_network_id', 'v9': 'network_key', 'v10': 'subnet', 'sub_43570D': 'beacon_handle_secure_beacon', 'sub_44CDA0': 'mesh_subnet_iterator_init', 'sub_44CDC0': 'mesh_subnet_iterator_has_more', 'sub_44CDDD': 'mesh_subnet_iterator_get_next', 'sub_435348': 'mesh_secure_network_beacon_get_flags', 'sub_4288A6': 'btstack_crypto_aes128_cmac_message', 'sub_4356A9': 'beacon_handle_secure_beacon_auth_value_calculated'}"}
ieee802_1x_set_sta_authorized
20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640
sonic-net
sonic-buildimage
NA
void ieee802_1x_set_sta_authorized(struct hostapd_data *hapd, struct sta_info *sta, int authorized) { int res; if (sta->flags & WLAN_STA_PREAUTH) return; if (authorized) { ap_sta_set_authorized(hapd, sta, 1); res = hostapd_set_authorized(hapd, sta, 1); hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, HOSTAPD_LEVEL_DEBUG, "authorizing port"); } else { ap_sta_set_authorized(hapd, sta, 0); res = hostapd_set_authorized(hapd, sta, 0); hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X, HOSTAPD_LEVEL_DEBUG, "unauthorizing port"); } if (res && errno != ENOENT) { wpa_printf(MSG_DEBUG, "Could not set station " MACSTR " flags for kernel driver (errno=%d).", MAC2STR(sta->addr), errno); } if (authorized) { os_get_reltime(&sta->connected_time); accounting_sta_start(hapd, sta); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_424A07", "function_addr": 4344327, "binary_name": "20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_24], edx"], [6, "mov rax, [rbp+var_20]"], [7, "mov eax, [rax+34h]"], [8, "and eax, 100h"], [9, "test eax, eax"], [10, "jnz loc_424B9B"], [11, "cmp [rbp+var_24], 0"], [12, "jz short loc_424A92"], [13, "mov rcx, [rbp+var_20]"], [14, "mov rax, [rbp+var_18]"], [15, "mov edx, 1"], [16, "mov rsi, rcx"], [17, "mov rdi, rax"], [18, "call sub_432955"], [19, "mov rcx, [rbp+var_20]"], [20, "mov rax, [rbp+var_18]"], [21, "mov edx, 1"], [22, "mov rsi, rcx"], [23, "mov rdi, rax"], [24, "call sub_458C2E"], [25, "mov [rbp+var_4], eax"], [26, "mov rax, [rbp+var_20]"], [27, "lea rsi, [rax+10h]"], [28, "mov rax, [rbp+var_18]"], [29, "mov r8d, offset aAuthorizingPor"], [30, "mov ecx, 1"], [31, "mov edx, 2"], [32, "mov rdi, rax"], [33, "mov eax, 0"], [34, "call sub_471181"], [35, "jmp short loc_424AEE"], [36, "mov rcx, [rbp+var_20]"], [37, "mov rax, [rbp+var_18]"], [38, "mov edx, 0"], [39, "mov rsi, rcx"], [40, "mov rdi, rax"], [41, "call sub_432955"], [42, "mov rcx, [rbp+var_20]"], [43, "mov rax, [rbp+var_18]"], [44, "mov edx, 0"], [45, "mov rsi, rcx"], [46, "mov rdi, rax"], [47, "call sub_458C2E"], [48, "mov [rbp+var_4], eax"], [49, "mov rax, [rbp+var_20]"], [50, "lea rsi, [rax+10h]"], [51, "mov rax, [rbp+var_18]"], [52, "mov r8d, offset aUnauthorizingP"], [53, "mov ecx, 1"], [54, "mov edx, 2"], [55, "mov rdi, rax"], [56, "mov eax, 0"], [57, "call sub_471181"], [58, "cmp [rbp+var_4], 0"], [59, "jz short loc_424B6E"], [60, "call ___errno_location"], [61, "mov eax, [rax]"], [62, "cmp eax, 2"], [63, "jz short loc_424B6E"], [64, "call ___errno_location"], [65, "mov edi, [rax]"], [66, "mov rax, [rbp+var_20]"], [67, "movzx eax, byte ptr [rax+15h]"], [68, "movzx esi, al"], [69, "mov rax, [rbp+var_20]"], [70, "movzx eax, byte ptr [rax+14h]"], [71, "movzx ecx, al"], [72, "mov rax, [rbp+var_20]"], [73, "movzx eax, byte ptr [rax+13h]"], [74, "movzx r9d, al"], [75, "mov rax, [rbp+var_20]"], [76, "movzx eax, byte ptr [rax+12h]"], [77, "movzx r8d, al"], [78, "mov rax, [rbp+var_20]"], [79, "movzx eax, byte ptr [rax+11h]"], [80, "movzx edx, al"], [81, "mov rax, [rbp+var_20]"], [82, "movzx eax, byte ptr [rax+10h]"], [83, "movzx eax, al"], [84, "sub rsp, 8"], [85, "push rdi"], [86, "push rsi"], [87, "push rcx"], [88, "mov ecx, edx"], [89, "mov edx, eax"], [90, "mov esi, offset aCouldNotSetSta"], [91, "mov edi, 2"], [92, "mov eax, 0"], [93, "call sub_46FC12"], [94, "add rsp, 20h"], [95, "cmp [rbp+var_24], 0"], [96, "jz short locret_424B9C"], [97, "mov rax, [rbp+var_20]"], [98, "add rax, 1B8h"], [99, "mov rdi, rax"], [100, "call sub_471E06"], [101, "mov rdx, [rbp+var_20]"], [102, "mov rax, [rbp+var_18]"], [103, "mov rsi, rdx"], [104, "mov rdi, rax"], [105, "call sub_45781E"], [106, "jmp short locret_424B9C"], [107, "nop"], [108, "leave"], [109, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 7], [9, 8], [10, 9], [11, 5], [12, 11], [13, 4], [14, 3], [16, 13], [17, 14], [19, 4], [20, 3], [22, 19], [23, 20], [25, 24], [26, 4], [27, 22], [27, 26], [28, 3], [32, 28], [36, 4], [37, 3], [39, 36], [40, 37], [42, 4], [43, 3], [45, 42], [46, 43], [48, 47], [49, 4], [50, 45], [50, 49], [51, 3], [55, 51], [58, 25], [58, 48], [59, 58], [61, 60], [62, 61], [63, 62], [65, 64], [66, 4], [67, 66], [68, 67], [69, 4], [70, 69], [71, 70], [72, 4], [73, 72], [74, 73], [75, 4], [76, 75], [77, 76], [78, 4], [79, 78], [80, 79], [81, 4], [82, 81], [83, 82], [84, 2], [85, 65], [86, 68], [87, 71], [88, 80], [89, 83], [94, 84], [95, 5], [96, 95], [97, 4], [98, 97], [99, 98], [101, 4], [102, 3], [103, 101], [104, 102], [109, 34], [109, 9], [109, 57], [109, 105], [109, 61], [109, 93]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640_20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640.jsonl.gz", "strip_func_name": "sub_424A07", "query": "\n\n\n__int64 __fastcall sub_424A07(__int64 a1, __int64 a2, int a3)\n{\n__int64 result; // rax\nint v4; // er9\nint v5; // er9\nint v7; // [rsp+2Ch] [rbp-4h]\n\nresult = *(_DWORD *)(a2 + 52) & 0x100;\nif ( !(_DWORD)result )\n{\nif ( a3 )\n{\nsub_432955(a1, a2, 1LL);\nv7 = sub_458C2E(a1, a2, 1LL);\nresult = sub_471181(a1, (int)a2 + 16, 2, 1, (unsigned int)\"authorizing port\", v4);\n}\nelse\n{\nsub_432955(a1, a2, 0LL);\nv7 = sub_458C2E(a1, a2, 0LL);\nresult = sub_471181(a1, (int)a2 + 16, 2, 1, (unsigned int)\"unauthorizing port\", v5);\n}\nif ( v7 )\n{\nresult = (unsigned int)*__errno_location();\nif ( (_DWORD)result != 2 )\n{\n__errno_location();\nresult = sub_46FC12(\n2,\n(unsigned int)\"Could not set station %02x:%02x:%02x:%02x:%02x:%02x flags for kernel driver (errno=%d).\",\n*(unsigned __int8 *)(a2 + 16),\n*(unsigned __int8 *)(a2 + 17),\n*(unsigned __int8 *)(a2 + 18),\n*(unsigned __int8 *)(a2 + 19));\n}\n}\nif ( a3 )\n{\nsub_471E06(a2 + 440);\nresult = sub_45781E(a1, a2);\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v7,sub_424A07,sub_432955,sub_458C2E,sub_471181,sub_46FC12,sub_471E06,sub_45781E,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'authorized', 'a1': 'hapd', 'a2': 'sta', 'v7': 'res', 'sub_424A07': 'ieee802_1x_set_sta_authorized', 'sub_432955': 'ap_sta_set_authorized', 'sub_458C2E': 'hostapd_set_authorized', 'sub_471181': 'hostapd_logger', 'sub_46FC12': 'wpa_printf', 'sub_471E06': 'os_get_reltime', 'sub_45781E': 'accounting_sta_start'}"}
grep_source_load_driver
f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83
msysgit
msysgit
NA
void grep_source_load_driver(struct grep_source *gs) { if (gs->driver) return; grep_attr_lock(); if (gs->path) gs->driver = userdiff_find_by_path(gs->path); if (!gs->driver) gs->driver = userdiff_find_by_name("default"); grep_attr_unlock(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_486298", "function_addr": 4743832, "binary_name": "f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83.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+30h]"], [6, "test rax, rax"], [7, "jnz short loc_486301"], [8, "call sub_484DFD"], [9, "mov rax, [rbp+var_8]"], [10, "mov rax, [rax+28h]"], [11, "test rax, rax"], [12, "jz short loc_4862DB"], [13, "mov rax, [rbp+var_8]"], [14, "mov rax, [rax+28h]"], [15, "mov rdi, rax"], [16, "call sub_4A1E13"], [17, "mov rdx, [rbp+var_8]"], [18, "mov [rdx+30h], rax"], [19, "mov rax, [rbp+var_8]"], [20, "mov rax, [rax+30h]"], [21, "test rax, rax"], [22, "jnz short loc_4862FA"], [23, "mov edi, offset aDefault_3"], [24, "call sub_4A1DE5"], [25, "mov rdx, [rbp+var_8]"], [26, "mov [rdx+30h], rax"], [27, "call sub_484E18"], [28, "jmp short locret_486302"], [29, "nop"], [30, "leave"], [31, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [9, 3], [10, 9], [11, 10], [12, 11], [13, 3], [14, 13], [15, 14], [17, 3], [18, 17], [18, 16], [19, 3], [20, 19], [20, 18], [21, 20], [22, 21], [25, 3], [26, 24], [26, 25], [31, 6], [31, 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/f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83_f831702f41994ee170774af7a79dac102dd372be4a801864a0cdf0753939ec83.jsonl.gz", "strip_func_name": "sub_486298", "query": "\n\n\nint __fastcall sub_486298(__int64 a1)\n{\n__int64 v1; // rax\n\nv1 = *(_QWORD *)(a1 + 48);\nif ( !v1 )\n{\nsub_484DFD();\nif ( *(_QWORD *)(a1 + 40) )\n*(_QWORD *)(a1 + 48) = sub_4A1E13(*(_QWORD *)(a1 + 40));\nif ( !*(_QWORD *)(a1 + 48) )\n*(_QWORD *)(a1 + 48) = sub_4A1DE5(\"default\");\nLODWORD(v1) = sub_484E18();\n}\nreturn v1;\n}\n\n\n\nQ:[a1,sub_486298,sub_484DFD,sub_4A1E13,sub_4A1DE5,sub_484E18,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'gs_0', 'sub_486298': 'grep_source_load_driver', 'sub_484DFD': 'grep_attr_lock', 'sub_4A1E13': 'userdiff_find_by_path', 'sub_4A1DE5': 'userdiff_find_by_name', 'sub_484E18': 'grep_attr_unlock'}"}
qcsapi_wifi_get_hw_noise_per_association
501cccf918b79847e8ca63bec31f6c1a738c67ece900875150908962c3feed30
coolsnowwolf
lede
NA
int qcsapi_wifi_get_hw_noise_per_association(const char * ifname, const qcsapi_unsigned_int association_index, int * p_hw_noise) { int retries = 0; int ret; CLIENT *clnt = qcsapi_adapter_get_client(); enum clnt_stat __rpcret; struct qcsapi_wifi_get_hw_noise_per_association_rpcdata __req; struct qcsapi_wifi_get_hw_noise_per_association_rpcdata __resp; memset(&__req, 0, sizeof(__req)); memset(&__resp, 0, sizeof(__resp)); __rpc_string __rpcifname = {(char *)ifname}; __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; __req.ifname = p__rpcifname; __req.association_index = (unsigned int)association_index; __req.p_hw_noise = (int *)p_hw_noise; if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } client_qcsapi_pre(); while (1) { __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_HW_NOISE_PER_ASSOCIATION_REMOTE, (xdrproc_t)xdr_qcsapi_wifi_get_hw_noise_per_association_rpcdata, (caddr_t)&__req, (xdrproc_t)xdr_qcsapi_wifi_get_hw_noise_per_association_rpcdata, (caddr_t)&__resp, __timeout); if (__rpcret == RPC_SUCCESS) { client_qcsapi_post(0); break; } else { clnt_perror (clnt, "qcsapi_wifi_get_hw_noise_per_association call failed"); clnt_perrno (__rpcret); if (retries >= retries_limit) { client_qcsapi_post(1); xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_hw_noise_per_association_rpcdata, (caddr_t)&__resp); return -ENOLINK; } retries++; client_qcsapi_reconnect(); } } if (__resp.return_code >= 0) { if (p_hw_noise) *p_hw_noise = *__resp.p_hw_noise; } if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } ret = __resp.return_code; xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_hw_noise_per_association_rpcdata, (caddr_t)&__resp); return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_479CE7", "function_addr": 4693223, "binary_name": "501cccf918b79847e8ca63bec31f6c1a738c67ece900875150908962c3feed30.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 90h"], [3, "mov [rbp+var_78], rdi"], [4, "mov [rbp+var_7C], esi"], [5, "mov [rbp+var_88], rdx"], [6, "mov [rbp+var_4], 0"], [7, "call sub_447E6C"], [8, "mov [rbp+clnt], rax"], [9, "lea rax, [rbp+s]"], [10, "mov edx, 20h "], [11, "mov esi, 0"], [12, "mov rdi, rax"], [13, "call _memset"], [14, "lea rax, [rbp+objp]"], [15, "mov edx, 20h "], [16, "mov esi, 0"], [17, "mov rdi, rax"], [18, "call _memset"], [19, "mov rax, [rbp+var_78]"], [20, "mov [rbp+var_68], rax"], [21, "cmp [rbp+var_78], 0"], [22, "jz short loc_479D51"], [23, "lea rax, [rbp+var_68]"], [24, "jmp short loc_479D56"], [25, "mov eax, 0"], [26, "mov [rbp+var_18], rax"], [27, "mov rax, [rbp+var_18]"], [28, "mov [rbp+s], rax"], [29, "mov eax, [rbp+var_7C]"], [30, "mov [rbp+var_38], eax"], [31, "mov rax, [rbp+var_88]"], [32, "mov [rbp+var_30], rax"], [33, "mov eax, 0"], [34, "test eax, eax"], [35, "jz short loc_479DAD"], [36, "mov rax, cs:stderr_ptr"], [37, "mov rax, [rax]"], [38, "lea r8, aQcsapiWifiGetH_3"], [39, "mov ecx, 4C8Bh"], [40, "lea rdx, aQcsapiRpcGener"], [41, "lea rsi, aSDSPre"], [42, "mov rdi, rax"], [43, "mov eax, 0"], [44, "call _fprintf"], [45, "lea rdi, aQcsapiWifiGetH_3"], [46, "call sub_447EFE"], [47, "mov rax, [rbp+clnt]"], [48, "mov rax, [rax+8]"], [49, "mov r10, [rax]"], [50, "lea rcx, [rbp+objp]"], [51, "lea rdx, [rbp+s]"], [52, "mov rax, [rbp+clnt]"], [53, "push cs:qword_4BF588"], [54, "push cs:qword_4BF580"], [55, "mov r9, rcx"], [56, "mov rcx, offset sub_441DDE"], [57, "mov r8, rcx"], [58, "mov rcx, rdx"], [59, "mov rdx, offset sub_441DDE"], [60, "mov esi, 0BFFh"], [61, "mov rdi, rax"], [62, "call r10"], [63, "add rsp, 10h"], [64, "mov [rbp+num], eax"], [65, "cmp [rbp+num], 0"], [66, "jnz short loc_479E2A"], [67, "mov esi, 0"], [68, "lea rdi, aQcsapiWifiGetH_3"], [69, "call sub_447F29"], [70, "nop"], [71, "mov eax, [rbp+var_48]"], [72, "test eax, eax"], [73, "js loc_479EB1"], [74, "jmp short loc_479E98"], [75, "mov rax, [rbp+clnt]"], [76, "lea rsi, aQcsapiWifiGetH_4"], [77, "mov rdi, rax"], [78, "call _clnt_perror"], [79, "mov eax, [rbp+num]"], [80, "mov edi, eax"], [81, "call _clnt_perrno"], [82, "mov eax, cs:dword_4BF570"], [83, "cmp [rbp+var_4], eax"], [84, "jl short loc_479E83"], [85, "mov esi, 1"], [86, "lea rdi, aQcsapiWifiGetH_3"], [87, "call sub_447F29"], [88, "lea rax, [rbp+objp]"], [89, "mov rsi, rax"], [90, "mov rax, offset sub_441DDE"], [91, "mov rdi, rax"], [92, "call _xdr_free"], [93, "mov eax, 0FFFFFFBDh"], [94, "jmp locret_479F0A"], [95, "add [rbp+var_4], 1"], [96, "lea rdi, aQcsapiWifiGetH_3"], [97, "call sub_447F5C"], [98, "jmp loc_479DB9"], [99, "cmp [rbp+var_88], 0"], [100, "jz short loc_479EB1"], [101, "mov rax, [rbp+var_50]"], [102, "mov edx, [rax]"], [103, "mov rax, [rbp+var_88]"], [104, "mov [rax], edx"], [105, "mov eax, 0"], [106, "test eax, eax"], [107, "jz short loc_479EEB"], [108, "mov rax, cs:stderr_ptr"], [109, "mov rax, [rax]"], [110, "lea r8, aQcsapiWifiGetH_3"], [111, "mov ecx, 4CA7h"], [112, "lea rdx, aQcsapiRpcGener"], [113, "lea rsi, aSDSPost"], [114, "mov rdi, rax"], [115, "mov eax, 0"], [116, "call _fprintf"], [117, "mov eax, [rbp+var_48]"], [118, "mov [rbp+var_20], eax"], [119, "lea rax, [rbp+objp]"], [120, "mov rsi, rax"], [121, "mov rax, offset sub_441DDE"], [122, "mov rdi, rax"], [123, "call _xdr_free"], [124, "mov eax, [rbp+var_20]"], [125, "leave"], [126, "retn"]], "data_dep": [[8, 7], [9, 7], [12, 9], [14, 13], [17, 14], [19, 3], [20, 19], [21, 3], [22, 21], [23, 20], [23, 19], [26, 23], [26, 25], [27, 26], [28, 27], [29, 4], [30, 29], [31, 5], [32, 31], [34, 33], [35, 34], [37, 36], [40, 15], [41, 16], [42, 37], [45, 42], [45, 17], [47, 8], [48, 47], [49, 48], [50, 58], [50, 39], [51, 59], [51, 15], [51, 40], [51, 28], [52, 8], [55, 50], [57, 56], [58, 51], [61, 52], [62, 49], [63, 63], [63, 2], [64, 62], [65, 64], [66, 65], [68, 61], [72, 71], [73, 72], [75, 8], [76, 60], [77, 75], [79, 64], [80, 79], [83, 82], [83, 6], [83, 95], [84, 83], [86, 80], [88, 87], [89, 88], [91, 90], [95, 6], [95, 95], [96, 80], [99, 5], [100, 99], [102, 101], [103, 5], [104, 102], [104, 103], [106, 105], [107, 106], [109, 104], [109, 108], [110, 57], [112, 59], [112, 102], [113, 67], [114, 109], [118, 117], [119, 117], [120, 119], [122, 121], [124, 118], [126, 93], [126, 124]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/501cccf918b79847e8ca63bec31f6c1a738c67ece900875150908962c3feed30_501cccf918b79847e8ca63bec31f6c1a738c67ece900875150908962c3feed30.jsonl.gz", "strip_func_name": "sub_479CE7", "query": "\n\n\n__int64 __fastcall sub_479CE7(__int64 a1, int a2, _DWORD *a3)\n{\n__int64 *v3; // rax\n__int64 v6; // [rsp+28h] [rbp-68h] BYREF\nchar objp[16]; // [rsp+30h] [rbp-60h] BYREF\n_DWORD *v8; // [rsp+40h] [rbp-50h]\nint v9; // [rsp+48h] [rbp-48h]\n__int64 *s; // [rsp+50h] [rbp-40h] BYREF\nint v11; // [rsp+58h] [rbp-38h]\n_DWORD *v12; // [rsp+60h] [rbp-30h]\nunsigned int v13; // [rsp+70h] [rbp-20h]\nenum clnt_stat num; // [rsp+74h] [rbp-1Ch]\n__int64 *v15; // [rsp+78h] [rbp-18h]\nCLIENT *clnt; // [rsp+80h] [rbp-10h]\nint v17; // [rsp+8Ch] [rbp-4h]\n\nv17 = 0;\nclnt = (CLIENT *)sub_447E6C();\nmemset(&s, 0, 0x20uLL);\nmemset(objp, 0, 0x20uLL);\nv6 = a1;\nif ( a1 )\nv3 = &v6;\nelse\nv3 = 0LL;\nv15 = v3;\ns = v3;\nv11 = a2;\nv12 = a3;\nsub_447EFE((__int64)\"qcsapi_wifi_get_hw_noise_per_association\");\nwhile ( 1 )\n{\nnum = ((__int64 (__fastcall *)(CLIENT *, __int64, _BOOL8 (__fastcall *)(XDR *, void *), __int64 **, _BOOL8 (__fastcall *)(XDR *, void *), char *, __int64, __int64))clnt->cl_ops->cl_call)(\nclnt,\n3071LL,\nsub_441DDE,\n&s,\nsub_441DDE,\nobjp,\nqword_4BF580,\nqword_4BF588);\nif ( num == RPC_SUCCESS )\nbreak;\nclnt_perror(clnt, \"qcsapi_wifi_get_hw_noise_per_association call failed\");\nclnt_perrno(num);\nif ( v17 >= dword_4BF570 )\n{\nsub_447F29((__int64)\"qcsapi_wifi_get_hw_noise_per_association\", 1u);\nxdr_free((xdrproc_t)sub_441DDE, objp);\nreturn 4294967229LL;\n}\n++v17;\nsub_447F5C((__int64)\"qcsapi_wifi_get_hw_noise_per_association\");\n}\nsub_447F29((__int64)\"qcsapi_wifi_get_hw_noise_per_association\", 0);\nif ( v9 >= 0 )\n{\nif ( a3 )\n*a3 = *v8;\n}\nv13 = v9;\nxdr_free((xdrproc_t)sub_441DDE, objp);\nreturn v13;\n}\n\n\n\nQ:[a3,a1,a2,v6,objp,s,num,v15,v17,sub_479CE7,sub_447E6C,sub_441DDE,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'p_hw_noise', 'a1': 'ifname', 'a2': 'association_index', 'v6': '__rpcifname', 'objp': '__resp', 's': '__req', 'num': '__rpcret', 'v15': 'p__rpcifname', 'v17': 'retries', 'sub_479CE7': 'qcsapi_wifi_get_hw_noise_per_association', 'sub_447E6C': 'qcsapi_adapter_get_client', 'sub_441DDE': 'xdr_qcsapi_wifi_get_hw_noise_per_association_rpcdata'}"}
u8x8_cad_SendCmd
f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4
olikraus
u8g2
NA
uint8_t u8x8_cad_SendCmd(u8x8_t *u8x8, uint8_t cmd) { return u8x8->cad_cb(u8x8, U8X8_MSG_CAD_SEND_CMD, cmd, NULL); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_424ED1", "function_addr": 4345553, "binary_name": "f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_C], al"], [6, "mov rax, [rbp+var_8]"], [7, "mov r8, [rax+18h]"], [8, "movzx edx, [rbp+var_C]"], [9, "mov rax, [rbp+var_8]"], [10, "mov ecx, 0"], [11, "mov esi, 15h"], [12, "mov rdi, rax"], [13, "call r8"], [14, "leave"], [15, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 6], [8, 5], [9, 3], [12, 9], [13, 7], [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/f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4_f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4.jsonl.gz", "strip_func_name": "sub_424ED1", "query": "\n\n\n__int64 __fastcall sub_424ED1(__int64 a1, unsigned __int8 a2)\n{\nreturn (*(__int64 (__fastcall **)(__int64, __int64, _QWORD, _QWORD))(a1 + 24))(a1, 21LL, a2, 0LL);\n}\n\n\n\nQ:[a1,a2,sub_424ED1,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'u8x8', 'a2': 'cmd', 'sub_424ED1': 'u8x8_cad_SendCmd'}"}
invShiftRows
edb96c2c14fc503e1ae1f6685c845e9b6c16cbcc0d41ba180c95f664349119d9
lmshao
AES
NA
int invShiftRows(uint8_t (*state)[4]) { uint32_t block[4] = {0}; /* i: row */ for (int i = 0; i < 4; ++i) { LOAD32H(block[i], state[i]); block[i] = ROR32(block[i], 8*i); STORE32H(block[i], state[i]); } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401A6B", "function_addr": 4201067, "binary_name": "edb96c2c14fc503e1ae1f6685c845e9b6c16cbcc0d41ba180c95f664349119d9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_28], rdi"], [3, "mov [rbp+var_20], 0"], [4, "mov [rbp+var_18], 0"], [5, "mov [rbp+var_4], 0"], [6, "jmp loc_401BE2"], [7, "mov eax, [rbp+var_4]"], [8, "cdqe"], [9, "lea rdx, ds:0[rax*4]"], [10, "mov rax, [rbp+var_28]"], [11, "add rax, rdx"], [12, "movzx eax, byte ptr [rax]"], [13, "movzx eax, al"], [14, "shl eax, 18h"], [15, "mov edx, eax"], [16, "mov eax, [rbp+var_4]"], [17, "cdqe"], [18, "lea rcx, ds:0[rax*4]"], [19, "mov rax, [rbp+var_28]"], [20, "add rax, rcx"], [21, "movzx eax, byte ptr [rax+1]"], [22, "movzx eax, al"], [23, "shl eax, 10h"], [24, "or edx, eax"], [25, "mov eax, [rbp+var_4]"], [26, "cdqe"], [27, "lea rcx, ds:0[rax*4]"], [28, "mov rax, [rbp+var_28]"], [29, "add rax, rcx"], [30, "movzx eax, byte ptr [rax+2]"], [31, "movzx eax, al"], [32, "shl eax, 8"], [33, "or edx, eax"], [34, "mov eax, [rbp+var_4]"], [35, "cdqe"], [36, "lea rcx, ds:0[rax*4]"], [37, "mov rax, [rbp+var_28]"], [38, "add rax, rcx"], [39, "movzx eax, byte ptr [rax+3]"], [40, "movzx eax, al"], [41, "or edx, eax"], [42, "mov eax, [rbp+var_4]"], [43, "cdqe"], [44, "mov dword ptr [rbp+rax*4+var_20], edx"], [45, "mov eax, [rbp+var_4]"], [46, "cdqe"], [47, "mov edx, dword ptr [rbp+rax*4+var_20]"], [48, "mov eax, [rbp+var_4]"], [49, "shl eax, 3"], [50, "mov esi, edx"], [51, "mov ecx, eax"], [52, "shr esi, cl"], [53, "mov eax, [rbp+var_4]"], [54, "cdqe"], [55, "mov edx, dword ptr [rbp+rax*4+var_20]"], [56, "mov eax, 4"], [57, "sub eax, [rbp+var_4]"], [58, "shl eax, 3"], [59, "mov ecx, eax"], [60, "shl edx, cl"], [61, "mov eax, edx"], [62, "or esi, eax"], [63, "mov edx, esi"], [64, "mov eax, [rbp+var_4]"], [65, "cdqe"], [66, "mov dword ptr [rbp+rax*4+var_20], edx"], [67, "mov eax, [rbp+var_4]"], [68, "cdqe"], [69, "mov eax, dword ptr [rbp+rax*4+var_20]"], [70, "shr eax, 18h"], [71, "mov edx, eax"], [72, "mov eax, [rbp+var_4]"], [73, "cdqe"], [74, "lea rcx, ds:0[rax*4]"], [75, "mov rax, [rbp+var_28]"], [76, "add rax, rcx"], [77, "mov [rax], dl"], [78, "mov eax, [rbp+var_4]"], [79, "cdqe"], [80, "mov eax, dword ptr [rbp+rax*4+var_20]"], [81, "shr eax, 10h"], [82, "mov edx, eax"], [83, "mov eax, [rbp+var_4]"], [84, "cdqe"], [85, "lea rcx, ds:0[rax*4]"], [86, "mov rax, [rbp+var_28]"], [87, "add rax, rcx"], [88, "mov [rax+1], dl"], [89, "mov eax, [rbp+var_4]"], [90, "cdqe"], [91, "mov eax, dword ptr [rbp+rax*4+var_20]"], [92, "shr eax, 8"], [93, "mov edx, eax"], [94, "mov eax, [rbp+var_4]"], [95, "cdqe"], [96, "lea rcx, ds:0[rax*4]"], [97, "mov rax, [rbp+var_28]"], [98, "add rax, rcx"], [99, "mov [rax+2], dl"], [100, "mov eax, [rbp+var_4]"], [101, "cdqe"], [102, "mov edx, dword ptr [rbp+rax*4+var_20]"], [103, "mov eax, [rbp+var_4]"], [104, "cdqe"], [105, "lea rcx, ds:0[rax*4]"], [106, "mov rax, [rbp+var_28]"], [107, "add rax, rcx"], [108, "mov [rax+3], dl"], [109, "add [rbp+var_4], 1"], [110, "cmp [rbp+var_4], 3"], [111, "jle loc_401A8F"], [112, "mov eax, 0"], [113, "pop rbp"], [114, "retn"]], "data_dep": [[7, 5], [7, 109], [9, 102], [10, 2], [11, 9], [11, 10], [12, 77], [12, 88], [12, 99], [12, 108], [12, 11], [13, 12], [14, 13], [15, 14], [16, 5], [16, 109], [18, 105], [19, 2], [20, 19], [20, 18], [21, 20], [21, 77], [21, 88], [21, 99], [21, 108], [22, 21], [23, 22], [24, 23], [24, 15], [25, 109], [25, 5], [27, 18], [28, 2], [29, 27], [29, 28], [30, 77], [30, 29], [30, 88], [30, 99], [30, 108], [31, 30], [32, 31], [33, 24], [33, 32], [34, 5], [34, 109], [36, 27], [37, 2], [38, 36], [38, 37], [39, 88], [39, 99], [39, 108], [39, 77], [39, 38], [40, 39], [41, 40], [41, 33], [42, 109], [42, 5], [44, 42], [44, 41], [45, 5], [45, 109], [47, 45], [47, 44], [48, 109], [48, 5], [49, 48], [50, 47], [51, 49], [52, 51], [52, 50], [53, 5], [53, 109], [55, 44], [55, 53], [57, 109], [57, 56], [57, 5], [58, 57], [59, 58], [60, 55], [60, 59], [61, 60], [62, 52], [62, 61], [63, 62], [64, 5], [64, 109], [66, 64], [66, 63], [67, 109], [67, 5], [69, 67], [69, 66], [70, 69], [71, 70], [72, 109], [72, 5], [74, 59], [75, 2], [76, 74], [76, 75], [77, 76], [77, 71], [78, 109], [78, 5], [80, 78], [80, 66], [81, 80], [82, 81], [83, 5], [83, 109], [85, 74], [86, 2], [87, 86], [87, 85], [88, 87], [88, 82], [89, 109], [89, 5], [91, 89], [91, 66], [92, 91], [93, 92], [94, 5], [94, 109], [96, 85], [97, 2], [98, 96], [98, 97], [99, 93], [99, 98], [100, 5], [100, 109], [102, 100], [102, 66], [103, 109], [103, 5], [105, 96], [106, 2], [107, 106], [107, 105], [108, 107], [108, 102], [109, 5], [109, 109], [110, 109], [110, 5], [111, 110], [113, 0], [114, 112]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/edb96c2c14fc503e1ae1f6685c845e9b6c16cbcc0d41ba180c95f664349119d9_edb96c2c14fc503e1ae1f6685c845e9b6c16cbcc0d41ba180c95f664349119d9.jsonl.gz", "strip_func_name": "sub_401A6B", "query": "\n\n\n__int64 __fastcall sub_401A6B(__int64 a1)\n{\n__int64 v2[3]; // [rsp+8h] [rbp-20h]\nint i; // [rsp+24h] [rbp-4h]\n\nv2[0] = 0LL;\nv2[1] = 0LL;\nfor ( i = 0; i <= 3; ++i )\n{\n*((_DWORD *)v2 + i) = _byteswap_ulong(*(_DWORD *)(4LL * i + a1));\n*((_DWORD *)v2 + i) = (*((_DWORD *)v2 + i) << (8 * (4 - i))) | (*((_DWORD *)v2 + i) >> (8 * i));\n*(_BYTE *)(4LL * i + a1) = HIBYTE(*((_DWORD *)v2 + i));\n*(_BYTE *)(4LL * i + a1 + 1) = BYTE2(*((_DWORD *)v2 + i));\n*(_BYTE *)(4LL * i + a1 + 2) = BYTE1(*((_DWORD *)v2 + i));\n*(_BYTE *)(4LL * i + a1 + 3) = *((_DWORD *)v2 + i);\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,v2,sub_401A6B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'state', 'v2': 'block', 'sub_401A6B': 'invShiftRows'}"}
dwx_ns_getip_ipv4
77fbd19b2c95fe20b7a0e6f71748eff8a68ed43bddbc5849712b4d5c2727b722
samboy
MaraDNS
NA
ip_addr_T dwx_ns_getip_ipv4(dw_str *list, int offset) { ip_addr_T addr = {0, {0,0}, 0, 0}; int counter = 0, temp = 0; if(list == 0 || dw_fetch_u8(list,offset) != RR_A) { /* Sanity check */ return addr; /* Error */ } for(counter = 0; counter < 4; counter++) { temp = dw_fetch_u8(list,offset + 1 + counter); if(temp < 0) { return addr; /* Error */ } addr.ip[counter] = temp; } addr.len = 4; /* IPv4 */ return addr; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41C6C5", "function_addr": 4310725, "binary_name": "77fbd19b2c95fe20b7a0e6f71748eff8a68ed43bddbc5849712b4d5c2727b722.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 58h"], [4, "mov [rbp+var_48], rdi"], [5, "mov [rbp+var_50], rsi"], [6, "mov [rbp+var_54], edx"], [7, "mov byte ptr [rbp+var_40], 0"], [8, "mov [rbp+var_40+1], 0"], [9, "mov [rbp+var_37], 0"], [10, "mov [rbp+var_2F], 0"], [11, "mov [rbp+var_28], 0"], [12, "mov byte ptr [rbp+var_20], 0"], [13, "mov [rbp+var_14], 0"], [14, "mov [rbp+var_18], 0"], [15, "cmp [rbp+var_50], 0"], [16, "jz short loc_41C728"], [17, "mov edx, [rbp+var_54]"], [18, "mov rax, [rbp+var_50]"], [19, "mov esi, edx"], [20, "mov rdi, rax"], [21, "call sub_402DF7"], [22, "cmp eax, 1"], [23, "jz short loc_41C758"], [24, "mov rax, [rbp+var_48]"], [25, "mov rcx, [rbp+var_40]"], [26, "mov rbx, [rbp-38h]"], [27, "mov [rax], rcx"], [28, "mov [rax+8], rbx"], [29, "mov rcx, [rbp+var_37+7]"], [30, "mov rbx, [rbp+var_28]"], [31, "mov [rax+10h], rcx"], [32, "mov [rax+18h], rbx"], [33, "mov rdx, [rbp+var_20]"], [34, "mov [rax+20h], rdx"], [35, "jmp loc_41C7F7"], [36, "mov [rbp+var_14], 0"], [37, "jmp short loc_41C7C2"], [38, "mov eax, [rbp+var_54]"], [39, "lea edx, [rax+1]"], [40, "mov eax, [rbp+var_14]"], [41, "add edx, eax"], [42, "mov rax, [rbp+var_50]"], [43, "mov esi, edx"], [44, "mov rdi, rax"], [45, "call sub_402DF7"], [46, "mov [rbp+var_18], eax"], [47, "cmp [rbp+var_18], 0"], [48, "jns short loc_41C7B0"], [49, "mov rax, [rbp+var_48]"], [50, "mov rcx, [rbp+var_40]"], [51, "mov rbx, [rbp-38h]"], [52, "mov [rax], rcx"], [53, "mov [rax+8], rbx"], [54, "mov rcx, [rbp+var_37+7]"], [55, "mov rbx, [rbp+var_28]"], [56, "mov [rax+10h], rcx"], [57, "mov [rax+18h], rbx"], [58, "mov rdx, [rbp+var_20]"], [59, "mov [rax+20h], rdx"], [60, "jmp short loc_41C7F7"], [61, "mov eax, [rbp+var_18]"], [62, "mov edx, eax"], [63, "mov eax, [rbp+var_14]"], [64, "cdqe"], [65, "mov byte ptr [rbp+rax+var_40+1], dl"], [66, "add [rbp+var_14], 1"], [67, "cmp [rbp+var_14], 3"], [68, "jle short loc_41C761"], [69, "mov byte ptr [rbp+var_40], 4"], [70, "mov rax, [rbp+var_48]"], [71, "mov rcx, [rbp+var_40]"], [72, "mov rbx, [rbp-38h]"], [73, "mov [rax], rcx"], [74, "mov [rax+8], rbx"], [75, "mov rcx, [rbp+var_37+7]"], [76, "mov rbx, [rbp+var_28]"], [77, "mov [rax+10h], rcx"], [78, "mov [rax+18h], rbx"], [79, "mov rdx, [rbp+var_20]"], [80, "mov [rax+20h], rdx"], [81, "mov rax, [rbp+var_48]"], [82, "mov rbx, [rbp+var_8]"], [83, "leave"], [84, "retn"]], "data_dep": [[15, 5], [16, 15], [17, 6], [18, 5], [19, 17], [20, 18], [22, 21], [23, 22], [24, 4], [25, 7], [27, 24], [27, 25], [28, 24], [28, 26], [30, 11], [31, 29], [31, 24], [32, 30], [32, 24], [33, 12], [34, 24], [34, 33], [38, 6], [39, 17], [39, 62], [39, 38], [40, 36], [40, 66], [41, 40], [41, 39], [42, 5], [43, 41], [44, 42], [46, 45], [47, 46], [48, 47], [49, 4], [50, 7], [52, 49], [52, 50], [53, 49], [53, 51], [55, 11], [56, 54], [56, 49], [57, 49], [57, 55], [58, 12], [59, 49], [59, 58], [61, 46], [62, 61], [63, 36], [63, 66], [65, 63], [65, 62], [66, 66], [66, 36], [67, 36], [67, 66], [68, 67], [70, 4], [71, 69], [73, 71], [73, 70], [74, 70], [74, 72], [76, 11], [77, 75], [77, 70], [78, 70], [78, 76], [79, 12], [80, 70], [80, 79], [81, 4], [84, 81]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/77fbd19b2c95fe20b7a0e6f71748eff8a68ed43bddbc5849712b4d5c2727b722_77fbd19b2c95fe20b7a0e6f71748eff8a68ed43bddbc5849712b4d5c2727b722.jsonl.gz", "strip_func_name": "sub_41C6C5", "query": "\n\n\n_QWORD *__fastcall sub_41C6C5(_QWORD *a1, __int64 a2, int a3)\n{\n__int64 v3; // rbx\n__int64 v4; // rbx\n__int64 v5; // rbx\n__int64 v6; // rbx\n_BYTE v9[24]; // [rsp+20h] [rbp-40h]\n__int64 v10; // [rsp+38h] [rbp-28h]\n__int64 v11; // [rsp+40h] [rbp-20h]\nint v12; // [rsp+48h] [rbp-18h]\nint i; // [rsp+4Ch] [rbp-14h]\n\nv9[0] = 0;\n*(_QWORD *)&v9[1] = 0LL;\n*(_QWORD *)&v9[9] = 0LL;\nv9[17] = 0;\nv10 = 0LL;\nLOBYTE(v11) = 0;\ni = 0;\nv12 = 0;\nif ( a2 && (unsigned int)sub_402DF7(a2, a3) == 1 )\n{\nfor ( i = 0; i <= 3; ++i )\n{\nv12 = sub_402DF7(a2, i + a3 + 1);\nif ( v12 < 0 )\ngoto LABEL_6;\nv9[i + 1] = v12;\n}\nv9[0] = 4;\nv5 = *(_QWORD *)&v9[8];\n*a1 = *(_QWORD *)v9;\na1[1] = v5;\nv6 = v10;\na1[2] = *(_QWORD *)&v9[16];\na1[3] = v6;\na1[4] = v11;\n}\nelse\n{\nLABEL_6:\nv3 = *(_QWORD *)&v9[8];\n*a1 = *(_QWORD *)v9;\na1[1] = v3;\nv4 = v10;\na1[2] = *(_QWORD *)&v9[16];\na1[3] = v4;\na1[4] = v11;\n}\nreturn a1;\n}\n\n\n\nQ:[a3,a1,a2,v9,v12,i,sub_41C6C5,sub_402DF7,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'offset', 'a1': 'retstr', 'a2': 'list', 'v9': 'addr', 'v12': 'temp', 'i': 'counter', 'sub_41C6C5': 'dwx_ns_getip_ipv4', 'sub_402DF7': 'dw_fetch_u8'}"}
check_recurse
567070deb75e279ca65a45299c12ddac4fa8d506d34b80f0ddc0e29e2865a36e
dlbeer
dhara
NA
static int check_recurse(struct dhara_map *m, dhara_page_t parent, dhara_page_t page, dhara_sector_t id_expect, int depth) { uint8_t meta[DHARA_META_SIZE]; dhara_error_t err; const dhara_page_t h_offset = m->journal.head - m->journal.tail; const dhara_page_t p_offset = parent - m->journal.tail; const dhara_page_t offset = page - m->journal.tail; dhara_sector_t id; int count = 1; int i; if (page == DHARA_PAGE_NONE) return 0; /* Make sure this is a valid journal user page, and one which is * older than the page pointing to it. */ assert(offset < p_offset); assert(offset < h_offset); assert((~page) & ((1 << m->journal.log2_ppc) - 1)); /* Fetch metadata */ if (dhara_journal_read_meta(&m->journal, page, meta, &err) < 0) dabort("mt_check", err); /* Check the first <depth> bits of the ID field */ id = dhara_r32(meta); if (!depth) { id_expect = id; } else { assert(!((id ^ id_expect) >> (32 - depth))); } /* Check all alt-pointers */ for (i = depth; i < 32; i++) { dhara_page_t child = dhara_r32(meta + (i << 2) + 4); count += check_recurse(m, page, child, id ^ (1 << (31 - i)), i + 1); } return count; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404016", "function_addr": 4210710, "binary_name": "567070deb75e279ca65a45299c12ddac4fa8d506d34b80f0ddc0e29e2865a36e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0D0h"], [3, "mov [rbp+var_B8], rdi"], [4, "mov [rbp+var_BC], esi"], [5, "mov [rbp+var_C0], edx"], [6, "mov [rbp+var_C4], ecx"], [7, "mov [rbp+var_C8], r8d"], [8, "mov rax, [rbp+var_B8]"], [9, "mov edx, [rax+24h]"], [10, "mov rax, [rbp+var_B8]"], [11, "mov ecx, [rax+20h]"], [12, "mov eax, edx"], [13, "sub eax, ecx"], [14, "mov [rbp+var_C], eax"], [15, "mov rax, [rbp+var_B8]"], [16, "mov edx, [rax+20h]"], [17, "mov eax, [rbp+var_BC]"], [18, "sub eax, edx"], [19, "mov [rbp+var_10], eax"], [20, "mov rax, [rbp+var_B8]"], [21, "mov edx, [rax+20h]"], [22, "mov eax, [rbp+var_C0]"], [23, "sub eax, edx"], [24, "mov [rbp+var_14], eax"], [25, "mov [rbp+var_4], 1"], [26, "cmp [rbp+var_C0], 0FFFFFFFFh"], [27, "jnz short loc_4040A0"], [28, "mov eax, 0"], [29, "jmp locret_40422F"], [30, "mov eax, [rbp+var_14]"], [31, "cmp eax, [rbp+var_10]"], [32, "jb short loc_4040C1"], [33, "mov ecx, offset function"], [34, "mov edx, 44h "], [35, "mov esi, offset file"], [36, "mov edi, offset assertion"], [37, "call ___assert_fail"], [38, "mov eax, [rbp+var_14]"], [39, "cmp eax, [rbp+var_C]"], [40, "jb short loc_4040E2"], [41, "mov ecx, offset function"], [42, "mov edx, 45h "], [43, "mov esi, offset file"], [44, "mov edi, offset aOffsetHOffset"], [45, "call ___assert_fail"], [46, "mov eax, [rbp+var_C0]"], [47, "not eax"], [48, "mov edx, eax"], [49, "mov rax, [rbp+var_B8]"], [50, "movzx eax, byte ptr [rax+10h]"], [51, "movzx eax, al"], [52, "mov esi, 1"], [53, "mov ecx, eax"], [54, "shl esi, cl"], [55, "mov eax, esi"], [56, "sub eax, 1"], [57, "and eax, edx"], [58, "test eax, eax"], [59, "jnz short loc_404127"], [60, "mov ecx, offset function"], [61, "mov edx, 46h "], [62, "mov esi, offset file"], [63, "mov edi, offset aPage1MJournalL"], [64, "call ___assert_fail"], [65, "mov rax, [rbp+var_B8]"], [66, "lea rcx, [rbp+var_A4]"], [67, "lea rdx, [rbp+var_A0]"], [68, "mov esi, [rbp+var_C0]"], [69, "mov rdi, rax"], [70, "call sub_40307D"], [71, "test eax, eax"], [72, "jns short loc_404160"], [73, "mov eax, [rbp+var_A4]"], [74, "mov esi, eax"], [75, "mov edi, offset aMtCheck"], [76, "call sub_4055FE"], [77, "lea rax, [rbp+var_A0]"], [78, "mov rdi, rax"], [79, "call sub_403F2C"], [80, "mov [rbp+var_18], eax"], [81, "cmp [rbp+var_C8], 0"], [82, "jnz short loc_404186"], [83, "mov eax, [rbp+var_18]"], [84, "mov [rbp+var_C4], eax"], [85, "jmp short loc_4041BF"], [86, "mov eax, [rbp+var_18]"], [87, "xor eax, [rbp+var_C4]"], [88, "mov edx, eax"], [89, "mov eax, 20h "], [90, "sub eax, [rbp+var_C8]"], [91, "mov ecx, eax"], [92, "shr edx, cl"], [93, "mov eax, edx"], [94, "test eax, eax"], [95, "jz short loc_4041BF"], [96, "mov ecx, offset function"], [97, "mov edx, 51h "], [98, "mov esi, offset file"], [99, "mov edi, offset aIdIdExpect32De"], [100, "call ___assert_fail"], [101, "mov eax, [rbp+var_C8]"], [102, "mov [rbp+var_8], eax"], [103, "jmp short loc_404226"], [104, "mov eax, [rbp+var_8]"], [105, "shl eax, 2"], [106, "cdqe"], [107, "lea rdx, [rax+4]"], [108, "lea rax, [rbp+var_A0]"], [109, "add rax, rdx"], [110, "mov rdi, rax"], [111, "call sub_403F2C"], [112, "mov [rbp+var_1C], eax"], [113, "mov eax, [rbp+var_8]"], [114, "lea edi, [rax+1]"], [115, "mov eax, [rbp+var_8]"], [116, "mov edx, 80000000h"], [117, "mov ecx, eax"], [118, "shr edx, cl"], [119, "mov eax, edx"], [120, "xor eax, [rbp+var_18]"], [121, "mov ecx, eax"], [122, "mov edx, [rbp+var_1C]"], [123, "mov esi, [rbp+var_C0]"], [124, "mov rax, [rbp+var_B8]"], [125, "mov r8d, edi"], [126, "mov rdi, rax"], [127, "call sub_404016"], [128, "add [rbp+var_4], eax"], [129, "add [rbp+var_8], 1"], [130, "cmp [rbp+var_8], 1Fh"], [131, "jle short loc_4041CA"], [132, "mov eax, [rbp+var_4]"], [133, "leave"], [134, "retn"]], "data_dep": [[8, 3], [9, 8], [10, 3], [11, 10], [12, 9], [13, 12], [13, 11], [14, 13], [15, 3], [16, 15], [17, 4], [18, 17], [18, 16], [19, 18], [20, 3], [21, 20], [22, 5], [23, 22], [23, 21], [24, 23], [26, 5], [27, 26], [30, 24], [31, 19], [31, 30], [32, 31], [38, 24], [39, 14], [39, 38], [40, 39], [46, 5], [47, 46], [48, 47], [49, 3], [50, 49], [51, 50], [53, 51], [54, 53], [54, 52], [55, 54], [56, 55], [57, 48], [57, 56], [58, 57], [59, 58], [65, 3], [66, 53], [67, 48], [68, 5], [69, 65], [71, 70], [72, 71], [74, 73], [77, 71], [78, 77], [80, 79], [81, 7], [82, 81], [83, 80], [84, 83], [86, 80], [87, 6], [87, 86], [88, 87], [90, 7], [90, 89], [91, 90], [92, 88], [92, 91], [93, 92], [94, 93], [95, 94], [101, 7], [102, 101], [104, 102], [104, 129], [105, 104], [107, 122], [107, 67], [107, 92], [107, 105], [108, 105], [109, 108], [109, 107], [110, 109], [112, 111], [113, 102], [113, 129], [114, 113], [114, 110], [115, 102], [115, 129], [117, 115], [118, 117], [118, 116], [119, 118], [120, 80], [120, 119], [121, 120], [122, 112], [123, 5], [124, 3], [125, 114], [126, 124], [128, 25], [128, 128], [128, 127], [129, 102], [129, 129], [130, 102], [130, 129], [131, 130], [132, 25], [132, 128], [134, 132], [134, 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/567070deb75e279ca65a45299c12ddac4fa8d506d34b80f0ddc0e29e2865a36e_567070deb75e279ca65a45299c12ddac4fa8d506d34b80f0ddc0e29e2865a36e.jsonl.gz", "strip_func_name": "sub_404016", "query": "\n\n\n__int64 __fastcall sub_404016(__int64 a1, int a2, unsigned int a3, int a4, int a5)\n{\nint v6; // eax\nunsigned int v10; // [rsp+2Ch] [rbp-A4h] BYREF\nunsigned __int16 v11[66]; // [rsp+30h] [rbp-A0h] BYREF\nunsigned int v12; // [rsp+B4h] [rbp-1Ch]\nunsigned int v13; // [rsp+B8h] [rbp-18h]\nunsigned int v14; // [rsp+BCh] [rbp-14h]\nunsigned int v15; // [rsp+C0h] [rbp-10h]\nunsigned int v16; // [rsp+C4h] [rbp-Ch]\nint i; // [rsp+C8h] [rbp-8h]\nunsigned int v18; // [rsp+CCh] [rbp-4h]\n\nv16 = *(_DWORD *)(a1 + 36) - *(_DWORD *)(a1 + 32);\nv15 = a2 - *(_DWORD *)(a1 + 32);\nv14 = a3 - *(_DWORD *)(a1 + 32);\nv18 = 1;\nif ( a3 == -1 )\nreturn 0LL;\nif ( v14 >= v15 )\n__assert_fail(\"offset < p_offset\", \"tests/map.c\", 0x44u, \"check_recurse\");\nif ( v14 >= v16 )\n__assert_fail(\"offset < h_offset\", \"tests/map.c\", 0x45u, \"check_recurse\");\nif ( (~a3 & ((1 << *(_BYTE *)(a1 + 16)) - 1)) == 0 )\n__assert_fail(\"(~page) & ((1 << m->journal.log2_ppc) - 1)\", \"tests/map.c\", 0x46u, \"check_recurse\");\nif ( (int)sub_40307D(a1, a3, v11, (__int64)&v10) < 0 )\nsub_4055FE(\"mt_check\", v10);\nv13 = sub_403F2C(v11);\nif ( a5 && (a4 ^ v13) >> (32 - a5) )\n__assert_fail(\"!((id ^ id_expect) >> (32 - depth))\", \"tests/map.c\", 0x51u, \"check_recurse\");\nfor ( i = a5; i <= 31; ++i )\n{\nv12 = sub_403F2C(&v11[2 * i + 2]);\nv6 = sub_404016(a1, a3, v12, v13 ^ (0x80000000 >> i), (unsigned int)(i + 1));\nv18 += v6;\n}\nreturn v18;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v10,v11,v12,v13,v14,v15,v16,v18,sub_404016,sub_40307D,sub_4055FE,sub_403F2C,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'page', 'a4': 'id_expect', 'a1': 'm', 'a2': 'parent', 'a5': 'depth', 'v10': 'err', 'v11': 'meta', 'v12': 'child', 'v13': 'id', 'v14': 'offset', 'v15': 'p_offset', 'v16': 'h_offset', 'v18': 'count', 'sub_404016': 'check_recurse', 'sub_40307D': 'dhara_journal_read_meta', 'sub_4055FE': 'dabort', 'sub_403F2C': 'dhara_r32_1'}"}
indexadr
2592682ab3d2f821470f2832ab486f998eeee306142acc40683adf7919dfbec9
lkundrak
dev86
NA
PUBLIC void indexadr(source, target) struct symstruct *source; struct symstruct *target; { #ifdef MC6809 bool_t canABX; #endif uoffset_T size; store_pt sourcereg; struct typestruct *targtype; store_pt targreg; if (!(target->type->constructor & (ARRAY | POINTER))) { bugerror("cannot index"); return; } size = target->type->nexttype->typesize; if (source->storage == CONSTANT) { if (source->offset.offv != 0) { if (target->indcount != 0) loadany(target); target->offset.offi += source->offset.offv * size; } return; } if (target->storage & ALLDATREGS) push(target); if ((store_t) (sourcereg = target->storage) & ~reguse & allindregs) targreg = sourcereg; else targreg = getindexreg(); #ifdef I8088 if ((store_t) sourcereg == GLOBAL && target->indcount == 0 && !(source->type->scalar & CHAR) && source->storage != DREG) load(source, targreg); else #endif load(source, DREG); #ifdef I8088 softop(MULOP, constsym((value_t) size), source); #endif #ifdef MC6809 /*----------------------------------------------------------------------------- do some calculations in advance to decide if index can be done with ABX -----------------------------------------------------------------------------*/ if ((store_t) targreg == XREG && source->type->scalar & CHAR && size < CANABXCUTOFF) canABX = TRUE; else { canABX = FALSE; softop(MULOP, constsym((value_t) size), source); } #endif /*----------------------------------------------------------------------------- deal with constant target - constant becomes offset, result in DREG -----------------------------------------------------------------------------*/ if (target->storage == CONSTANT) { target->storage = DREG; return; } /*----------------------------------------------------------------------------- load target if it is indirect or GLOBAL or canABX so D or B can be added otherwise, it is register direct (maybe S register, maybe with offset) and the offset can be left after adding DREG -----------------------------------------------------------------------------*/ #ifdef I8088 if (target->indcount != 0) { targtype = target->type; target->type = itype; add(source, target); target->type = targtype; return; } if ((store_t) sourcereg == GLOBAL) { target->storage = source->storage; target->level = OFFKLUDGELEVEL; return; } #endif #ifdef MC6809 if (canABX || (store_t) sourcereg == GLOBAL) { load(target, targreg); sourcereg = targreg; } else if (target->indcount != 0) { targtype = target->type; target->type = itype; add(source, target); target->type = targtype; return; } if (canABX) while (size--) outABX(); else #endif { #ifdef I8088 if ((store_t) targreg != (store_t) sourcereg) regtransfer(sourcereg, targreg); outadd(); outregname(targreg); outncregname(DREG); #endif #ifdef MC6809 outlea(); outregname(targreg); outtab(); outregname(DREG); outncregname(sourcereg); #endif } if ((store_t) sourcereg == LOCAL) #ifdef FRAMEPOINTER target->offset.offi -= framep; #else target->offset.offi -= sp; #endif target->storage = targreg; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A451", "function_addr": 4236369, "binary_name": "2592682ab3d2f821470f2832ab486f998eeee306142acc40683adf7919dfbec9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov rax, [rbp+var_30]"], [6, "mov rax, [rax+18h]"], [7, "movzx eax, byte ptr [rax+1]"], [8, "movzx eax, al"], [9, "and eax, 5"], [10, "test eax, eax"], [11, "jnz short loc_40A486"], [12, "mov edi, offset aCannotIndex"], [13, "call sub_40FE0B"], [14, "jmp locret_40A6A0"], [15, "mov rax, [rbp+var_30]"], [16, "mov rax, [rax+18h]"], [17, "mov rax, [rax+28h]"], [18, "mov rax, [rax+10h]"], [19, "mov [rbp+var_10], rax"], [20, "mov rax, [rbp+var_28]"], [21, "mov eax, [rax]"], [22, "cmp eax, 1"], [23, "jnz short loc_40A4F9"], [24, "mov rax, [rbp+var_28]"], [25, "mov rax, [rax+20h]"], [26, "test rax, rax"], [27, "jz loc_40A69F"], [28, "mov rax, [rbp+var_30]"], [29, "movzx eax, byte ptr [rax+4]"], [30, "test al, al"], [31, "jz short loc_40A4CE"], [32, "mov rax, [rbp+var_30]"], [33, "mov rdi, rax"], [34, "call sub_40AC21"], [35, "mov rax, [rbp+var_30]"], [36, "mov rax, [rax+20h]"], [37, "mov rdx, rax"], [38, "mov rax, [rbp+var_28]"], [39, "mov rax, [rax+20h]"], [40, "imul rax, [rbp+var_10]"], [41, "add rax, rdx"], [42, "mov rdx, rax"], [43, "mov rax, [rbp+var_30]"], [44, "mov [rax+20h], rdx"], [45, "jmp loc_40A69F"], [46, "mov rax, [rbp+var_30]"], [47, "mov eax, [rax]"], [48, "and eax, 6"], [49, "test eax, eax"], [50, "jz short loc_40A512"], [51, "mov rax, [rbp+var_30]"], [52, "mov rdi, rax"], [53, "call sub_40BBA2"], [54, "mov rax, [rbp+var_30]"], [55, "mov eax, [rax]"], [56, "mov [rbp+var_14], eax"], [57, "mov eax, cs:dword_42C144"], [58, "not eax"], [59, "and eax, [rbp+var_14]"], [60, "mov edx, eax"], [61, "mov eax, cs:dword_422294"], [62, "and eax, edx"], [63, "test eax, eax"], [64, "jz short loc_40A53C"], [65, "mov eax, [rbp+var_14]"], [66, "mov [rbp+var_4], eax"], [67, "jmp short loc_40A544"], [68, "call sub_40A400"], [69, "mov [rbp+var_4], eax"], [70, "cmp [rbp+var_14], 80h"], [71, "jnz short loc_40A58C"], [72, "mov rax, [rbp+var_30]"], [73, "movzx eax, byte ptr [rax+4]"], [74, "test al, al"], [75, "jnz short loc_40A58C"], [76, "mov rax, [rbp+var_28]"], [77, "mov rax, [rax+18h]"], [78, "movzx eax, byte ptr [rax]"], [79, "movzx eax, al"], [80, "and eax, 1"], [81, "test eax, eax"], [82, "jnz short loc_40A58C"], [83, "mov rax, [rbp+var_28]"], [84, "mov eax, [rax]"], [85, "cmp eax, 4"], [86, "jz short loc_40A58C"], [87, "mov edx, [rbp+var_4]"], [88, "mov rax, [rbp+var_28]"], [89, "mov esi, edx"], [90, "mov rdi, rax"], [91, "call sub_40A761"], [92, "jmp short loc_40A59D"], [93, "mov rax, [rbp+var_28]"], [94, "mov esi, 4"], [95, "mov rdi, rax"], [96, "call sub_40A761"], [97, "mov rax, [rbp+var_10]"], [98, "mov rdi, rax"], [99, "call sub_4151A9"], [100, "mov rcx, rax"], [101, "mov rax, [rbp+var_28]"], [102, "mov rdx, rax"], [103, "mov rsi, rcx"], [104, "mov edi, 3Ch "], [105, "call sub_41377B"], [106, "mov rax, [rbp+var_30]"], [107, "mov eax, [rax]"], [108, "cmp eax, 1"], [109, "jnz short loc_40A5DA"], [110, "mov rax, [rbp+var_30]"], [111, "mov dword ptr [rax], 4"], [112, "jmp locret_40A6A0"], [113, "mov rax, [rbp+var_30]"], [114, "movzx eax, byte ptr [rax+4]"], [115, "test al, al"], [116, "jz short loc_40A622"], [117, "mov rax, [rbp+var_30]"], [118, "mov rax, [rax+18h]"], [119, "mov [rbp+var_20], rax"], [120, "mov rdx, cs:qword_4345D8"], [121, "mov rax, [rbp+var_30]"], [122, "mov [rax+18h], rdx"], [123, "mov rdx, [rbp+var_30]"], [124, "mov rax, [rbp+var_28]"], [125, "mov rsi, rdx"], [126, "mov rdi, rax"], [127, "call sub_40D0E6"], [128, "mov rax, [rbp+var_30]"], [129, "mov rdx, [rbp+var_20]"], [130, "mov [rax+18h], rdx"], [131, "jmp short locret_40A6A0"], [132, "cmp [rbp+var_14], 80h"], [133, "jnz short loc_40A641"], [134, "mov rax, [rbp+var_28]"], [135, "mov edx, [rax]"], [136, "mov rax, [rbp+var_30]"], [137, "mov [rax], edx"], [138, "mov rax, [rbp+var_30]"], [139, "mov byte ptr [rax+6], 7Fh"], [140, "jmp short locret_40A6A0"], [141, "mov eax, [rbp+var_4]"], [142, "cmp eax, [rbp+var_14]"], [143, "jz short loc_40A658"], [144, "mov edx, [rbp+var_4]"], [145, "mov eax, [rbp+var_14]"], [146, "mov esi, edx"], [147, "mov edi, eax"], [148, "call sub_4025DA"], [149, "call sub_4013FE"], [150, "mov eax, [rbp+var_4]"], [151, "mov edi, eax"], [152, "call sub_40B820"], [153, "mov edi, 4"], [154, "call sub_40B4A5"], [155, "cmp [rbp+var_14], 40h "], [156, "jnz short loc_40A694"], [157, "mov rax, [rbp+var_30]"], [158, "mov rax, [rax+20h]"], [159, "mov rcx, cs:qword_42C110"], [160, "sub rax, rcx"], [161, "mov rdx, rax"], [162, "mov rax, [rbp+var_30]"], [163, "mov [rax+20h], rdx"], [164, "mov rax, [rbp+var_30]"], [165, "mov edx, [rbp+var_4]"], [166, "mov [rax], edx"], [167, "jmp short locret_40A6A0"], [168, "nop"], [169, "leave"], [170, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [15, 4], [16, 15], [17, 16], [18, 17], [19, 18], [20, 3], [21, 20], [22, 21], [23, 22], [24, 3], [25, 24], [26, 25], [27, 26], [28, 4], [29, 28], [30, 29], [31, 30], [32, 4], [33, 32], [35, 4], [36, 35], [37, 36], [38, 3], [39, 38], [40, 19], [40, 39], [41, 40], [41, 37], [42, 41], [43, 4], [44, 42], [44, 43], [46, 4], [47, 46], [48, 47], [49, 48], [50, 49], [51, 4], [52, 51], [54, 4], [55, 54], [56, 55], [58, 57], [59, 56], [59, 58], [60, 59], [62, 60], [62, 61], [63, 62], [64, 63], [65, 56], [66, 65], [69, 68], [70, 56], [71, 70], [72, 4], [73, 72], [74, 73], [75, 74], [76, 3], [77, 76], [78, 77], [79, 78], [80, 79], [81, 80], [82, 81], [83, 3], [84, 83], [85, 84], [86, 85], [87, 66], [87, 69], [88, 3], [89, 87], [90, 88], [93, 3], [95, 93], [97, 19], [98, 97], [100, 99], [101, 3], [102, 101], [103, 100], [106, 4], [107, 106], [108, 107], [109, 108], [110, 4], [111, 110], [113, 4], [114, 113], [115, 114], [116, 115], [117, 4], [118, 117], [119, 118], [121, 4], [122, 121], [122, 120], [123, 4], [124, 3], [125, 123], [126, 124], [128, 4], [129, 119], [130, 128], [130, 129], [132, 56], [133, 132], [134, 3], [135, 134], [136, 4], [137, 135], [137, 136], [138, 4], [139, 138], [141, 69], [141, 66], [142, 141], [142, 56], [143, 142], [144, 69], [144, 66], [145, 56], [146, 144], [147, 145], [150, 69], [150, 66], [151, 150], [155, 56], [156, 155], [157, 4], [158, 157], [160, 158], [160, 159], [161, 160], [162, 4], [163, 161], [163, 162], [164, 4], [165, 69], [165, 66], [166, 165], [166, 164], [170, 43], [170, 128], [170, 164], [170, 13], [170, 138], [170, 26], [170, 110]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2592682ab3d2f821470f2832ab486f998eeee306142acc40683adf7919dfbec9_2592682ab3d2f821470f2832ab486f998eeee306142acc40683adf7919dfbec9.jsonl.gz", "strip_func_name": "sub_40A451", "query": "\n\n\n__int64 __fastcall sub_40A451(__int64 a1, __int64 a2)\n{\n__int64 result; // rax\n__int64 v3; // rax\n__int64 v4; // [rsp+10h] [rbp-20h]\nunsigned int v5; // [rsp+1Ch] [rbp-14h]\n__int64 v6; // [rsp+20h] [rbp-10h]\nunsigned int v7; // [rsp+2Ch] [rbp-4h]\n\nif ( (*(_BYTE *)(*(_QWORD *)(a2 + 24) + 1LL) & 5) == 0 )\nreturn sub_40FE0B(\"cannot index\");\nv6 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a2 + 24) + 40LL) + 16LL);\nif ( *(_DWORD *)a1 == 1 )\n{\nresult = *(_QWORD *)(a1 + 32);\nif ( result )\n{\nif ( *(_BYTE *)(a2 + 4) )\nsub_40AC21(a2);\nresult = a2;\n*(_QWORD *)(a2 + 32) += v6 * *(_QWORD *)(a1 + 32);\n}\n}\nelse\n{\nif ( (*(_DWORD *)a2 & 6) != 0 )\nsub_40BBA2(a2);\nv5 = *(_DWORD *)a2;\nif ( (*(_DWORD *)a2 & ~dword_42C144 & dword_422294) != 0 )\nv7 = *(_DWORD *)a2;\nelse\nv7 = sub_40A400();\nif ( v5 != 128 || *(_BYTE *)(a2 + 4) || (**(_BYTE **)(a1 + 24) & 1) != 0 || *(_DWORD *)a1 == 4 )\nsub_40A761(a1, 4LL);\nelse\nsub_40A761(a1, v7);\nv3 = sub_4151A9(v6);\nsub_41377B(60LL, v3, a1);\nif ( *(_DWORD *)a2 == 1 )\n{\nresult = a2;\n*(_DWORD *)a2 = 4;\n}\nelse if ( *(_BYTE *)(a2 + 4) )\n{\nv4 = *(_QWORD *)(a2 + 24);\n*(_QWORD *)(a2 + 24) = qword_4345D8;\nsub_40D0E6(a1, a2);\nresult = a2;\n*(_QWORD *)(a2 + 24) = v4;\n}\nelse if ( v5 == 128 )\n{\n*(_DWORD *)a2 = *(_DWORD *)a1;\nresult = a2;\n*(_BYTE *)(a2 + 6) = 127;\n}\nelse\n{\nif ( v7 != v5 )\nsub_4025DA(v5, v7);\nsub_4013FE();\nsub_40B820(v7);\nsub_40B4A5(4LL);\nif ( v5 == 64 )\n*(_QWORD *)(a2 + 32) -= qword_42C110;\nresult = a2;\n*(_DWORD *)a2 = v7;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v4,v5,v6,v7,sub_40A451,sub_40FE0B,sub_40AC21,sub_40BBA2,sub_40A400,sub_40A761,sub_4151A9,sub_41377B,sub_40D0E6,sub_4025DA,sub_4013FE,sub_40B820,sub_40B4A5,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'source', 'a2': 'target', 'v4': 'targtype', 'v5': 'sourcereg', 'v6': 'size', 'v7': 'targreg', 'sub_40A451': 'indexadr', 'sub_40FE0B': 'bugerror', 'sub_40AC21': 'loadany', 'sub_40BBA2': 'push', 'sub_40A400': 'getindexreg', 'sub_40A761': 'load', 'sub_4151A9': 'constsym', 'sub_41377B': 'softop', 'sub_40D0E6': 'add', 'sub_4025DA': 'regtransfer', 'sub_4013FE': 'outadd', 'sub_40B820': 'outregname', 'sub_40B4A5': 'outncregname'}"}
sync_fuzzers
04b2ff6444d69f0994d4bfc48461350494c97cfa3deb4ecc154f128ccf79a3f0
sslab-gatech
janus
NA
static void sync_fuzzers(char** argv) { DIR* sd; struct dirent* sd_ent; u32 sync_cnt = 0; sd = opendir(sync_dir); if (!sd) PFATAL("Unable to open '%s'", sync_dir); stage_max = stage_cur = 0; cur_depth = 0; /* Look at the entries created for every other fuzzer in the sync directory. */ while ((sd_ent = readdir(sd))) { static u8 stage_tmp[128]; DIR* qd; struct dirent* qd_ent; u8 *qd_path, *qd_synced_path; u32 min_accept = 0, next_min_accept; s32 id_fd; /* Skip dot files and our own output directory. */ if (sd_ent->d_name[0] == '.' || !strcmp(sync_id, sd_ent->d_name)) continue; /* Skip anything that doesn't have a queue/ subdirectory. */ qd_path = alloc_printf("%s/%s/queue", sync_dir, sd_ent->d_name); if (!(qd = opendir(qd_path))) { ck_free(qd_path); continue; } /* Retrieve the ID of the last seen test case. */ qd_synced_path = alloc_printf("%s/.synced/%s", out_dir, sd_ent->d_name); id_fd = open(qd_synced_path, O_RDWR | O_CREAT, 0600); if (id_fd < 0) PFATAL("Unable to create '%s'", qd_synced_path); if (read(id_fd, &min_accept, sizeof(u32)) > 0) lseek(id_fd, 0, SEEK_SET); next_min_accept = min_accept; /* Show stats */ sprintf(stage_tmp, "sync %u", ++sync_cnt); stage_name = stage_tmp; stage_cur = 0; stage_max = 0; /* For every file queued by this fuzzer, parse ID and see if we have looked at it before; exec a test case if not. */ while ((qd_ent = readdir(qd))) { u8* path; s32 fd; struct stat st; if (qd_ent->d_name[0] == '.' || sscanf(qd_ent->d_name, CASE_PREFIX "%06u", &syncing_case) != 1 || syncing_case < min_accept) continue; /* OK, sounds like a new one. Let's give it a try. */ if (syncing_case >= next_min_accept) next_min_accept = syncing_case + 1; path = alloc_printf("%s/%s", qd_path, qd_ent->d_name); /* Allow this to fail in case the other fuzzer is resuming or so... */ fd = open(path, O_RDONLY); if (fd < 0) { ck_free(path); continue; } if (fstat(fd, &st)) PFATAL("fstat() failed"); /* Ignore zero-sized or oversized files. */ if (st.st_size && st.st_size <= MAX_FILE) { u8 fault; u8* mem = mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); if (mem == MAP_FAILED) PFATAL("Unable to mmap '%s'", path); /* See what happens. We rely on save_if_interesting() to catch major errors and save the test case. */ write_to_testcase(mem, st.st_size); fault = run_target(argv, exec_tmout); if (stop_soon) return; syncing_party = sd_ent->d_name; queued_imported += save_if_interesting(argv, mem, st.st_size, fault); syncing_party = 0; munmap(mem, st.st_size); if (!(stage_cur++ % stats_update_freq)) show_stats(); } ck_free(path); close(fd); } ck_write(id_fd, &next_min_accept, sizeof(u32), qd_synced_path); close(id_fd); closedir(qd); ck_free(qd_path); ck_free(qd_synced_path); } closedir(sd); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_416AC7", "function_addr": 4287175, "binary_name": "04b2ff6444d69f0994d4bfc48461350494c97cfa3deb4ecc154f128ccf79a3f0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 140h"], [3, "mov [rbp+var_138], rdi"], [4, "mov [rbp+var_4], 0"], [5, "mov rax, cs:qword_442100"], [6, "mov rdi, rax"], [7, "call _opendir"], [8, "mov [rbp+var_10], rax"], [9, "cmp [rbp+var_10], 0"], [10, "jnz short loc_416B6A"], [11, "mov rax, cs:stdout"], [12, "mov rdi, rax"], [13, "call _fflush"], [14, "mov rax, cs:qword_442100"], [15, "mov rsi, rax"], [16, "mov edi, offset byte_42E8A0"], [17, "mov eax, 0"], [18, "call _printf"], [19, "mov ecx, 1A6Dh"], [20, "mov edx, offset aAflFuzzC"], [21, "mov esi, offset aSyncFuzzers"], [22, "mov edi, offset a191mStopLocati_0"], [23, "mov eax, 0"], [24, "call _printf"], [25, "call ___errno_location"], [26, "mov eax, [rax]"], [27, "mov edi, eax"], [28, "call _strerror"], [29, "mov rsi, rax"], [30, "mov edi, offset a191mOsMessage0"], [31, "mov eax, 0"], [32, "call _printf"], [33, "mov edi, 1"], [34, "call _exit"], [35, "mov cs:dword_482270, 0"], [36, "mov eax, cs:dword_482270"], [37, "mov cs:dword_482274, eax"], [38, "mov cs:dword_4821B0, 0"], [39, "jmp loc_417342"], [40, "mov [rbp+buf], 0"], [41, "mov rax, [rbp+var_18]"], [42, "movzx eax, byte ptr [rax+13h]"], [43, "cmp al, 2Eh "], [44, "jz loc_417341"], [45, "mov rax, [rbp+var_18]"], [46, "lea rdx, [rax+13h]"], [47, "mov rax, cs:s1"], [48, "mov rsi, rdx"], [49, "mov rdi, rax"], [50, "call _strcmp"], [51, "test eax, eax"], [52, "jz loc_417341"], [53, "mov rax, [rbp+var_18]"], [54, "lea rdx, [rax+13h]"], [55, "mov rax, cs:qword_442100"], [56, "mov r8, rdx"], [57, "mov rcx, rax"], [58, "mov edx, offset aSSQueue"], [59, "mov esi, 0"], [60, "mov edi, 0"], [61, "mov eax, 0"], [62, "call _snprintf"], [63, "mov [rbp+var_1C], eax"], [64, "cmp [rbp+var_1C], 0"], [65, "jns short loc_416C39"], [66, "mov edi, offset byte_42E428"], [67, "mov eax, 0"], [68, "call _printf"], [69, "mov ecx, 1A85h"], [70, "mov edx, offset aAflFuzzC"], [71, "mov esi, offset aSyncFuzzers"], [72, "mov edi, offset a191mLocation0m"], [73, "mov eax, 0"], [74, "call _printf"], [75, "mov edi, 1"], [76, "call _exit"], [77, "mov eax, [rbp+var_1C]"], [78, "add eax, 1"], [79, "mov edi, eax"], [80, "call sub_403A2B"], [81, "mov [rbp+s], rax"], [82, "mov rax, [rbp+var_18]"], [83, "lea rcx, [rax+13h]"], [84, "mov rdx, cs:qword_442100"], [85, "mov eax, [rbp+var_1C]"], [86, "add eax, 1"], [87, "movsxd rsi, eax"], [88, "mov rax, [rbp+s]"], [89, "mov r8, rcx"], [90, "mov rcx, rdx"], [91, "mov edx, offset aSSQueue"], [92, "mov rdi, rax"], [93, "mov eax, 0"], [94, "call _snprintf"], [95, "mov rax, [rbp+s]"], [96, "mov [rbp+name], rax"], [97, "mov rax, [rbp+name]"], [98, "mov rdi, rax"], [99, "call _opendir"], [100, "mov [rbp+dirp], rax"], [101, "cmp [rbp+dirp], 0"], [102, "jnz short loc_416CAE"], [103, "mov rax, [rbp+name]"], [104, "mov rdi, rax"], [105, "call sub_403A67"], [106, "jmp loc_417342"], [107, "mov rax, [rbp+var_18]"], [108, "lea rdx, [rax+13h]"], [109, "mov rax, cs:qword_4420F8"], [110, "mov r8, rdx"], [111, "mov rcx, rax"], [112, "mov edx, offset aSSyncedS"], [113, "mov esi, 0"], [114, "mov edi, 0"], [115, "mov eax, 0"], [116, "call _snprintf"], [117, "mov [rbp+var_3C], eax"], [118, "cmp [rbp+var_3C], 0"], [119, "jns short loc_416D1C"], [120, "mov edi, offset byte_42E428"], [121, "mov eax, 0"], [122, "call _printf"], [123, "mov ecx, 1A8Eh"], [124, "mov edx, offset aAflFuzzC"], [125, "mov esi, offset aSyncFuzzers"], [126, "mov edi, offset a191mLocation0m"], [127, "mov eax, 0"], [128, "call _printf"], [129, "mov edi, 1"], [130, "call _exit"], [131, "mov eax, [rbp+var_3C]"], [132, "add eax, 1"], [133, "mov edi, eax"], [134, "call sub_403A2B"], [135, "mov [rbp+var_48], rax"], [136, "mov rax, [rbp+var_18]"], [137, "lea rcx, [rax+13h]"], [138, "mov rdx, cs:qword_4420F8"], [139, "mov eax, [rbp+var_3C]"], [140, "add eax, 1"], [141, "movsxd rsi, eax"], [142, "mov rax, [rbp+var_48]"], [143, "mov r8, rcx"], [144, "mov rcx, rdx"], [145, "mov edx, offset aSSyncedS"], [146, "mov rdi, rax"], [147, "mov eax, 0"], [148, "call _snprintf"], [149, "mov rax, [rbp+var_48]"], [150, "mov [rbp+file], rax"], [151, "mov rax, [rbp+file]"], [152, "mov edx, 180h"], [153, "mov esi, 42h "], [154, "mov rdi, rax"], [155, "mov eax, 0"], [156, "call _open64"], [157, "mov [rbp+fd], eax"], [158, "cmp [rbp+fd], 0"], [159, "jns short loc_416DFA"], [160, "mov rax, cs:stdout"], [161, "mov rdi, rax"], [162, "call _fflush"], [163, "mov rax, [rbp+file]"], [164, "mov rsi, rax"], [165, "mov edi, offset byte_42E7A8"], [166, "mov eax, 0"], [167, "call _printf"], [168, "mov ecx, 1A92h"], [169, "mov edx, offset aAflFuzzC"], [170, "mov esi, offset aSyncFuzzers"], [171, "mov edi, offset a191mStopLocati_0"], [172, "mov eax, 0"], [173, "call _printf"], [174, "call ___errno_location"], [175, "mov eax, [rax]"], [176, "mov edi, eax"], [177, "call _strerror"], [178, "mov rsi, rax"], [179, "mov edi, offset a191mOsMessage0"], [180, "mov eax, 0"], [181, "call _printf"], [182, "mov edi, 1"], [183, "call _exit"], [184, "lea rcx, [rbp+buf]"], [185, "mov eax, [rbp+fd]"], [186, "mov edx, 4"], [187, "mov rsi, rcx"], [188, "mov edi, eax"], [189, "call _read"], [190, "test rax, rax"], [191, "jle short loc_416E2C"], [192, "mov eax, [rbp+fd]"], [193, "mov edx, 0"], [194, "mov esi, 0"], [195, "mov edi, eax"], [196, "call _lseek64"], [197, "mov eax, [rbp+buf]"], [198, "mov [rbp+var_9C], eax"], [199, "add [rbp+var_4], 1"], [200, "mov eax, [rbp+var_4]"], [201, "mov edx, eax"], [202, "mov esi, offset aSyncU"], [203, "mov edi, offset byte_546980"], [204, "mov eax, 0"], [205, "call _sprintf"], [206, "mov cs:off_441490, offset byte_546980"], [207, "mov cs:dword_482270, 0"], [208, "mov cs:dword_482274, 0"], [209, "jmp loc_417218"], [210, "mov rax, [rbp+n+4]"], [211, "movzx eax, byte ptr [rax+13h]"], [212, "cmp al, 2Eh "], [213, "jz loc_417217"], [214, "mov rax, [rbp+n+4]"], [215, "add rax, 13h"], [216, "mov edx, offset dword_482280"], [217, "mov esi, offset aId06u"], [218, "mov rdi, rax"], [219, "mov eax, 0"], [220, "call _sscanf"], [221, "cmp eax, 1"], [222, "jnz loc_417217"], [223, "mov edx, cs:dword_482280"], [224, "mov eax, [rbp+buf]"], [225, "cmp edx, eax"], [226, "jb loc_417217"], [227, "mov edx, cs:dword_482280"], [228, "mov eax, [rbp+var_9C]"], [229, "cmp edx, eax"], [230, "jb short loc_416EE4"], [231, "mov eax, cs:dword_482280"], [232, "add eax, 1"], [233, "mov [rbp+var_9C], eax"], [234, "mov rax, [rbp+n+4]"], [235, "lea rdx, [rax+13h]"], [236, "mov rax, [rbp+name]"], [237, "mov r8, rdx"], [238, "mov rcx, rax"], [239, "mov edx, offset aSS"], [240, "mov esi, 0"], [241, "mov edi, 0"], [242, "mov eax, 0"], [243, "call _snprintf"], [244, "mov [rbp+var_6C], eax"], [245, "cmp [rbp+var_6C], 0"], [246, "jns short loc_416F4F"], [247, "mov edi, offset byte_42E428"], [248, "mov eax, 0"], [249, "call _printf"], [250, "mov ecx, 1AB2h"], [251, "mov edx, offset aAflFuzzC"], [252, "mov esi, offset aSyncFuzzers"], [253, "mov edi, offset a191mLocation0m"], [254, "mov eax, 0"], [255, "call _printf"], [256, "mov edi, 1"], [257, "call _exit"], [258, "mov eax, [rbp+var_6C]"], [259, "add eax, 1"], [260, "mov edi, eax"], [261, "call sub_403A2B"], [262, "mov [rbp+var_78], rax"], [263, "mov rax, [rbp+n+4]"], [264, "lea rcx, [rax+13h]"], [265, "mov eax, [rbp+var_6C]"], [266, "add eax, 1"], [267, "movsxd rsi, eax"], [268, "mov rdx, [rbp+name]"], [269, "mov rax, [rbp+var_78]"], [270, "mov r8, rcx"], [271, "mov rcx, rdx"], [272, "mov edx, offset aSS"], [273, "mov rdi, rax"], [274, "mov eax, 0"], [275, "call _snprintf"], [276, "mov rax, [rbp+var_78]"], [277, "mov [rbp+var_80], rax"], [278, "mov rax, [rbp+var_80]"], [279, "mov esi, 0"], [280, "mov rdi, rax"], [281, "mov eax, 0"], [282, "call _open64"], [283, "mov [rbp+fildes], eax"], [284, "cmp [rbp+fildes], 0"], [285, "jns short loc_416FCF"], [286, "mov rax, [rbp+var_80]"], [287, "mov rdi, rax"], [288, "call sub_403A67"], [289, "jmp loc_417218"], [290, "lea rdx, [rbp+stat_buf]"], [291, "mov eax, [rbp+fildes]"], [292, "mov rsi, rdx"], [293, "mov edi, eax"], [294, "call sub_42D6D0"], [295, "test eax, eax"], [296, "jz short loc_417050"], [297, "mov rax, cs:stdout"], [298, "mov rdi, rax"], [299, "call _fflush"], [300, "mov edi, offset byte_433858"], [301, "mov eax, 0"], [302, "call _printf"], [303, "mov ecx, 1ABDh"], [304, "mov edx, offset aAflFuzzC"], [305, "mov esi, offset aSyncFuzzers"], [306, "mov edi, offset a191mStopLocati_0"], [307, "mov eax, 0"], [308, "call _printf"], [309, "call ___errno_location"], [310, "mov eax, [rax]"], [311, "mov edi, eax"], [312, "call _strerror"], [313, "mov rsi, rax"], [314, "mov edi, offset a191mOsMessage0"], [315, "mov eax, 0"], [316, "call _printf"], [317, "mov edi, 1"], [318, "call _exit"], [319, "mov rax, [rbp+stat_buf.st_size]"], [320, "test rax, rax"], [321, "jz loc_4171FC"], [322, "mov rax, [rbp+stat_buf.st_size]"], [323, "cmp rax, 100000h"], [324, "jg loc_4171FC"], [325, "mov rax, [rbp+stat_buf.st_size]"], [326, "mov rsi, rax"], [327, "mov eax, [rbp+fildes]"], [328, "mov r9d, 0"], [329, "mov r8d, eax"], [330, "mov ecx, 2"], [331, "mov edx, 1"], [332, "mov edi, 0"], [333, "call _mmap64"], [334, "mov [rbp+addr], rax"], [335, "cmp [rbp+addr], 0FFFFFFFFFFFFFFFFh"], [336, "jnz short loc_41711E"], [337, "mov rax, cs:stdout"], [338, "mov rdi, rax"], [339, "call _fflush"], [340, "mov rax, [rbp+var_80]"], [341, "mov rsi, rax"], [342, "mov edi, offset byte_4335F0"], [343, "mov eax, 0"], [344, "call _printf"], [345, "mov ecx, 1AC6h"], [346, "mov edx, offset aAflFuzzC"], [347, "mov esi, offset aSyncFuzzers"], [348, "mov edi, offset a191mStopLocati_0"], [349, "mov eax, 0"], [350, "call _printf"], [351, "call ___errno_location"], [352, "mov eax, [rax]"], [353, "mov edi, eax"], [354, "call _strerror"], [355, "mov rsi, rax"], [356, "mov edi, offset a191mOsMessage0"], [357, "mov eax, 0"], [358, "call _printf"], [359, "mov edi, 1"], [360, "call _exit"], [361, "mov rax, [rbp+stat_buf.st_size]"], [362, "mov edx, eax"], [363, "mov rax, [rbp+addr]"], [364, "mov esi, edx"], [365, "mov rdi, rax"], [366, "call sub_40A06F"], [367, "mov edx, cs:dword_441460"], [368, "mov rax, [rbp+var_138]"], [369, "mov esi, edx"], [370, "mov rdi, rax"], [371, "call sub_409959"], [372, "mov [rbp+var_91], al"], [373, "movzx eax, cs:byte_482184"], [374, "test al, al"], [375, "jnz locret_417369"], [376, "mov rax, [rbp+var_18]"], [377, "add rax, 13h"], [378, "mov cs:qword_482268, rax"], [379, "movzx edx, [rbp+var_91]"], [380, "mov rax, [rbp+stat_buf.st_size]"], [381, "mov edi, eax"], [382, "mov rsi, [rbp+addr]"], [383, "mov rax, [rbp+var_138]"], [384, "mov ecx, edx"], [385, "mov edx, edi"], [386, "mov rdi, rax"], [387, "call sub_40BB34"], [388, "movzx edx, al"], [389, "mov eax, cs:dword_482198"], [390, "add eax, edx"], [391, "mov cs:dword_482198, eax"], [392, "mov cs:qword_482268, 0"], [393, "mov rax, [rbp+stat_buf.st_size]"], [394, "mov rdx, rax"], [395, "mov rax, [rbp+addr]"], [396, "mov rsi, rdx"], [397, "mov rdi, rax"], [398, "call _munmap"], [399, "mov eax, cs:dword_482270"], [400, "lea edx, [rax+1]"], [401, "mov cs:dword_482270, edx"], [402, "mov ecx, cs:dword_441470"], [403, "mov edx, 0"], [404, "div ecx"], [405, "mov eax, edx"], [406, "test eax, eax"], [407, "jnz short loc_4171FC"], [408, "call sub_40EF01"], [409, "mov rax, [rbp+var_80]"], [410, "mov rdi, rax"], [411, "call sub_403A67"], [412, "mov eax, [rbp+fildes]"], [413, "mov edi, eax"], [414, "call _close"], [415, "jmp short loc_417218"], [416, "nop"], [417, "mov rax, [rbp+dirp]"], [418, "mov rdi, rax"], [419, "call _readdir64"], [420, "mov [rbp+n+4], rax"], [421, "cmp [rbp+n+4], 0"], [422, "jnz loc_416E79"], [423, "mov dword ptr [rbp+n], 4"], [424, "mov edx, dword ptr [rbp+n]"], [425, "lea rcx, [rbp+var_9C]"], [426, "mov eax, [rbp+fd]"], [427, "mov rsi, rcx"], [428, "mov edi, eax"], [429, "call _write"], [430, "mov [rbp+var_68], eax"], [431, "mov eax, [rbp+var_68]"], [432, "cmp dword ptr [rbp+n], eax"], [433, "jz loc_417311"], [434, "cmp [rbp+var_68], 0"], [435, "jns short loc_4172D3"], [436, "mov rax, cs:stdout"], [437, "mov rdi, rax"], [438, "call _fflush"], [439, "mov rax, [rbp+file]"], [440, "mov rsi, rax"], [441, "mov edi, offset byte_42E8E8"], [442, "mov eax, 0"], [443, "call _printf"], [444, "mov ecx, 1AE0h"], [445, "mov edx, offset aAflFuzzC"], [446, "mov esi, offset aSyncFuzzers"], [447, "mov edi, offset a191mStopLocati_0"], [448, "mov eax, 0"], [449, "call _printf"], [450, "call ___errno_location"], [451, "mov eax, [rax]"], [452, "mov edi, eax"], [453, "call _strerror"], [454, "mov rsi, rax"], [455, "mov edi, offset a191mOsMessage0"], [456, "mov eax, 0"], [457, "call _printf"], [458, "mov edi, 1"], [459, "call _exit"], [460, "mov rax, [rbp+file]"], [461, "mov rsi, rax"], [462, "mov edi, offset byte_42E930"], [463, "mov eax, 0"], [464, "call _printf"], [465, "mov ecx, 1AE0h"], [466, "mov edx, offset aAflFuzzC"], [467, "mov esi, offset aSyncFuzzers"], [468, "mov edi, offset a191mLocation0m"], [469, "mov eax, 0"], [470, "call _printf"], [471, "mov edi, 1"], [472, "call _exit"], [473, "mov eax, [rbp+fd]"], [474, "mov edi, eax"], [475, "call _close"], [476, "mov rax, [rbp+dirp]"], [477, "mov rdi, rax"], [478, "call _closedir"], [479, "mov rax, [rbp+name]"], [480, "mov rdi, rax"], [481, "call sub_403A67"], [482, "mov rax, [rbp+file]"], [483, "mov rdi, rax"], [484, "call sub_403A67"], [485, "jmp short loc_417342"], [486, "nop"], [487, "mov rax, [rbp+var_10]"], [488, "mov rdi, rax"], [489, "call _readdir64"], [490, "mov [rbp+var_18], rax"], [491, "cmp [rbp+var_18], 0"], [492, "jnz loc_416B8F"], [493, "mov rax, [rbp+var_10]"], [494, "mov rdi, rax"], [495, "call _closedir"], [496, "leave"], [497, "retn"]], "data_dep": [[6, 5], [8, 7], [9, 8], [10, 9], [12, 11], [15, 14], [26, 25], [27, 26], [29, 28], [36, 35], [37, 36], [41, 490], [42, 41], [43, 42], [44, 43], [45, 490], [46, 91], [46, 45], [46, 424], [46, 46], [48, 46], [49, 47], [51, 50], [52, 51], [53, 490], [54, 53], [54, 46], [56, 54], [57, 55], [63, 62], [64, 63], [65, 64], [77, 63], [78, 77], [79, 78], [81, 80], [82, 490], [83, 82], [83, 57], [85, 63], [86, 85], [87, 86], [88, 81], [89, 83], [90, 84], [92, 88], [95, 81], [96, 95], [97, 96], [98, 97], [100, 99], [101, 100], [102, 101], [103, 96], [104, 103], [107, 490], [108, 107], [108, 91], [110, 108], [111, 109], [117, 116], [118, 117], [119, 118], [131, 117], [132, 131], [133, 132], [135, 134], [136, 490], [137, 111], [137, 136], [139, 117], [140, 139], [141, 140], [142, 135], [143, 137], [144, 138], [146, 142], [149, 135], [150, 149], [151, 150], [154, 151], [157, 156], [158, 157], [159, 158], [161, 160], [163, 150], [164, 163], [175, 174], [176, 175], [178, 177], [184, 40], [184, 144], [185, 157], [187, 184], [188, 185], [190, 189], [191, 190], [192, 157], [195, 192], [197, 40], [198, 197], [199, 4], [199, 199], [200, 199], [201, 200], [207, 206], [208, 206], [209, 206], [210, 420], [211, 210], [212, 211], [213, 212], [214, 420], [215, 214], [218, 215], [221, 220], [222, 221], [224, 40], [225, 224], [225, 223], [226, 225], [228, 233], [228, 198], [229, 228], [229, 227], [230, 229], [232, 231], [233, 232], [234, 420], [235, 234], [235, 227], [236, 96], [237, 235], [238, 236], [244, 243], [245, 244], [246, 245], [258, 244], [259, 258], [260, 259], [262, 261], [263, 420], [264, 263], [264, 238], [265, 244], [266, 265], [267, 266], [268, 96], [269, 262], [270, 264], [271, 268], [273, 269], [276, 262], [277, 276], [278, 277], [280, 278], [283, 282], [284, 283], [285, 284], [286, 277], [287, 286], [290, 272], [291, 283], [292, 290], [293, 291], [295, 294], [296, 295], [298, 297], [310, 309], [311, 310], [313, 312], [320, 319], [321, 320], [323, 322], [324, 323], [326, 325], [327, 283], [329, 327], [334, 333], [335, 334], [336, 335], [338, 337], [340, 277], [341, 340], [352, 351], [353, 352], [355, 354], [362, 361], [363, 334], [364, 362], [365, 363], [368, 3], [369, 367], [370, 368], [372, 371], [374, 373], [375, 374], [376, 490], [377, 376], [378, 377], [379, 372], [381, 380], [382, 334], [383, 3], [384, 379], [385, 381], [386, 383], [388, 387], [389, 391], [390, 389], [390, 388], [391, 390], [394, 393], [395, 334], [396, 394], [397, 395], [399, 207], [399, 401], [400, 399], [400, 394], [401, 400], [404, 402], [405, 403], [406, 405], [407, 406], [409, 277], [410, 409], [412, 283], [413, 412], [417, 100], [418, 417], [420, 419], [421, 420], [422, 421], [424, 423], [425, 233], [425, 404], [425, 198], [425, 271], [425, 184], [426, 157], [427, 425], [428, 426], [430, 429], [431, 430], [432, 423], [432, 431], [433, 432], [434, 430], [435, 434], [437, 436], [439, 150], [440, 439], [451, 450], [452, 451], [454, 453], [460, 150], [461, 460], [473, 157], [474, 473], [476, 100], [477, 476], [479, 96], [480, 479], [482, 150], [483, 482], [487, 8], [488, 487], [490, 489], [491, 490], [492, 491], [493, 8], [494, 493], [497, 374], [497, 495]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/04b2ff6444d69f0994d4bfc48461350494c97cfa3deb4ecc154f128ccf79a3f0_04b2ff6444d69f0994d4bfc48461350494c97cfa3deb4ecc154f128ccf79a3f0.jsonl.gz", "strip_func_name": "sub_416AC7", "query": "\n\n\nint __fastcall sub_416AC7(char *const *a1)\n{\nint *v1; // rax\nchar *v2; // rax\nint *v3; // rax\nchar *v4; // rax\nint *v5; // rax\nchar *v6; // rax\nint *v7; // rax\nchar *v8; // rax\nint result; // eax\nunsigned int v10; // eax\nint *v11; // rax\nchar *v12; // rax\nstruct stat64 stat_buf; // [rsp+10h] [rbp-130h] BYREF\nunsigned int v14; // [rsp+A4h] [rbp-9Ch] BYREF\nunsigned int buf; // [rsp+A8h] [rbp-98h] BYREF\nunsigned __int8 v16; // [rsp+AFh] [rbp-91h]\nvoid *addr; // [rsp+B0h] [rbp-90h]\nint fildes; // [rsp+BCh] [rbp-84h]\nchar *v19; // [rsp+C0h] [rbp-80h]\nchar *v20; // [rsp+C8h] [rbp-78h]\nint v21; // [rsp+D4h] [rbp-6Ch]\nint v22; // [rsp+D8h] [rbp-68h]\n_DWORD n[4]; // [rsp+DCh] [rbp-64h]\nint fd; // [rsp+ECh] [rbp-54h]\nchar *file; // [rsp+F0h] [rbp-50h]\nchar *v26; // [rsp+F8h] [rbp-48h]\nint v27; // [rsp+104h] [rbp-3Ch]\nDIR *dirp; // [rsp+108h] [rbp-38h]\nchar *name; // [rsp+110h] [rbp-30h]\nchar *s; // [rsp+118h] [rbp-28h]\nint v31; // [rsp+124h] [rbp-1Ch]\nstruct dirent64 *v32; // [rsp+128h] [rbp-18h]\nDIR *v33; // [rsp+130h] [rbp-10h]\nint v34; // [rsp+13Ch] [rbp-4h]\n\nv34 = 0;\nv33 = opendir(qword_442100);\nif ( !v33 )\n{\nfflush(stdout);\nprintf(&byte_42E8A0, qword_442100);\nprintf(\"\\x1B[1;91m\\n Stop location : \\x1B[0m%s(), %s:%u\\n\", \"sync_fuzzers\", \"afl-fuzz.c\", 6765LL);\nv1 = __errno_location();\nv2 = strerror(*v1);\nprintf(\"\\x1B[1;91m OS message : \\x1B[0m%s\\n\", v2);\nexit(1);\n}\ndword_482270 = 0;\ndword_482274 = 0;\ndword_4821B0 = 0;\nwhile ( 1 )\n{\nv32 = readdir64(v33);\nif ( !v32 )\nbreak;\nbuf = 0;\nif ( v32->d_name[0] != 46 && strcmp(s1, v32->d_name) )\n{\nv31 = snprintf(0LL, 0LL, \"%s/%s/queue\", qword_442100, v32->d_name);\nif ( v31 < 0 )\n{\nprintf(&byte_42E428);\nprintf(\"\\x1B[1;91m\\n Location : \\x1B[0m%s(), %s:%u\\n\\n\", \"sync_fuzzers\", \"afl-fuzz.c\", 6789LL);\nexit(1);\n}\ns = (char *)sub_403A2B(v31 + 1);\nsnprintf(s, v31 + 1, \"%s/%s/queue\", qword_442100, v32->d_name);\nname = s;\ndirp = opendir(s);\nif ( dirp )\n{\nv27 = snprintf(0LL, 0LL, \"%s/.synced/%s\", qword_4420F8, v32->d_name);\nif ( v27 < 0 )\n{\nprintf(&byte_42E428);\nprintf(\"\\x1B[1;91m\\n Location : \\x1B[0m%s(), %s:%u\\n\\n\", \"sync_fuzzers\", \"afl-fuzz.c\", 6798LL);\nexit(1);\n}\nv26 = (char *)sub_403A2B(v27 + 1);\nsnprintf(v26, v27 + 1, \"%s/.synced/%s\", qword_4420F8, v32->d_name);\nfile = v26;\nfd = open64(v26, 66, 384LL);\nif ( fd < 0 )\n{\nfflush(stdout);\nprintf(&byte_42E7A8, file);\nprintf(\"\\x1B[1;91m\\n Stop location : \\x1B[0m%s(), %s:%u\\n\", \"sync_fuzzers\", \"afl-fuzz.c\", 6802LL);\nv3 = __errno_location();\nv4 = strerror(*v3);\nprintf(\"\\x1B[1;91m OS message : \\x1B[0m%s\\n\", v4);\nexit(1);\n}\nif ( read(fd, &buf, 4uLL) > 0 )\nlseek64(fd, 0LL, 0);\nv14 = buf;\nsprintf(byte_546980, \"sync %u\", (unsigned int)++v34);\noff_441490 = byte_546980;\ndword_482270 = 0;\ndword_482274 = 0;\nwhile ( 1 )\n{\n*(_QWORD *)&n[1] = readdir64(dirp);\nif ( !*(_QWORD *)&n[1] )\nbreak;\nif ( *(_BYTE *)(*(_QWORD *)&n[1] + 19LL) != 46\n&& sscanf((const char *)(*(_QWORD *)&n[1] + 19LL), \"id:%06u\", &dword_482280) == 1\n&& dword_482280 >= buf )\n{\nif ( dword_482280 >= v14 )\nv14 = dword_482280 + 1;\nv21 = snprintf(0LL, 0LL, \"%s/%s\", name, (const char *)(*(_QWORD *)&n[1] + 19LL));\nif ( v21 < 0 )\n{\nprintf(&byte_42E428);\nprintf(\"\\x1B[1;91m\\n Location : \\x1B[0m%s(), %s:%u\\n\\n\", \"sync_fuzzers\", \"afl-fuzz.c\", 6834LL);\nexit(1);\n}\nv20 = (char *)sub_403A2B(v21 + 1);\nsnprintf(v20, v21 + 1, \"%s/%s\", name, (const char *)(*(_QWORD *)&n[1] + 19LL));\nv19 = v20;\nfildes = open64(v20, 0);\nif ( fildes >= 0 )\n{\nif ( (unsigned int)sub_42D6D0(fildes, &stat_buf) )\n{\nfflush(stdout);\nprintf(&byte_433858);\nprintf(\"\\x1B[1;91m\\n Stop location : \\x1B[0m%s(), %s:%u\\n\", \"sync_fuzzers\", \"afl-fuzz.c\", 6845LL);\nv5 = __errno_location();\nv6 = strerror(*v5);\nprintf(\"\\x1B[1;91m OS message : \\x1B[0m%s\\n\", v6);\nexit(1);\n}\nif ( stat_buf.st_size && stat_buf.st_size <= 0x100000 )\n{\naddr = mmap64(0LL, stat_buf.st_size, 1, 2, fildes, 0LL);\nif ( addr == (void *)-1LL )\n{\nfflush(stdout);\nprintf(&byte_4335F0, v19);\nprintf(\"\\x1B[1;91m\\n Stop location : \\x1B[0m%s(), %s:%u\\n\", \"sync_fuzzers\", \"afl-fuzz.c\", 6854LL);\nv7 = __errno_location();\nv8 = strerror(*v7);\nprintf(\"\\x1B[1;91m OS message : \\x1B[0m%s\\n\", v8);\nexit(1);\n}\nsub_40A06F(addr, stat_buf.st_size);\nv16 = sub_409959(a1, dword_441460);\nresult = (unsigned __int8)byte_482184;\nif ( byte_482184 )\nreturn result;\nqword_482268 = (__int64)v32->d_name;\ndword_482198 += (unsigned __int8)sub_40BB34(a1, addr, stat_buf.st_size, v16);\nqword_482268 = 0LL;\nmunmap(addr, stat_buf.st_size);\nv10 = dword_482270++;\nif ( !(v10 % dword_441470) )\nsub_40EF01();\n}\nsub_403A67((__int64)v19);\nclose(fildes);\n}\nelse\n{\nsub_403A67((__int64)v19);\n}\n}\n}\nn[0] = 4;\nv22 = write(fd, &v14, 4uLL);\nif ( n[0] != v22 )\n{\nif ( v22 < 0 )\n{\nfflush(stdout);\nprintf(&byte_42E8E8, file);\nprintf(\"\\x1B[1;91m\\n Stop location : \\x1B[0m%s(), %s:%u\\n\", \"sync_fuzzers\", \"afl-fuzz.c\", 6880LL);\nv11 = __errno_location();\nv12 = strerror(*v11);\nprintf(\"\\x1B[1;91m OS message : \\x1B[0m%s\\n\", v12);\nexit(1);\n}\nprintf(&byte_42E930, file);\nprintf(\"\\x1B[1;91m\\n Location : \\x1B[0m%s(), %s:%u\\n\\n\", \"sync_fuzzers\", \"afl-fuzz.c\", 6880LL);\nexit(1);\n}\nclose(fd);\nclosedir(dirp);\nsub_403A67((__int64)name);\nsub_403A67((__int64)file);\n}\nelse\n{\nsub_403A67((__int64)name);\n}\n}\n}\nreturn closedir(v33);\n}\n\n\n\nQ:[a1,stat_buf,v14,buf,v16,addr,fildes,v19,v20,v21,v22,n,fd,file,v26,v27,dirp,name,s,v31,v32,v33,v34,sub_416AC7,sub_403A2B,sub_42D6D0,sub_40A06F,sub_409959,sub_40BB34,sub_40EF01,sub_403A67,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'argv', 'stat_buf': 'st', 'v14': 'next_min_accept', 'buf': 'min_accept', 'v16': 'fault', 'addr': 'mem', 'fildes': 'fd', 'v19': 'path', 'v20': '_tmp_1', 'v21': '_len_1', 'v22': '_res', 'n': '_len_2', 'fd': 'id_fd', 'file': 'qd_synced_path', 'v26': '_tmp_0', 'v27': '_len_0', 'dirp': 'qd', 'name': 'qd_path', 's': '_tmp', 'v31': '_len', 'v32': 'sd_ent', 'v33': 'sd', 'v34': 'sync_cnt', 'sub_416AC7': 'sync_fuzzers', 'sub_403A2B': 'DFL_ck_alloc', 'sub_42D6D0': 'fstat64', 'sub_40A06F': 'write_to_testcase', 'sub_409959': 'run_target', 'sub_40BB34': 'save_if_interesting', 'sub_40EF01': 'show_stats', 'sub_403A67': 'DFL_ck_free'}"}
pj_rwmutex_destroy
0d02b74aea201d48cc3d38bf7d5dfeacbcaff9102bd8e2dbdd0b1813b49b64a0
AonCyberLabs
D-Modem
NA
PJ_DEF(pj_status_t) pj_rwmutex_destroy(pj_rwmutex_t *mutex) { pj_status_t status; status = pthread_rwlock_destroy(&mutex->rwlock); if (status != 0) return PJ_RETURN_OS_ERROR(status); return PJ_SUCCESS; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_47D269", "function_addr": 4706921, "binary_name": "0d02b74aea201d48cc3d38bf7d5dfeacbcaff9102bd8e2dbdd0b1813b49b64a0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+rwlock], rdi"], [4, "mov rax, [rbp+rwlock]"], [5, "mov rdi, rax"], [6, "call _pthread_rwlock_destroy"], [7, "mov [rbp+var_4], eax"], [8, "cmp [rbp+var_4], 0"], [9, "jz short loc_47D2A1"], [10, "cmp [rbp+var_4], 0"], [11, "jz short loc_47D29A"], [12, "mov eax, [rbp+var_4]"], [13, "add eax, 1D4C0h"], [14, "jmp short locret_47D2A6"], [15, "mov eax, 0FFFFFFFFh"], [16, "jmp short locret_47D2A6"], [17, "mov eax, 0"], [18, "leave"], [19, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 7], [9, 8], [10, 7], [11, 10], [12, 7], [13, 12], [19, 17], [19, 13], [19, 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/0d02b74aea201d48cc3d38bf7d5dfeacbcaff9102bd8e2dbdd0b1813b49b64a0_0d02b74aea201d48cc3d38bf7d5dfeacbcaff9102bd8e2dbdd0b1813b49b64a0.jsonl.gz", "strip_func_name": "sub_47D269", "query": "\n\n\n__int64 __fastcall sub_47D269(pthread_rwlock_t *a1)\n{\n__int64 result; // rax\nint v2; // [rsp+1Ch] [rbp-4h]\n\nv2 = pthread_rwlock_destroy(a1);\nif ( v2 )\nresult = (unsigned int)(v2 + 120000);\nelse\nresult = 0LL;\nreturn result;\n}\n\n\n\nQ:[a1,v2,sub_47D269,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'mutex', 'v2': 'status', 'sub_47D269': 'pj_rwmutex_destroy'}"}
mw_is_control_handle_valid
93ff8321496f266e0636349715512c5b08cf85171f3c7301da663912d1131b72
miniwinwm
miniwinwm
NA
bool mw_is_control_handle_valid(mw_handle_t control_handle) { uint8_t i; if (control_handle == MW_INVALID_HANDLE) { return (false); } for (i = 0U; i < MW_MAX_CONTROL_COUNT; i++) { if (mw_all_controls[i].control_handle == control_handle) { return (true); } } return (false); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_410285", "function_addr": 4260485, "binary_name": "93ff8321496f266e0636349715512c5b08cf85171f3c7301da663912d1131b72.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_14], edi"], [3, "cmp [rbp+var_14], 0"], [4, "jnz short loc_410299"], [5, "mov eax, 0"], [6, "jmp short loc_4102DC"], [7, "mov [rbp+var_1], 0"], [8, "jmp short loc_4102D1"], [9, "movzx eax, [rbp+var_1]"], [10, "movsxd rdx, eax"], [11, "mov rax, rdx"], [12, "add rax, rax"], [13, "add rax, rdx"], [14, "shl rax, 4"], [15, "add rax, 445CE4h"], [16, "mov eax, [rax]"], [17, "cmp [rbp+var_14], eax"], [18, "jnz short loc_4102C7"], [19, "mov eax, 1"], [20, "jmp short loc_4102DC"], [21, "movzx eax, [rbp+var_1]"], [22, "add eax, 1"], [23, "mov [rbp+var_1], al"], [24, "cmp [rbp+var_1], 17h"], [25, "jbe short loc_41029F"], [26, "mov eax, 0"], [27, "pop rbp"], [28, "retn"]], "data_dep": [[3, 2], [4, 3], [9, 23], [9, 7], [10, 9], [11, 10], [12, 11], [13, 10], [13, 12], [14, 13], [15, 14], [16, 15], [17, 2], [17, 16], [18, 17], [21, 23], [21, 7], [22, 21], [23, 22], [24, 23], [24, 7], [25, 24], [27, 0], [28, 5], [28, 26], [28, 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/93ff8321496f266e0636349715512c5b08cf85171f3c7301da663912d1131b72_93ff8321496f266e0636349715512c5b08cf85171f3c7301da663912d1131b72.jsonl.gz", "strip_func_name": "sub_410285", "query": "\n\n\n__int64 __fastcall sub_410285(int a1)\n{\nunsigned __int8 i; // [rsp+13h] [rbp-1h]\n\nif ( !a1 )\nreturn 0LL;\nfor ( i = 0; i <= 0x17u; ++i )\n{\nif ( a1 == *((_DWORD *)&unk_445CE4 + 12 * i) )\nreturn 1LL;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,sub_410285,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'control_handle', 'sub_410285': 'mw_is_control_handle_valid'}"}
lv_obj_set_flex_flow
53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783
sukesh-ak
ESP32-TUX
NA
void lv_obj_set_flex_flow(lv_obj_t * obj, lv_flex_flow_t flow) { lv_obj_set_style_flex_flow(obj, flow, 0); lv_obj_set_style_layout(obj, LV_LAYOUT_FLEX, 0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44DCF9", "function_addr": 4513017, "binary_name": "53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783.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 ecx, [rbp+var_C]"], [6, "mov rax, [rbp+var_8]"], [7, "mov edx, 0"], [8, "mov esi, ecx"], [9, "mov rdi, rax"], [10, "call sub_44DF0F"], [11, "movzx eax, cs:word_53B478"], [12, "movzx ecx, ax"], [13, "mov rax, [rbp+var_8]"], [14, "mov edx, 0"], [15, "mov esi, ecx"], [16, "mov rdi, rax"], [17, "call sub_427BFB"], [18, "nop"], [19, "leave"], [20, "retn"]], "data_dep": [[5, 4], [6, 3], [8, 5], [9, 6], [12, 11], [13, 3], [15, 12], [16, 13], [20, 17]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783_53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783.jsonl.gz", "strip_func_name": "sub_44DCF9", "query": "\n\n\n__int64 __fastcall sub_44DCF9(__int64 a1, unsigned int a2)\n{\nsub_44DF0F(a1, a2, 0LL);\nreturn sub_427BFB(a1, word_53B478, 0);\n}\n\n\n\nQ:[a1,a2,sub_44DCF9,sub_44DF0F,sub_427BFB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'obj', 'a2': 'flow', 'sub_44DCF9': 'lv_obj_set_flex_flow', 'sub_44DF0F': 'lv_obj_set_style_flex_flow', 'sub_427BFB': 'lv_obj_set_style_layout'}"}
match_pathspec
3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7
msysgit
msysgit
NA
int match_pathspec(const struct pathspec *ps, const char *name, int namelen, int prefix, char *seen, int is_dir) { int positive, negative; unsigned flags = is_dir ? DO_MATCH_DIRECTORY : 0; positive = do_match_pathspec(ps, name, namelen, prefix, seen, flags); if (!(ps->magic & PATHSPEC_EXCLUDE) || !positive) return positive; negative = do_match_pathspec(ps, name, namelen, prefix, seen, flags | DO_MATCH_EXCLUDE); return negative ? 0 : positive; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_457844", "function_addr": 4552772, "binary_name": "3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_24], edx"], [6, "mov [rbp+var_28], ecx"], [7, "mov [rbp+var_30], r8"], [8, "mov [rbp+var_34], r9d"], [9, "cmp [rbp+var_34], 0"], [10, "jz short loc_45786F"], [11, "mov eax, 2"], [12, "jmp short loc_457874"], [13, "mov eax, 0"], [14, "mov [rbp+var_4], eax"], [15, "mov r8d, [rbp+var_4]"], [16, "mov rdi, [rbp+var_30]"], [17, "mov ecx, [rbp+var_28]"], [18, "mov edx, [rbp+var_24]"], [19, "mov rsi, [rbp+var_20]"], [20, "mov rax, [rbp+var_18]"], [21, "mov r9d, r8d"], [22, "mov r8, rdi"], [23, "mov rdi, rax"], [24, "call sub_457533"], [25, "mov [rbp+var_8], eax"], [26, "mov rax, [rbp+var_18]"], [27, "mov eax, [rax+10h]"], [28, "and eax, 20h"], [29, "test eax, eax"], [30, "jz short loc_4578B2"], [31, "cmp [rbp+var_8], 0"], [32, "jnz short loc_4578B7"], [33, "mov eax, [rbp+var_8]"], [34, "jmp short locret_4578F3"], [35, "mov eax, [rbp+var_4]"], [36, "or eax, 1"], [37, "mov r8d, eax"], [38, "mov rdi, [rbp+var_30]"], [39, "mov ecx, [rbp+var_28]"], [40, "mov edx, [rbp+var_24]"], [41, "mov rsi, [rbp+var_20]"], [42, "mov rax, [rbp+var_18]"], [43, "mov r9d, r8d"], [44, "mov r8, rdi"], [45, "mov rdi, rax"], [46, "call sub_457533"], [47, "mov [rbp+var_C], eax"], [48, "cmp [rbp+var_C], 0"], [49, "jnz short loc_4578EE"], [50, "mov eax, [rbp+var_8]"], [51, "jmp short locret_4578F3"], [52, "mov eax, 0"], [53, "leave"], [54, "retn"]], "data_dep": [[9, 8], [10, 9], [14, 13], [14, 11], [15, 14], [16, 7], [17, 6], [18, 5], [19, 4], [20, 3], [21, 15], [22, 16], [23, 20], [25, 24], [26, 3], [27, 26], [28, 27], [29, 28], [30, 29], [31, 25], [32, 31], [33, 25], [35, 14], [36, 35], [37, 36], [38, 7], [39, 6], [40, 5], [41, 4], [42, 3], [43, 37], [44, 38], [45, 42], [47, 46], [48, 47], [49, 48], [50, 25], [54, 52], [54, 33], [54, 50]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7_3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7.jsonl.gz", "strip_func_name": "sub_457844", "query": "\n\n\n__int64 __fastcall sub_457844(__int64 a1, unsigned __int64 a2, int a3, int a4, __int64 a5, int a6)\n{\nunsigned int v6; // eax\nunsigned int v11; // [rsp+38h] [rbp-8h]\nunsigned int v12; // [rsp+3Ch] [rbp-4h]\n\nif ( a6 )\nv6 = 2;\nelse\nv6 = 0;\nv12 = v6;\nv11 = sub_457533(a1, a2, a3, a4, a5, v6);\nif ( (*(_DWORD *)(a1 + 16) & 0x20) == 0 || !v11 )\nreturn v11;\nif ( (unsigned int)sub_457533(a1, a2, a3, a4, a5, v12 | 1) )\nreturn 0LL;\nreturn v11;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,v11,v12,sub_457844,sub_457533,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'namelen', 'a4': 'prefix', 'a1': 'ps', 'a2': 'name', 'a5': 'seen', 'a6': 'is_dir', 'v11': 'positive', 'v12': 'flags', 'sub_457844': 'match_pathspec', 'sub_457533': 'do_match_pathspec'}"}
bb_depends_on
3ab645463ad13ea30c238ceac9bf56691ea8cada0b7c92413fecc09c2d081d33
illumos
illumos-gate
NA
static int bb_depends_on(struct basic_block *target, struct basic_block *src) { pseudo_t pseudo; FOR_EACH_PTR(src->defines, pseudo) { if (pseudo_in_list(target->needs, pseudo)) return 1; } END_FOR_EACH_PTR(pseudo); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43D943", "function_addr": 4446531, "binary_name": "3ab645463ad13ea30c238ceac9bf56691ea8cada0b7c92413fecc09c2d081d33.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov rax, [rbp+var_30]"], [6, "mov rax, [rax+58h]"], [7, "mov [rbp+var_18], rax"], [8, "mov rax, [rbp+var_18]"], [9, "mov [rbp+var_8], rax"], [10, "cmp [rbp+var_18], 0"], [11, "jz loc_43D9F3"], [12, "mov [rbp+var_C], 0"], [13, "jmp short loc_43D9CC"], [14, "mov rax, [rbp+var_8]"], [15, "mov edx, [rbp+var_C]"], [16, "movsxd rdx, edx"], [17, "add rdx, 2"], [18, "mov rax, [rax+rdx*8+8]"], [19, "mov [rbp+var_20], rax"], [20, "mov rax, [rbp+var_8]"], [21, "movzx eax, byte ptr [rax+1]"], [22, "test al, al"], [23, "jz short loc_43D9A5"], [24, "cmp [rbp+var_20], 0"], [25, "jz short loc_43D9C7"], [26, "mov rax, [rbp+var_28]"], [27, "mov rax, [rax+50h]"], [28, "mov rdx, [rbp+var_20]"], [29, "mov rsi, rdx"], [30, "mov rdi, rax"], [31, "call sub_43D6FB"], [32, "test eax, eax"], [33, "jz short loc_43D9C8"], [34, "mov eax, 1"], [35, "jmp short locret_43D9F9"], [36, "nop"], [37, "add [rbp+var_C], 1"], [38, "mov rax, [rbp+var_8]"], [39, "movzx eax, byte ptr [rax]"], [40, "movsx eax, al"], [41, "cmp [rbp+var_C], eax"], [42, "jl short loc_43D97B"], [43, "mov rax, [rbp+var_8]"], [44, "mov rax, [rax+10h]"], [45, "mov [rbp+var_8], rax"], [46, "mov rax, [rbp+var_8]"], [47, "cmp rax, [rbp+var_18]"], [48, "jnz short loc_43D972"], [49, "jmp short loc_43D9F4"], [50, "nop"], [51, "mov eax, 0"], [52, "leave"], [53, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 7], [11, 10], [14, 9], [14, 45], [15, 37], [15, 12], [16, 15], [17, 16], [18, 14], [19, 18], [20, 9], [20, 45], [21, 20], [22, 21], [23, 22], [24, 19], [25, 24], [26, 3], [27, 26], [28, 19], [29, 28], [30, 27], [32, 31], [33, 32], [37, 12], [37, 37], [38, 9], [38, 45], [39, 38], [40, 39], [41, 40], [41, 12], [41, 37], [42, 41], [43, 9], [43, 45], [44, 43], [45, 44], [46, 45], [47, 7], [47, 46], [48, 47], [53, 34], [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/3ab645463ad13ea30c238ceac9bf56691ea8cada0b7c92413fecc09c2d081d33_3ab645463ad13ea30c238ceac9bf56691ea8cada0b7c92413fecc09c2d081d33.jsonl.gz", "strip_func_name": "sub_43D943", "query": "\n\n\n__int64 __fastcall sub_43D943(__int64 a1, __int64 a2)\n{\n__int64 v3; // [rsp+10h] [rbp-20h]\nchar *v4; // [rsp+18h] [rbp-18h]\nint i; // [rsp+24h] [rbp-Ch]\nchar *v6; // [rsp+28h] [rbp-8h]\n\nv4 = *(char **)(a2 + 88);\nv6 = v4;\nif ( v4 )\n{\ndo\n{\nfor ( i = 0; i < *v6; ++i )\n{\nv3 = *(_QWORD *)&v6[8 * i + 24];\nif ( (!v6[1] || v3) && (unsigned int)sub_43D6FB(*(char **)(a1 + 80), v3) )\nreturn 1LL;\n}\nv6 = (char *)*((_QWORD *)v6 + 2);\n}\nwhile ( v6 != v4 );\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,v4,i,v6,sub_43D943,sub_43D6FB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'target', 'a2': 'src', 'v3': 'pseudo', 'v4': '__headpseudo', 'i': '__nrpseudo', 'v6': '__listpseudo', 'sub_43D943': 'bb_depends_on', 'sub_43D6FB': 'pseudo_in_list_0'}"}
findEndline
d34344be19f8160d9b1e2d2ede7625426fa3ac2992618f14e4353da89d8f0fa3
velorek1
C-edit
NA
int findEndline(EDITBUFFER editBuffer[MAX_LINES], long line) { char ch = 0; long i = 0; int result = 0; do { ch = editBuffer[line].charBuf[i].ch; i++; if(ch == CHAR_NIL || ch == END_LINE_CHAR) break; } while(i < MAX_CHARS); result = i; ch = 0; return result; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401D6E", "function_addr": 4201838, "binary_name": "d34344be19f8160d9b1e2d2ede7625426fa3ac2992618f14e4353da89d8f0fa3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_20], rsi"], [4, "mov [rbp+var_9], 0"], [5, "mov [rbp+var_8], 0"], [6, "mov [rbp+var_10], 0"], [7, "mov rax, [rbp+var_20]"], [8, "imul rdx, rax, 1770h"], [9, "mov rax, [rbp+var_18]"], [10, "add rdx, rax"], [11, "mov rax, [rbp+var_8]"], [12, "movzx eax, byte ptr [rdx+rax*2]"], [13, "mov [rbp+var_9], al"], [14, "add [rbp+var_8], 1"], [15, "cmp [rbp+var_9], 0"], [16, "jz short loc_401DC5"], [17, "cmp [rbp+var_9], 0Ah"], [18, "jz short loc_401DC5"], [19, "cmp [rbp+var_8], 1F3h"], [20, "jle short loc_401D8D"], [21, "mov rax, [rbp+var_8]"], [22, "mov [rbp+var_10], eax"], [23, "mov [rbp+var_9], 0"], [24, "mov eax, [rbp+var_10]"], [25, "pop rbp"], [26, "retn"]], "data_dep": [[7, 3], [8, 7], [8, 10], [9, 2], [10, 9], [10, 8], [11, 5], [11, 14], [12, 11], [13, 12], [14, 5], [14, 14], [15, 13], [16, 15], [17, 13], [18, 17], [19, 14], [20, 19], [21, 14], [22, 21], [24, 22], [25, 0], [26, 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/d34344be19f8160d9b1e2d2ede7625426fa3ac2992618f14e4353da89d8f0fa3_d34344be19f8160d9b1e2d2ede7625426fa3ac2992618f14e4353da89d8f0fa3.jsonl.gz", "strip_func_name": "sub_401D6E", "query": "\n\n\n__int64 __fastcall sub_401D6E(__int64 a1, __int64 a2)\n{\nchar v3; // [rsp+17h] [rbp-9h]\n__int64 v4; // [rsp+18h] [rbp-8h]\n\nv4 = 0LL;\ndo\nv3 = *(_BYTE *)(a1 + 6000 * a2 + 2 * v4++);\nwhile ( v3 && v3 != 10 && v4 <= 499 );\nreturn (unsigned int)v4;\n}\n\n\n\nQ:[a1,a2,v3,sub_401D6E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'editBuffer', 'a2': 'line', 'v3': 'ch_0', 'sub_401D6E': 'findEndline'}"}
fs_preload_files
bec0a07631308fe77b571886db09a49a5e4be678153bf53f83ebdf8e9d2865bb
fernandotcl
TinyEMU
NA
static void fs_preload_files(FSDevice *fs1, FSFileID file_id) { FSDeviceMem *fs = (FSDeviceMem *)fs1; struct list_head *el; PreloadEntry *pe; PreloadFile *pf; list_for_each(el, &fs->preload_list) { pe = list_entry(el, PreloadEntry, link); if (pe->file_id == file_id) goto found; } return; found: list_for_each(el, &pe->file_list) { pf = list_entry(el, PreloadFile, link); if (pf->is_archive) fs_preload_archive(fs1, pf->name); else fs_preload_file(fs1, pf->name); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_420150", "function_addr": 4325712, "binary_name": "bec0a07631308fe77b571886db09a49a5e4be678153bf53f83ebdf8e9d2865bb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov rax, [rbp+var_28]"], [6, "mov [rbp+var_10], rax"], [7, "mov rax, [rbp+var_10]"], [8, "mov rax, [rax+120h]"], [9, "mov [rbp+var_8], rax"], [10, "jmp short loc_42019B"], [11, "mov rax, [rbp+var_8]"], [12, "mov [rbp+var_18], rax"], [13, "mov rax, [rbp+var_18]"], [14, "mov rax, [rax+10h]"], [15, "cmp [rbp+var_30], rax"], [16, "jz short loc_4201AD"], [17, "mov rax, [rbp+var_8]"], [18, "mov rax, [rax+8]"], [19, "mov [rbp+var_8], rax"], [20, "mov rax, [rbp+var_10]"], [21, "add rax, 118h"], [22, "cmp [rbp+var_8], rax"], [23, "jnz short loc_420179"], [24, "jmp short locret_420219"], [25, "nop"], [26, "mov rax, [rbp+var_18]"], [27, "mov rax, [rax+20h]"], [28, "mov [rbp+var_8], rax"], [29, "jmp short loc_42020B"], [30, "mov rax, [rbp+var_8]"], [31, "mov [rbp+var_20], rax"], [32, "mov rax, [rbp+var_20]"], [33, "mov eax, [rax+10h]"], [34, "test eax, eax"], [35, "jz short loc_4201E8"], [36, "mov rax, [rbp+var_20]"], [37, "mov rdx, [rax+18h]"], [38, "mov rax, [rbp+var_28]"], [39, "mov rsi, rdx"], [40, "mov rdi, rax"], [41, "call sub_41FE97"], [42, "jmp short loc_4201FF"], [43, "mov rax, [rbp+var_20]"], [44, "mov rdx, [rax+18h]"], [45, "mov rax, [rbp+var_28]"], [46, "mov rsi, rdx"], [47, "mov rdi, rax"], [48, "call sub_41FDC9"], [49, "mov rax, [rbp+var_8]"], [50, "mov rax, [rax+8]"], [51, "mov [rbp+var_8], rax"], [52, "mov rax, [rbp+var_18]"], [53, "add rax, 18h"], [54, "cmp [rbp+var_8], rax"], [55, "jnz short loc_4201BC"], [56, "leave"], [57, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [9, 8], [11, 19], [11, 9], [12, 11], [13, 12], [14, 13], [15, 14], [15, 4], [16, 15], [17, 9], [17, 19], [18, 17], [19, 18], [20, 6], [21, 20], [22, 19], [22, 9], [22, 21], [23, 22], [26, 12], [27, 26], [28, 27], [30, 51], [30, 28], [31, 30], [32, 31], [33, 32], [34, 33], [35, 34], [36, 31], [37, 36], [38, 3], [39, 37], [40, 38], [43, 31], [44, 43], [45, 3], [46, 44], [47, 45], [49, 28], [49, 51], [50, 49], [51, 50], [52, 12], [53, 52], [54, 28], [54, 51], [54, 53], [55, 54], [57, 21], [57, 53]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/bec0a07631308fe77b571886db09a49a5e4be678153bf53f83ebdf8e9d2865bb_bec0a07631308fe77b571886db09a49a5e4be678153bf53f83ebdf8e9d2865bb.jsonl.gz", "strip_func_name": "sub_420150", "query": "\n\n\n_QWORD *__fastcall sub_420150(_QWORD *a1, __int64 a2)\n{\n_QWORD *result; // rax\n_QWORD *v3; // [rsp+18h] [rbp-18h]\n_QWORD *i; // [rsp+28h] [rbp-8h]\n__int64 j; // [rsp+28h] [rbp-8h]\n\nfor ( i = (_QWORD *)a1[36]; ; i = (_QWORD *)i[1] )\n{\nresult = a1 + 35;\nif ( i == a1 + 35 )\nbreak;\nv3 = i;\nif ( a2 == i[2] )\n{\nfor ( j = i[4]; ; j = *(_QWORD *)(j + 8) )\n{\nresult = v3 + 3;\nif ( (_QWORD *)j == v3 + 3 )\nbreak;\nif ( *(_DWORD *)(j + 16) )\nsub_41FE97(a1, *(char **)(j + 24));\nelse\nsub_41FDC9(a1, *(char **)(j + 24));\n}\nreturn result;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,i,sub_420150,sub_41FE97,sub_41FDC9,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'fs1', 'a2': 'file_id', 'v3': 'pe', 'i': 'ela', 'sub_420150': 'fs_preload_files', 'sub_41FE97': 'fs_preload_archive', 'sub_41FDC9': 'fs_preload_file'}"}
rseq_this_cpu_lock
3fc5296d0a9913c94916e76af59489345c940774d81cd22527cef7d7a20df1a2
engstk
op8
NA
static int rseq_this_cpu_lock(struct percpu_lock *lock) { int cpu; for (;;) { int ret; cpu = rseq_cpu_start(); ret = rseq_cmpeqv_storev(&lock->c[cpu].v, 0, 1, cpu); if (rseq_likely(!ret)) break; /* Retry if comparison fails or rseq aborts. */ } /* * Acquire semantic when taking lock after control dependency. * Matches rseq_smp_store_release(). */ rseq_smp_acquire__after_ctrl_dep(); return cpu; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401262", "function_addr": 4199010, "binary_name": "3fc5296d0a9913c94916e76af59489345c940774d81cd22527cef7d7a20df1a2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 38h"], [3, "mov [rbp+var_38], rdi"], [4, "call sub_401252"], [5, "mov [rbp+var_4], eax"], [6, "mov eax, [rbp+var_4]"], [7, "cdqe"], [8, "shl rax, 7"], [9, "mov rdx, rax"], [10, "mov rax, [rbp+var_38]"], [11, "add rax, rdx"], [12, "mov [rbp+var_10], rax"], [13, "mov [rbp+var_18], 0"], [14, "mov [rbp+var_20], 1"], [15, "mov eax, [rbp+var_4]"], [16, "mov [rbp+var_24], eax"], [17, "mov edx, [rbp+var_24]"], [18, "mov rcx, cs:off_407FE8"], [19, "mov rsi, cs:off_407FE8"], [20, "mov rdi, [rbp+var_10]"], [21, "mov r8, [rbp+var_18]"], [22, "mov r9, [rbp+var_20]"], [23, "lea rax, unk_4080E0"], [24, "mov fs:[rsi+8], rax"], [25, "cmp fs:[rcx+4], edx"], [26, "jnz loc_4040C8"], [27, "cmp r8, [rdi]"], [28, "jnz short loc_4012EC"], [29, "mov [rdi], r9"], [30, "mov eax, 0"], [31, "jmp short loc_4012F1"], [32, "mov eax, 0FFFFFFFFh"], [33, "jmp short loc_4012F1"], [34, "mov eax, 1"], [35, "mov [rbp+var_8], eax"], [36, "cmp [rbp+var_8], 0"], [37, "setz al"], [38, "movzx eax, al"], [39, "test rax, rax"], [40, "jnz short loc_401308"], [41, "jmp loc_40126E"], [42, "nop"], [43, "mov eax, [rbp+var_4]"], [44, "leave"], [45, "retn"], [46, "jmp loc_4012E5"]], "data_dep": [[5, 4], [6, 5], [8, 6], [9, 8], [10, 3], [11, 10], [11, 9], [12, 11], [15, 5], [16, 15], [17, 16], [20, 12], [21, 13], [22, 14], [23, 15], [24, 23], [24, 19], [25, 18], [25, 24], [25, 17], [26, 25], [27, 21], [27, 24], [27, 20], [27, 29], [28, 27], [29, 20], [29, 22], [35, 30], [35, 32], [35, 34], [36, 35], [37, 30], [37, 36], [37, 32], [37, 34], [38, 37], [39, 38], [40, 39], [43, 5], [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/3fc5296d0a9913c94916e76af59489345c940774d81cd22527cef7d7a20df1a2_3fc5296d0a9913c94916e76af59489345c940774d81cd22527cef7d7a20df1a2.jsonl.gz", "strip_func_name": "sub_401262", "query": "\n\n\n__int64 __fastcall sub_401262(__int64 a1)\n{\n_QWORD *v1; // rdi\nint v2; // eax\nint v5; // [rsp+34h] [rbp-4h]\n\ndo\n{\nv5 = sub_401252();\nv1 = (_QWORD *)(((__int64)v5 << 7) + a1);\n__writefsqword((unsigned int)&_rseq_abi + 8, (unsigned __int64)&unk_4080E0);\nif ( __readfsdword((unsigned int)&_rseq_abi + 4) == v5 )\n{\nif ( *v1 )\n{\nv2 = 1;\n}\nelse\n{\n*v1 = 1LL;\nv2 = 0;\n}\n}\nelse\n{\nv2 = -1;\n}\n}\nwhile ( v2 );\nreturn (unsigned int)v5;\n}\n\n\n\nQ:[a1,v5,sub_401262,sub_401252,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'lock', 'v5': 'cpu', 'sub_401262': 'rseq_this_cpu_lock', 'sub_401252': 'rseq_cpu_start'}"}
HbnLineReaderReadOneLine
363ca24d5abadf77aa4acd9a22bb9895d2dfede72832bcc586d2ff5b3f08ba79
xiaochuanle
MECAT2
NA
void HbnLineReaderReadOneLine(HbnLineReader* reader) { HbnBufferedLineReaderReadOneLine(reader); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40B6DF", "function_addr": 4241119, "binary_name": "363ca24d5abadf77aa4acd9a22bb9895d2dfede72832bcc586d2ff5b3f08ba79.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_40B3C0"], [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/363ca24d5abadf77aa4acd9a22bb9895d2dfede72832bcc586d2ff5b3f08ba79_363ca24d5abadf77aa4acd9a22bb9895d2dfede72832bcc586d2ff5b3f08ba79.jsonl.gz", "strip_func_name": "sub_40B6DF", "query": "\n\n\nvoid __fastcall sub_40B6DF(__int64 a1)\n{\nsub_40B3C0(a1);\n}\n\n\n\nQ:[a1,sub_40B6DF,sub_40B3C0,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'reader', 'sub_40B6DF': 'HbnLineReaderReadOneLine', 'sub_40B3C0': 'HbnBufferedLineReaderReadOneLine'}"}
restore_reg
ec98dcca67f7fc658095f27c86aea39d71d16fac2a3b8a2bf8114128598b9343
SUSE
kernel
NA
static void restore_reg(struct cfi_state *cfi, unsigned char reg) { cfi->regs[reg].base = initial_func_cfi.regs[reg].base; cfi->regs[reg].offset = initial_func_cfi.regs[reg].offset; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40D130", "function_addr": 4247856, "binary_name": "ec98dcca67f7fc658095f27c86aea39d71d16fac2a3b8a2bf8114128598b9343.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov eax, esi"], [4, "mov [rbp+var_C], al"], [5, "movzx eax, [rbp+var_C]"], [6, "movzx ecx, [rbp+var_C]"], [7, "cdqe"], [8, "mov edx, ds:dword_438960[rax*8]"], [9, "mov rax, [rbp+var_8]"], [10, "movsxd rcx, ecx"], [11, "add rcx, 2"], [12, "mov [rax+rcx*8], edx"], [13, "movzx eax, [rbp+var_C]"], [14, "movzx ecx, [rbp+var_C]"], [15, "cdqe"], [16, "mov edx, ds:dword_438964[rax*8]"], [17, "mov rax, [rbp+var_8]"], [18, "movsxd rcx, ecx"], [19, "add rcx, 2"], [20, "mov [rax+rcx*8+4], edx"], [21, "nop"], [22, "pop rbp"], [23, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 4], [9, 2], [10, 6], [11, 10], [12, 9], [12, 8], [13, 4], [14, 4], [17, 2], [18, 14], [19, 18], [20, 17], [20, 16], [22, 0], [23, 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/ec98dcca67f7fc658095f27c86aea39d71d16fac2a3b8a2bf8114128598b9343_ec98dcca67f7fc658095f27c86aea39d71d16fac2a3b8a2bf8114128598b9343.jsonl.gz", "strip_func_name": "sub_40D130", "query": "\n\n\n__int64 __fastcall sub_40D130(__int64 a1, unsigned __int8 a2)\n{\n__int64 result; // rax\n\n*(_DWORD *)(a1 + 8 * (a2 + 2LL)) = dword_438960[2 * a2];\nresult = a1;\n*(_DWORD *)(a1 + 8 * (a2 + 2LL) + 4) = dword_438964[2 * a2];\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_40D130,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'cfi', 'a2': 'reg', 'sub_40D130': 'restore_reg'}"}
elfrw_write_Off
a920e5aaf89bf85c43ae56b88b1c6fb886855d9847671576073b3d886c2a856f
BR903
ELFkickers
NA
int elfrw_write_Off(FILE *fp, Elf64_Off const *out) { return elfrw_write_Addr(fp, (Elf64_Addr const*)out); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404F30", "function_addr": 4214576, "binary_name": "a920e5aaf89bf85c43ae56b88b1c6fb886855d9847671576073b3d886c2a856f.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_10]"], [6, "mov rax, [rbp+var_8]"], [7, "mov rsi, rdx"], [8, "mov rdi, rax"], [9, "call sub_404E97"], [10, "leave"], [11, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 5], [8, 6], [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/a920e5aaf89bf85c43ae56b88b1c6fb886855d9847671576073b3d886c2a856f_a920e5aaf89bf85c43ae56b88b1c6fb886855d9847671576073b3d886c2a856f.jsonl.gz", "strip_func_name": "sub_404F30", "query": "\n\n\nsize_t __fastcall sub_404F30(FILE *a1, _QWORD *a2)\n{\nreturn sub_404E97(a1, a2);\n}\n\n\n\nQ:[a1,a2,sub_404F30,sub_404E97,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'fp', 'a2': 'out', 'sub_404F30': 'elfrw_write_Off', 'sub_404E97': 'elfrw_write_Addr'}"}
wpa_sm_pmksa_free_cb
eee7ae2b1fa6343f62d0787a4b4e729e68108fcf48944de5e880c8604be20f95
sonic-net
sonic-buildimage
NA
static void wpa_sm_pmksa_free_cb(struct rsn_pmksa_cache_entry *entry, void *ctx, enum pmksa_free_reason reason) { struct wpa_sm *sm = ctx; int deauth = 0; wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "RSN: PMKSA cache entry free_cb: " MACSTR " reason=%d", MAC2STR(entry->aa), reason); if (sm->cur_pmksa == entry) { wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "RSN: %s current PMKSA entry", reason == PMKSA_REPLACE ? "replaced" : "removed"); pmksa_cache_clear_current(sm); /* * If an entry is simply being replaced, there's no need to * deauthenticate because it will be immediately re-added. * This happens when EAP authentication is completed again * (reauth or failed PMKSA caching attempt). */ if (reason != PMKSA_REPLACE) deauth = 1; } if (reason == PMKSA_EXPIRE && (sm->pmk_len == entry->pmk_len && os_memcmp(sm->pmk, entry->pmk, sm->pmk_len) == 0)) { wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "RSN: deauthenticating due to expired PMK"); pmksa_cache_clear_current(sm); deauth = 1; } if (deauth) { sm->pmk_len = 0; os_memset(sm->pmk, 0, sizeof(sm->pmk)); wpa_sm_deauthenticate(sm, WLAN_REASON_UNSPECIFIED); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A1EE", "function_addr": 4235758, "binary_name": "eee7ae2b1fa6343f62d0787a4b4e729e68108fcf48944de5e880c8604be20f95.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_24], edx"], [6, "mov rax, [rbp+var_20]"], [7, "mov [rbp+s1], rax"], [8, "mov [rbp+var_4], 0"], [9, "mov rax, [rbp+var_18]"], [10, "movzx eax, byte ptr [rax+71h]"], [11, "movzx edi, al"], [12, "mov rax, [rbp+var_18]"], [13, "movzx eax, byte ptr [rax+70h]"], [14, "movzx esi, al"], [15, "mov rax, [rbp+var_18]"], [16, "movzx eax, byte ptr [rax+6Fh]"], [17, "movzx ecx, al"], [18, "mov rax, [rbp+var_18]"], [19, "movzx eax, byte ptr [rax+6Eh]"], [20, "movzx r9d, al"], [21, "mov rax, [rbp+var_18]"], [22, "movzx eax, byte ptr [rax+6Dh]"], [23, "movzx r10d, al"], [24, "mov rax, [rbp+var_18]"], [25, "movzx eax, byte ptr [rax+6Ch]"], [26, "movzx edx, al"], [27, "mov rax, [rbp+s1]"], [28, "mov rax, [rax+410h]"], [29, "mov rax, [rax+8]"], [30, "mov r8d, [rbp+var_24]"], [31, "push r8"], [32, "push rdi"], [33, "push rsi"], [34, "push rcx"], [35, "mov r8d, r10d"], [36, "mov ecx, edx"], [37, "mov edx, offset aRsnPmksaCacheE"], [38, "mov esi, 2"], [39, "mov rdi, rax"], [40, "mov eax, 0"], [41, "call sub_4255FE"], [42, "add rsp, 20h"], [43, "mov rax, [rbp+s1]"], [44, "mov rax, [rax+3D0h]"], [45, "cmp [rbp+var_18], rax"], [46, "jnz short loc_40A2F1"], [47, "cmp [rbp+var_24], 1"], [48, "jnz short loc_40A2AA"], [49, "mov edx, offset aReplaced"], [50, "jmp short loc_40A2AF"], [51, "mov edx, offset aRemoved"], [52, "mov rax, [rbp+s1]"], [53, "mov rax, [rax+410h]"], [54, "mov rax, [rax+8]"], [55, "mov rcx, rdx"], [56, "mov edx, offset aRsnSCurrentPmk"], [57, "mov esi, 2"], [58, "mov rdi, rax"], [59, "mov eax, 0"], [60, "call sub_4255FE"], [61, "mov rax, [rbp+s1]"], [62, "mov rdi, rax"], [63, "call sub_40DB88"], [64, "cmp [rbp+var_24], 1"], [65, "jz short loc_40A2F1"], [66, "mov [rbp+var_4], 1"], [67, "cmp [rbp+var_24], 2"], [68, "jnz short loc_40A368"], [69, "mov rax, [rbp+s1]"], [70, "mov rdx, [rax+40h]"], [71, "mov rax, [rbp+var_18]"], [72, "mov rax, [rax+58h]"], [73, "cmp rdx, rax"], [74, "jnz short loc_40A368"], [75, "mov rax, [rbp+s1]"], [76, "mov rdx, [rax+40h]"], [77, "mov rax, [rbp+var_18]"], [78, "lea rcx, [rax+18h]"], [79, "mov rax, [rbp+s1]"], [80, "mov rsi, rcx"], [81, "mov rdi, rax"], [82, "call _memcmp"], [83, "test eax, eax"], [84, "jnz short loc_40A368"], [85, "mov rax, [rbp+s1]"], [86, "mov rax, [rax+410h]"], [87, "mov rax, [rax+8]"], [88, "mov edx, offset aRsnDeauthentic"], [89, "mov esi, 2"], [90, "mov rdi, rax"], [91, "mov eax, 0"], [92, "call sub_4255FE"], [93, "mov rax, [rbp+s1]"], [94, "mov rdi, rax"], [95, "call sub_40DB88"], [96, "mov [rbp+var_4], 1"], [97, "cmp [rbp+var_4], 0"], [98, "jz short loc_40A3A1"], [99, "mov rax, [rbp+s1]"], [100, "mov qword ptr [rax+40h], 0"], [101, "mov rax, [rbp+s1]"], [102, "mov edx, 40h "], [103, "mov esi, 0"], [104, "mov rdi, rax"], [105, "call _memset"], [106, "mov rax, [rbp+s1]"], [107, "mov esi, 1"], [108, "mov rdi, rax"], [109, "call sub_40356C"], [110, "nop"], [111, "leave"], [112, "retn"]], "data_dep": [[6, 4], [7, 6], [9, 3], [10, 9], [11, 10], [12, 3], [13, 12], [14, 13], [15, 3], [16, 15], [17, 16], [18, 3], [19, 18], [20, 19], [21, 3], [22, 21], [23, 22], [24, 3], [25, 24], [26, 25], [27, 7], [28, 27], [29, 28], [30, 5], [31, 30], [32, 11], [33, 14], [34, 17], [35, 23], [36, 26], [39, 29], [42, 2], [43, 7], [44, 43], [45, 3], [45, 44], [46, 45], [47, 5], [48, 47], [52, 7], [53, 52], [54, 53], [55, 49], [55, 51], [58, 54], [61, 7], [62, 61], [64, 5], [65, 64], [67, 5], [68, 67], [69, 7], [70, 69], [71, 3], [72, 71], [73, 70], [73, 72], [74, 73], [75, 7], [76, 75], [77, 3], [78, 77], [78, 36], [78, 55], [79, 7], [80, 78], [81, 79], [83, 82], [84, 83], [85, 7], [86, 85], [87, 86], [90, 87], [93, 7], [94, 93], [97, 96], [97, 66], [97, 8], [98, 97], [99, 7], [100, 99], [101, 7], [104, 101], [106, 7], [108, 106], [112, 109], [112, 63], [112, 72], [112, 95], [112, 44], [112, 83]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/eee7ae2b1fa6343f62d0787a4b4e729e68108fcf48944de5e880c8604be20f95_eee7ae2b1fa6343f62d0787a4b4e729e68108fcf48944de5e880c8604be20f95.jsonl.gz", "strip_func_name": "sub_40A1EE", "query": "\n\n\nint __fastcall sub_40A1EE(__int64 a1, size_t *a2, int a3)\n{\nint v3; // er8\nint v4; // er9\nsize_t v5; // rax\nchar *v6; // rdx\nint v7; // ecx\nint v8; // er8\nint v9; // er9\nint v12; // [rsp+2Ch] [rbp-4h]\n\nv12 = 0;\nsub_4255FE(\n*(_QWORD *)(a2[130] + 8),\n2,\n(unsigned int)\"RSN: PMKSA cache entry free_cb: %02x:%02x:%02x:%02x:%02x:%02x reason=%d\",\n*(unsigned __int8 *)(a1 + 108),\n*(unsigned __int8 *)(a1 + 109),\n*(unsigned __int8 *)(a1 + 110));\nv5 = a2[122];\nif ( a1 == v5 )\n{\nv6 = a3 == 1 ? \"replaced\" : \"removed\";\nsub_4255FE(*(_QWORD *)(a2[130] + 8), 2, (unsigned int)\"RSN: %s current PMKSA entry\", (_DWORD)v6, v3, v4);\nLODWORD(v5) = sub_40DB88(a2);\nif ( a3 != 1 )\nv12 = 1;\n}\nif ( a3 == 2 )\n{\nv5 = *(_QWORD *)(a1 + 88);\nif ( a2[8] == v5 )\n{\nLODWORD(v5) = memcmp(a2, (const void *)(a1 + 24), a2[8]);\nif ( !(_DWORD)v5 )\n{\nsub_4255FE(*(_QWORD *)(a2[130] + 8), 2, (unsigned int)\"RSN: deauthenticating due to expired PMK\", v7, v8, v9);\nLODWORD(v5) = sub_40DB88(a2);\nv12 = 1;\n}\n}\n}\nif ( v12 )\n{\na2[8] = 0LL;\nmemset(a2, 0, 0x40uLL);\nLODWORD(v5) = sub_40356C((__int64)a2, 1u);\n}\nreturn v5;\n}\n\n\n\nQ:[a3,a1,a2,v12,sub_40A1EE,sub_4255FE,sub_40DB88,sub_40356C,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'reason', 'a1': 'entry', 'a2': 'ctx', 'v12': 'deauth', 'sub_40A1EE': 'wpa_sm_pmksa_free_cb', 'sub_4255FE': 'wpa_msg', 'sub_40DB88': 'pmksa_cache_clear_current', 'sub_40356C': 'wpa_sm_deauthenticate'}"}
compare_super1
419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934
neilbrown
mdadm
NA
static int compare_super1(struct supertype *st, struct supertype *tst) { /* * return: * 0 same, or first was empty, and second was copied * 1 second had wrong number * 2 wrong uuid * 3 wrong other info */ struct mdp_superblock_1 *first = st->sb; struct mdp_superblock_1 *second = tst->sb; if (second->magic != __cpu_to_le32(MD_SB_MAGIC)) return 1; if (second->major_version != __cpu_to_le32(1)) return 1; if (!first) { if (posix_memalign((void**)&first, 4096, SUPER1_SIZE) != 0) { pr_err("could not allocate superblock\n"); return 1; } memcpy(first, second, SUPER1_SIZE); st->sb = first; return 0; } if (memcmp(first->set_uuid, second->set_uuid, 16)!= 0) return 2; if (first->ctime != second->ctime || first->level != second->level || first->layout != second->layout || first->size != second->size || first->chunksize != second->chunksize || first->raid_disks != second->raid_disks) return 3; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_448B80", "function_addr": 4492160, "binary_name": "419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov rax, [rbp+var_18]"], [6, "mov rax, [rax+30h]"], [7, "mov [rbp+memptr], rax"], [8, "mov rax, [rbp+var_20]"], [9, "mov rax, [rax+30h]"], [10, "mov [rbp+src], rax"], [11, "mov rax, [rbp+src]"], [12, "mov eax, [rax]"], [13, "cmp eax, 0A92B4EFCh"], [14, "jz short loc_448BBF"], [15, "mov eax, 1"], [16, "jmp locret_448CF7"], [17, "mov rax, [rbp+src]"], [18, "mov eax, [rax+4]"], [19, "cmp eax, 1"], [20, "jz short loc_448BD5"], [21, "mov eax, 1"], [22, "jmp locret_448CF7"], [23, "mov rax, [rbp+memptr]"], [24, "test rax, rax"], [25, "jnz short loc_448C4E"], [26, "lea rax, [rbp+memptr]"], [27, "mov edx, 1208h"], [28, "mov esi, 1000h"], [29, "mov rdi, rax"], [30, "call _posix_memalign"], [31, "test eax, eax"], [32, "jz short loc_448C20"], [33, "mov rax, cs:stderr"], [34, "mov edx, offset aMdadm"], [35, "mov esi, offset aSCouldNotAlloc_1"], [36, "mov rdi, rax"], [37, "mov eax, 0"], [38, "call _fprintf"], [39, "mov eax, 1"], [40, "jmp locret_448CF7"], [41, "mov rax, [rbp+memptr]"], [42, "mov rcx, [rbp+src]"], [43, "mov edx, 1208h"], [44, "mov rsi, rcx"], [45, "mov rdi, rax"], [46, "call _memcpy"], [47, "mov rdx, [rbp+memptr]"], [48, "mov rax, [rbp+var_18]"], [49, "mov [rax+30h], rdx"], [50, "mov eax, 0"], [51, "jmp locret_448CF7"], [52, "mov rax, [rbp+src]"], [53, "lea rcx, [rax+10h]"], [54, "mov rax, [rbp+memptr]"], [55, "add rax, 10h"], [56, "mov edx, 10h"], [57, "mov rsi, rcx"], [58, "mov rdi, rax"], [59, "call _memcmp"], [60, "test eax, eax"], [61, "jz short loc_448C79"], [62, "mov eax, 2"], [63, "jmp short locret_448CF7"], [64, "mov rax, [rbp+memptr]"], [65, "mov rdx, [rax+40h]"], [66, "mov rax, [rbp+src]"], [67, "mov rax, [rax+40h]"], [68, "cmp rdx, rax"], [69, "jnz short loc_448CEB"], [70, "mov rax, [rbp+memptr]"], [71, "mov edx, [rax+48h]"], [72, "mov rax, [rbp+src]"], [73, "mov eax, [rax+48h]"], [74, "cmp edx, eax"], [75, "jnz short loc_448CEB"], [76, "mov rax, [rbp+memptr]"], [77, "mov edx, [rax+4Ch]"], [78, "mov rax, [rbp+src]"], [79, "mov eax, [rax+4Ch]"], [80, "cmp edx, eax"], [81, "jnz short loc_448CEB"], [82, "mov rax, [rbp+memptr]"], [83, "mov rdx, [rax+50h]"], [84, "mov rax, [rbp+src]"], [85, "mov rax, [rax+50h]"], [86, "cmp rdx, rax"], [87, "jnz short loc_448CEB"], [88, "mov rax, [rbp+memptr]"], [89, "mov edx, [rax+58h]"], [90, "mov rax, [rbp+src]"], [91, "mov eax, [rax+58h]"], [92, "cmp edx, eax"], [93, "jnz short loc_448CEB"], [94, "mov rax, [rbp+memptr]"], [95, "mov edx, [rax+5Ch]"], [96, "mov rax, [rbp+src]"], [97, "mov eax, [rax+5Ch]"], [98, "cmp edx, eax"], [99, "jz short loc_448CF2"], [100, "mov eax, 3"], [101, "jmp short locret_448CF7"], [102, "mov eax, 0"], [103, "leave"], [104, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 4], [9, 8], [10, 9], [11, 10], [12, 11], [13, 12], [14, 13], [17, 10], [18, 17], [19, 18], [20, 19], [23, 7], [24, 23], [25, 24], [26, 7], [26, 24], [29, 26], [31, 30], [32, 31], [36, 33], [41, 7], [42, 10], [44, 42], [45, 41], [47, 7], [48, 3], [49, 48], [49, 47], [52, 10], [53, 52], [54, 7], [55, 54], [57, 53], [58, 55], [60, 59], [61, 60], [64, 7], [65, 64], [66, 10], [67, 66], [68, 65], [68, 67], [69, 68], [70, 7], [71, 70], [72, 10], [73, 72], [74, 73], [74, 71], [75, 74], [76, 7], [77, 76], [78, 10], [79, 78], [80, 77], [80, 79], [81, 80], [82, 7], [83, 82], [84, 10], [85, 84], [86, 83], [86, 85], [87, 86], [88, 7], [89, 88], [90, 10], [91, 90], [92, 89], [92, 91], [93, 92], [94, 7], [95, 94], [96, 10], [97, 96], [98, 95], [98, 97], [99, 98], [104, 62], [104, 50], [104, 15], [104, 100], [104, 102], [104, 21], [104, 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/419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934_419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934.jsonl.gz", "strip_func_name": "sub_448B80", "query": "\n\n\n__int64 __fastcall sub_448B80(__int64 a1, __int64 a2)\n{\n__int64 result; // rax\nvoid *memptr; // [rsp+10h] [rbp-10h] BYREF\nvoid *src; // [rsp+18h] [rbp-8h]\n\nmemptr = *(void **)(a1 + 48);\nsrc = *(void **)(a2 + 48);\nif ( *(_DWORD *)src != -1456779524 )\nreturn 1LL;\nif ( *((_DWORD *)src + 1) != 1 )\nreturn 1LL;\nif ( memptr )\n{\nif ( !memcmp((char *)memptr + 16, (char *)src + 16, 0x10uLL) )\n{\nif ( *((_QWORD *)memptr + 8) == *((_QWORD *)src + 8)\n&& *((_DWORD *)memptr + 18) == *((_DWORD *)src + 18)\n&& *((_DWORD *)memptr + 19) == *((_DWORD *)src + 19)\n&& *((_QWORD *)memptr + 10) == *((_QWORD *)src + 10)\n&& *((_DWORD *)memptr + 22) == *((_DWORD *)src + 22)\n&& *((_DWORD *)memptr + 23) == *((_DWORD *)src + 23) )\n{\nresult = 0LL;\n}\nelse\n{\nresult = 3LL;\n}\n}\nelse\n{\nresult = 2LL;\n}\n}\nelse if ( posix_memalign(&memptr, 0x1000uLL, 0x1208uLL) )\n{\nfprintf(stderr, \"%s: could not allocate superblock\\n\", \"mdadm\");\nresult = 1LL;\n}\nelse\n{\nmemcpy(memptr, src, 0x1208uLL);\n*(_QWORD *)(a1 + 48) = memptr;\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,memptr,src,sub_448B80,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'st', 'a2': 'tst', 'memptr': 'first', 'src': 'second', 'sub_448B80': 'compare_super1'}"}
md_get_disk_info
419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934
neilbrown
mdadm
NA
int md_get_disk_info(int fd, struct mdu_disk_info_s *disk) { return ioctl(fd, GET_DISK_INFO, disk); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40F8D9", "function_addr": 4258009, "binary_name": "419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+fd], edi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rdx, [rbp+var_10]"], [6, "mov eax, [rbp+fd]"], [7, "mov esi, 80140912h"], [8, "mov edi, eax"], [9, "mov eax, 0"], [10, "call _ioctl"], [11, "leave"], [12, "retn"]], "data_dep": [[5, 4], [6, 3], [8, 6], [12, 10]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934_419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934.jsonl.gz", "strip_func_name": "sub_40F8D9", "query": "\n\n\nint __fastcall sub_40F8D9(int a1, __int64 a2)\n{\nreturn ioctl(a1, 0x80140912uLL, a2);\n}\n\n\n\nQ:[a1,a2,sub_40F8D9,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'fd', 'a2': 'disk', 'sub_40F8D9': 'md_get_disk_info'}"}
sod_equalize_histogram
5afe6c32d9638d02e530c20ac50f6c9b3669998e3b66a1a55d9b6a984e26f769
gwsystems
aWsm
NA
sod_img sod_equalize_histogram(sod_img im) { sod_img out; int hist1[GRAYLEVEL], hist2[GRAYLEVEL]; int trans_table[GRAYLEVEL]; /* Table of gray level transformation */ int i, x, y; /* Loop variable */ int target_value; /* Target occurrences after transformation */ int gray; double gray_step; /* Descriptive gray level interval */ float min, max; int x_size2, y_size2; if (im.data == 0 || im.c != SOD_IMG_GRAYSCALE) { /* Must be a grayscale image */ return sod_make_empty_image(0, 0, 0); } out = sod_make_image(im.w, im.h, im.c); if (out.data == 0) { return sod_make_empty_image(0, 0, 0); } /* Generation of gray level histogram of input image */ for (i = 0; i < GRAYLEVEL; i++) hist1[i] = 0; for (y = 0; y < im.h; y++) { for (x = 0; x < im.w; x++) { hist1[(unsigned char)(255 * im.data[y * im.w + x])]++; } } /* Generation of transformation table */ target_value = (int)((double)(im.w * im.h) / FINAL_LEVEL); for (i = 0; i < FINAL_LEVEL; i++) hist2[i] = 0; gray = 0; for (i = 0; i < GRAYLEVEL; i++) { if (abs(target_value - hist2[gray]) < abs(target_value - (hist2[gray] + hist1[i]))) { gray++; if (gray >= FINAL_LEVEL) gray = FINAL_LEVEL - 1; } trans_table[i] = gray; hist2[gray] = hist2[gray] + hist1[i]; } /* Output of image2 subject to histogram equalization */ x_size2 = im.w; y_size2 = im.h; gray_step = (double)GRAYLEVEL / FINAL_LEVEL; for (y = 0; y < y_size2; y++) { for (x = 0; x < x_size2; x++) { out.data[y * out.w + x] = (trans_table[(unsigned char)(255 * im.data[y * im.w + x])] * gray_step) / 255.; } } /* linear transformation of gray level histogram of output image */ max = min = out.data[0]; for (y = 0; y < y_size2; y++) { for (x = 0; x < x_size2; x++) { if (min > out.data[y * out.w + x]) min = out.data[y * out.w + x]; if (max < out.data[y * out.w + x]) max = out.data[y * out.w + x]; } } if ((max - min) == 0) { return out; } for (y = 0; y < y_size2; y++) { for (x = 0; x < x_size2; x++) { out.data[y * out.w + x] = ((out.data[y * out.w + x] - min) / (max - min)); } } return out; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40770E", "function_addr": 4224782, "binary_name": "5afe6c32d9638d02e530c20ac50f6c9b3669998e3b66a1a55d9b6a984e26f769.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0C60h"], [3, "mov [rbp+var_C58], rdi"], [4, "mov rax, [rbp+arg_10]"], [5, "test rax, rax"], [6, "jz short loc_407731"], [7, "mov eax, [rbp+arg_8]"], [8, "cmp eax, 1"], [9, "jz short loc_407754"], [10, "mov rax, [rbp+var_C58]"], [11, "mov ecx, 0"], [12, "mov edx, 0"], [13, "mov esi, 0"], [14, "mov rdi, rax"], [15, "call sub_403290"], [16, "jmp loc_407BA8"], [17, "mov ecx, [rbp+arg_8]"], [18, "mov edx, [rbp+arg_0]"], [19, "mov esi, [rbp+arg_4]"], [20, "lea rax, [rbp+var_50]"], [21, "mov rdi, rax"], [22, "call sub_4032DC"], [23, "mov rax, [rbp+var_40]"], [24, "test rax, rax"], [25, "jnz short loc_407795"], [26, "mov rax, [rbp+var_C58]"], [27, "mov ecx, 0"], [28, "mov edx, 0"], [29, "mov esi, 0"], [30, "mov rdi, rax"], [31, "call sub_403290"], [32, "jmp loc_407BA8"], [33, "mov [rbp+var_4], 0"], [34, "jmp short loc_4077B2"], [35, "mov eax, [rbp+var_4]"], [36, "cdqe"], [37, "mov [rbp+rax*4+var_450], 0"], [38, "add [rbp+var_4], 1"], [39, "cmp [rbp+var_4], 0FFh"], [40, "jle short loc_40779E"], [41, "mov [rbp+var_C], 0"], [42, "jmp short loc_407825"], [43, "mov [rbp+var_8], 0"], [44, "jmp short loc_407819"], [45, "mov rdx, [rbp+arg_10]"], [46, "mov eax, [rbp+arg_4]"], [47, "imul eax, [rbp+var_C]"], [48, "mov ecx, eax"], [49, "mov eax, [rbp+var_8]"], [50, "add eax, ecx"], [51, "cdqe"], [52, "shl rax, 2"], [53, "add rax, rdx"], [54, "movss xmm1, dword ptr [rax]"], [55, "movss xmm0, cs:dword_42DA58"], [56, "mulss xmm0, xmm1"], [57, "cvttss2si eax, xmm0"], [58, "movzx eax, al"], [59, "movsxd rdx, eax"], [60, "mov edx, [rbp+rdx*4+var_450]"], [61, "add edx, 1"], [62, "cdqe"], [63, "mov [rbp+rax*4+var_450], edx"], [64, "add [rbp+var_8], 1"], [65, "mov eax, [rbp+arg_4]"], [66, "cmp [rbp+var_8], eax"], [67, "jl short loc_4077CD"], [68, "add [rbp+var_C], 1"], [69, "mov eax, [rbp+arg_0]"], [70, "cmp [rbp+var_C], eax"], [71, "jl short loc_4077C4"], [72, "mov edx, [rbp+arg_4]"], [73, "mov eax, [rbp+arg_0]"], [74, "imul eax, edx"], [75, "pxor xmm0, xmm0"], [76, "cvtsi2sd xmm0, eax"], [77, "movsd xmm1, cs:qword_42DA80"], [78, "divsd xmm0, xmm1"], [79, "cvttsd2si eax, xmm0"], [80, "mov [rbp+var_1C], eax"], [81, "mov [rbp+var_4], 0"], [82, "jmp short loc_40786E"], [83, "mov eax, [rbp+var_4]"], [84, "cdqe"], [85, "mov [rbp+rax*4+var_850], 0"], [86, "add [rbp+var_4], 1"], [87, "cmp [rbp+var_4], 3Fh "], [88, "jle short loc_40785A"], [89, "mov [rbp+var_10], 0"], [90, "mov [rbp+var_4], 0"], [91, "jmp loc_407919"], [92, "mov eax, [rbp+var_10]"], [93, "cdqe"], [94, "mov edx, [rbp+rax*4+var_850]"], [95, "mov eax, [rbp+var_1C]"], [96, "sub eax, edx"], [97, "mov ecx, eax"], [98, "sar ecx, 1Fh"], [99, "xor eax, ecx"], [100, "mov edx, eax"], [101, "sub edx, ecx"], [102, "mov eax, [rbp+var_10]"], [103, "cdqe"], [104, "mov ecx, [rbp+rax*4+var_850]"], [105, "mov eax, [rbp+var_4]"], [106, "cdqe"], [107, "mov eax, [rbp+rax*4+var_450]"], [108, "add ecx, eax"], [109, "mov eax, [rbp+var_1C]"], [110, "sub eax, ecx"], [111, "mov ecx, eax"], [112, "sar ecx, 1Fh"], [113, "xor eax, ecx"], [114, "sub eax, ecx"], [115, "cmp edx, eax"], [116, "jge short loc_4078E0"], [117, "add [rbp+var_10], 1"], [118, "cmp [rbp+var_10], 3Fh "], [119, "jle short loc_4078E0"], [120, "mov [rbp+var_10], 3Fh "], [121, "mov eax, [rbp+var_4]"], [122, "cdqe"], [123, "mov edx, [rbp+var_10]"], [124, "mov [rbp+rax*4+var_C50], edx"], [125, "mov eax, [rbp+var_10]"], [126, "cdqe"], [127, "mov edx, [rbp+rax*4+var_850]"], [128, "mov eax, [rbp+var_4]"], [129, "cdqe"], [130, "mov eax, [rbp+rax*4+var_450]"], [131, "add edx, eax"], [132, "mov eax, [rbp+var_10]"], [133, "cdqe"], [134, "mov [rbp+rax*4+var_850], edx"], [135, "add [rbp+var_4], 1"], [136, "cmp [rbp+var_4], 0FFh"], [137, "jle loc_407887"], [138, "mov eax, [rbp+arg_4]"], [139, "mov [rbp+var_20], eax"], [140, "mov eax, [rbp+arg_0]"], [141, "mov [rbp+var_24], eax"], [142, "movsd xmm0, cs:qword_42DA88"], [143, "movsd [rbp+var_30], xmm0"], [144, "mov [rbp+var_C], 0"], [145, "jmp loc_4079DF"], [146, "mov [rbp+var_8], 0"], [147, "jmp short loc_4079CF"], [148, "mov rdx, [rbp+arg_10]"], [149, "mov eax, [rbp+arg_4]"], [150, "imul eax, [rbp+var_C]"], [151, "mov ecx, eax"], [152, "mov eax, [rbp+var_8]"], [153, "add eax, ecx"], [154, "cdqe"], [155, "shl rax, 2"], [156, "add rax, rdx"], [157, "movss xmm1, dword ptr [rax]"], [158, "movss xmm0, cs:dword_42DA58"], [159, "mulss xmm0, xmm1"], [160, "cvttss2si eax, xmm0"], [161, "movzx eax, al"], [162, "cdqe"], [163, "mov eax, [rbp+rax*4+var_C50]"], [164, "pxor xmm0, xmm0"], [165, "cvtsi2sd xmm0, eax"], [166, "mulsd xmm0, [rbp+var_30]"], [167, "movsd xmm1, cs:qword_42DA40"], [168, "divsd xmm0, xmm1"], [169, "mov rdx, [rbp+var_40]"], [170, "mov eax, dword ptr [rbp+var_50+4]"], [171, "imul eax, [rbp+var_C]"], [172, "mov ecx, eax"], [173, "mov eax, [rbp+var_8]"], [174, "add eax, ecx"], [175, "cdqe"], [176, "shl rax, 2"], [177, "add rax, rdx"], [178, "cvtsd2ss xmm0, xmm0"], [179, "movss dword ptr [rax], xmm0"], [180, "add [rbp+var_8], 1"], [181, "mov eax, [rbp+var_8]"], [182, "cmp eax, [rbp+var_20]"], [183, "jl loc_407954"], [184, "add [rbp+var_C], 1"], [185, "mov eax, [rbp+var_C]"], [186, "cmp eax, [rbp+var_24]"], [187, "jl loc_40794B"], [188, "mov rax, [rbp+var_40]"], [189, "movss xmm0, dword ptr [rax]"], [190, "movss [rbp+var_14], xmm0"], [191, "movss xmm0, [rbp+var_14]"], [192, "movss [rbp+var_18], xmm0"], [193, "mov [rbp+var_C], 0"], [194, "jmp loc_407AC4"], [195, "mov [rbp+var_8], 0"], [196, "jmp loc_407AB4"], [197, "mov rdx, [rbp+var_40]"], [198, "mov eax, dword ptr [rbp+var_50+4]"], [199, "imul eax, [rbp+var_C]"], [200, "mov ecx, eax"], [201, "mov eax, [rbp+var_8]"], [202, "add eax, ecx"], [203, "cdqe"], [204, "shl rax, 2"], [205, "add rax, rdx"], [206, "movss xmm1, dword ptr [rax]"], [207, "movss xmm0, [rbp+var_14]"], [208, "comiss xmm0, xmm1"], [209, "jbe short loc_407A67"], [210, "mov rdx, [rbp+var_40]"], [211, "mov eax, dword ptr [rbp+var_50+4]"], [212, "imul eax, [rbp+var_C]"], [213, "mov ecx, eax"], [214, "mov eax, [rbp+var_8]"], [215, "add eax, ecx"], [216, "cdqe"], [217, "shl rax, 2"], [218, "add rax, rdx"], [219, "movss xmm0, dword ptr [rax]"], [220, "movss [rbp+var_14], xmm0"], [221, "mov rdx, [rbp+var_40]"], [222, "mov eax, dword ptr [rbp+var_50+4]"], [223, "imul eax, [rbp+var_C]"], [224, "mov ecx, eax"], [225, "mov eax, [rbp+var_8]"], [226, "add eax, ecx"], [227, "cdqe"], [228, "shl rax, 2"], [229, "add rax, rdx"], [230, "movss xmm0, dword ptr [rax]"], [231, "comiss xmm0, [rbp+var_18]"], [232, "jbe short loc_407AB0"], [233, "mov rdx, [rbp+var_40]"], [234, "mov eax, dword ptr [rbp+var_50+4]"], [235, "imul eax, [rbp+var_C]"], [236, "mov ecx, eax"], [237, "mov eax, [rbp+var_8]"], [238, "add eax, ecx"], [239, "cdqe"], [240, "shl rax, 2"], [241, "add rax, rdx"], [242, "movss xmm0, dword ptr [rax]"], [243, "movss [rbp+var_18], xmm0"], [244, "add [rbp+var_8], 1"], [245, "mov eax, [rbp+var_8]"], [246, "cmp eax, [rbp+var_20]"], [247, "jl loc_407A1A"], [248, "add [rbp+var_C], 1"], [249, "mov eax, [rbp+var_C]"], [250, "cmp eax, [rbp+var_24]"], [251, "jl loc_407A0E"], [252, "movss xmm0, [rbp+var_18]"], [253, "subss xmm0, [rbp+var_14]"], [254, "pxor xmm1, xmm1"], [255, "ucomiss xmm0, xmm1"], [256, "jp short loc_407B0F"], [257, "pxor xmm1, xmm1"], [258, "ucomiss xmm0, xmm1"], [259, "jnz short loc_407B0F"], [260, "mov rcx, [rbp+var_C58]"], [261, "mov rax, [rbp+var_50]"], [262, "mov rdx, [rbp+var_48]"], [263, "mov [rcx], rax"], [264, "mov [rcx+8], rdx"], [265, "mov rax, [rbp+var_40]"], [266, "mov [rcx+10h], rax"], [267, "jmp loc_407BA8"], [268, "mov [rbp+var_C], 0"], [269, "jmp short loc_407B82"], [270, "mov [rbp+var_8], 0"], [271, "jmp short loc_407B76"], [272, "mov rdx, [rbp+var_40]"], [273, "mov eax, dword ptr [rbp+var_50+4]"], [274, "imul eax, [rbp+var_C]"], [275, "mov ecx, eax"], [276, "mov eax, [rbp+var_8]"], [277, "add eax, ecx"], [278, "cdqe"], [279, "shl rax, 2"], [280, "add rax, rdx"], [281, "movss xmm0, dword ptr [rax]"], [282, "subss xmm0, [rbp+var_14]"], [283, "movss xmm1, [rbp+var_18]"], [284, "subss xmm1, [rbp+var_14]"], [285, "mov rdx, [rbp+var_40]"], [286, "mov eax, dword ptr [rbp+var_50+4]"], [287, "imul eax, [rbp+var_C]"], [288, "mov ecx, eax"], [289, "mov eax, [rbp+var_8]"], [290, "add eax, ecx"], [291, "cdqe"], [292, "shl rax, 2"], [293, "add rax, rdx"], [294, "divss xmm0, xmm1"], [295, "movss dword ptr [rax], xmm0"], [296, "add [rbp+var_8], 1"], [297, "mov eax, [rbp+var_8]"], [298, "cmp eax, [rbp+var_20]"], [299, "jl short loc_407B21"], [300, "add [rbp+var_C], 1"], [301, "mov eax, [rbp+var_C]"], [302, "cmp eax, [rbp+var_24]"], [303, "jl short loc_407B18"], [304, "mov rcx, [rbp+var_C58]"], [305, "mov rax, [rbp+var_50]"], [306, "mov rdx, [rbp+var_48]"], [307, "mov [rcx], rax"], [308, "mov [rcx+8], rdx"], [309, "mov rax, [rbp+var_40]"], [310, "mov [rcx+10h], rax"], [311, "mov rax, [rbp+var_C58]"], [312, "leave"], [313, "retn"]], "data_dep": [[5, 4], [6, 5], [8, 7], [9, 8], [10, 3], [14, 10], [20, 7], [21, 20], [24, 23], [25, 24], [26, 3], [30, 26], [35, 38], [35, 33], [37, 35], [38, 38], [38, 33], [39, 38], [39, 33], [40, 39], [46, 38], [46, 33], [47, 46], [47, 41], [47, 68], [48, 47], [49, 64], [49, 43], [50, 48], [50, 49], [52, 50], [53, 52], [53, 45], [54, 53], [56, 55], [56, 54], [57, 53], [57, 56], [58, 57], [59, 58], [60, 59], [61, 60], [63, 61], [63, 58], [64, 43], [64, 64], [65, 38], [65, 33], [66, 43], [66, 65], [66, 64], [67, 66], [68, 41], [68, 68], [70, 41], [70, 68], [70, 69], [71, 70], [72, 38], [72, 33], [74, 73], [74, 72], [76, 75], [76, 74], [78, 77], [78, 76], [79, 74], [79, 78], [80, 79], [83, 86], [83, 81], [85, 83], [86, 81], [86, 86], [87, 86], [87, 81], [88, 87], [92, 89], [92, 117], [92, 120], [94, 85], [94, 134], [94, 92], [95, 80], [96, 95], [96, 94], [97, 96], [98, 97], [99, 98], [99, 96], [100, 99], [101, 100], [101, 98], [102, 117], [102, 89], [102, 120], [104, 134], [104, 102], [104, 85], [105, 90], [105, 135], [107, 37], [107, 105], [107, 63], [108, 104], [108, 107], [109, 80], [110, 109], [110, 108], [111, 110], [112, 111], [113, 112], [113, 110], [114, 113], [114, 112], [115, 101], [115, 114], [116, 115], [117, 120], [117, 117], [117, 89], [118, 117], [119, 118], [121, 90], [121, 135], [123, 120], [123, 117], [123, 89], [124, 123], [124, 121], [125, 120], [125, 117], [125, 89], [127, 85], [127, 125], [127, 134], [128, 135], [128, 90], [130, 63], [130, 128], [130, 37], [131, 130], [131, 127], [132, 117], [132, 89], [132, 120], [134, 131], [134, 132], [135, 90], [135, 135], [136, 135], [136, 90], [137, 136], [138, 90], [138, 135], [139, 138], [141, 140], [143, 142], [148, 117], [148, 89], [148, 120], [149, 90], [149, 135], [150, 149], [150, 144], [150, 184], [151, 150], [152, 146], [152, 180], [153, 152], [153, 151], [155, 153], [156, 148], [156, 155], [157, 179], [157, 156], [159, 158], [159, 157], [160, 156], [160, 159], [161, 160], [163, 124], [163, 161], [165, 164], [165, 163], [166, 143], [166, 165], [168, 167], [168, 166], [171, 184], [171, 170], [171, 144], [172, 171], [173, 146], [173, 180], [174, 173], [174, 172], [176, 174], [177, 176], [177, 169], [178, 168], [179, 178], [179, 177], [180, 180], [180, 146], [181, 146], [181, 180], [182, 181], [182, 139], [183, 182], [184, 184], [184, 144], [185, 144], [185, 184], [186, 185], [186, 141], [187, 186], [189, 179], [189, 188], [190, 189], [191, 190], [192, 191], [199, 198], [199, 193], [199, 248], [200, 199], [201, 244], [201, 195], [202, 200], [202, 201], [204, 202], [205, 204], [205, 197], [206, 179], [206, 205], [207, 190], [207, 220], [208, 207], [208, 206], [209, 205], [212, 193], [212, 211], [212, 248], [213, 212], [214, 195], [214, 244], [215, 214], [215, 213], [217, 215], [218, 217], [218, 210], [219, 218], [219, 179], [220, 219], [223, 222], [223, 193], [223, 248], [224, 223], [225, 244], [225, 195], [226, 225], [226, 224], [228, 226], [229, 228], [229, 221], [230, 179], [230, 229], [231, 230], [231, 243], [231, 192], [232, 229], [235, 248], [235, 234], [235, 193], [236, 235], [237, 195], [237, 244], [238, 237], [238, 236], [240, 238], [241, 233], [241, 240], [242, 241], [242, 179], [243, 242], [244, 195], [244, 244], [245, 195], [245, 244], [246, 139], [246, 245], [247, 246], [248, 193], [248, 248], [249, 248], [249, 193], [250, 249], [250, 141], [251, 250], [252, 243], [252, 192], [253, 220], [253, 252], [253, 190], [255, 253], [255, 254], [256, 250], [258, 255], [258, 257], [259, 250], [260, 3], [263, 261], [263, 260], [264, 262], [264, 260], [266, 265], [266, 260], [274, 300], [274, 273], [274, 268], [275, 274], [276, 270], [276, 296], [277, 276], [277, 275], [279, 277], [280, 272], [280, 279], [281, 179], [281, 295], [281, 280], [282, 220], [282, 190], [282, 281], [283, 243], [283, 192], [284, 190], [284, 283], [284, 220], [287, 300], [287, 268], [287, 286], [288, 287], [289, 296], [289, 270], [290, 289], [290, 288], [292, 290], [293, 285], [293, 292], [294, 282], [294, 284], [295, 294], [295, 293], [296, 270], [296, 296], [297, 296], [297, 270], [298, 139], [298, 297], [299, 298], [300, 268], [300, 300], [301, 300], [301, 268], [302, 301], [302, 141], [303, 302], [304, 3], [307, 304], [307, 305], [308, 306], [308, 304], [310, 309], [310, 304], [311, 3], [313, 311]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5afe6c32d9638d02e530c20ac50f6c9b3669998e3b66a1a55d9b6a984e26f769_5afe6c32d9638d02e530c20ac50f6c9b3669998e3b66a1a55d9b6a984e26f769.jsonl.gz", "strip_func_name": "sub_40770E", "query": "\n\n\n_QWORD *__fastcall sub_40770E(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, int a8, __int64 a9)\n{\nfloat v9; // xmm0_4\nint v10; // xmm0_4\n__int64 v11; // rdx\n__int64 v12; // rdx\nint v14[768]; // [rsp+10h] [rbp-C50h]\n__int64 v15; // [rsp+C10h] [rbp-50h] BYREF\n__int64 v16; // [rsp+C18h] [rbp-48h]\nint *v17; // [rsp+C20h] [rbp-40h]\ndouble v18; // [rsp+C30h] [rbp-30h]\n__int64 v19; // [rsp+C3Ch] [rbp-24h]\nint v20; // [rsp+C44h] [rbp-1Ch]\nfloat v21; // [rsp+C48h] [rbp-18h]\nint v22; // [rsp+C4Ch] [rbp-14h]\nint v23; // [rsp+C50h] [rbp-10h]\nint j; // [rsp+C54h] [rbp-Ch]\nint k; // [rsp+C58h] [rbp-8h]\nint i; // [rsp+C5Ch] [rbp-4h]\n\nif ( a9 && a8 == 1 )\n{\nsub_4032DC(&v15, HIDWORD(a7), a7, 1);\nif ( v17 )\n{\nfor ( i = 0; i <= 255; ++i )\nv14[i + 512] = 0;\nfor ( j = 0; j < (int)a7; ++j )\n{\nfor ( k = 0; k < SHIDWORD(a7); ++k )\n{\nv9 = 255.0 * *(float *)(a9 + 4LL * (j * HIDWORD(a7) + k));\n++v14[(unsigned __int8)(int)v9 + 512];\n}\n}\nv20 = (int)((double)(HIDWORD(a7) * (int)a7) / 64.0);\nfor ( i = 0; i <= 63; ++i )\nv14[i + 256] = 0;\nv23 = 0;\nfor ( i = 0; i <= 255; ++i )\n{\nif ( (int)abs32(v20 - v14[v23 + 256]) < (int)abs32(v20 - (v14[i + 512] + v14[v23 + 256])) && ++v23 > 63 )\nv23 = 63;\nv14[i] = v23;\nv14[v23 + 256] += v14[i + 512];\n}\nv19 = a7;\nv18 = 4.0;\nfor ( j = 0; j < (int)v19; ++j )\n{\nfor ( k = 0; k < SHIDWORD(v19); ++k )\n{\n*(float *)&v10 = (double)v14[(unsigned __int8)(int)(float)(255.0 * *(float *)(a9 + 4LL * (j * HIDWORD(a7) + k)))]\n* v18\n/ 255.0;\nv17[j * HIDWORD(v15) + k] = v10;\n}\n}\nv22 = *v17;\nv21 = *(float *)&v22;\nfor ( j = 0; j < (int)v19; ++j )\n{\nfor ( k = 0; k < SHIDWORD(v19); ++k )\n{\nif ( *(float *)&v22 > *(float *)&v17[j * HIDWORD(v15) + k] )\nv22 = v17[j * HIDWORD(v15) + k];\nif ( *(float *)&v17[j * HIDWORD(v15) + k] > v21 )\nv21 = *(float *)&v17[j * HIDWORD(v15) + k];\n}\n}\nif ( (float)(v21 - *(float *)&v22) == 0.0 )\n{\nv11 = v16;\n*a1 = v15;\na1[1] = v11;\na1[2] = v17;\n}\nelse\n{\nfor ( j = 0; j < (int)v19; ++j )\n{\nfor ( k = 0; k < SHIDWORD(v19); ++k )\n*(float *)&v17[j * HIDWORD(v15) + k] = (float)(*(float *)&v17[j * HIDWORD(v15) + k] - *(float *)&v22)\n/ (float)(v21 - *(float *)&v22);\n}\nv12 = v16;\n*a1 = v15;\na1[1] = v12;\na1[2] = v17;\n}\n}\nelse\n{\nsub_403290(a1, 0, 0, 0);\n}\n}\nelse\n{\nsub_403290(a1, 0, 0, 0);\n}\nreturn a1;\n}\n\n\n\nQ:[a1,a7,v14,v15,v18,v19,v20,v21,v22,v23,j,k,sub_40770E,sub_4032DC,sub_403290,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'retstr', 'a7': 'im', 'v14': 'trans_table', 'v15': 'out', 'v18': 'gray_step', 'v19': 'y_size2', 'v20': 'target_value', 'v21': 'max', 'v22': 'min', 'v23': 'gray', 'j': 'y', 'k': 'x', 'sub_40770E': 'sod_equalize_histogram', 'sub_4032DC': 'sod_make_image', 'sub_403290': 'sod_make_empty_image'}"}
stats_gather
bdab7ddff0624b4c28b528347e3fd09c86197aaa65fe8bbabad0b26e0585e4fd
ColinIanKing
powerstat
NA
static bool stats_gather( const stats_t *const s1, const stats_t *const s2, stats_t *const res) { double total; int i, j; bool inaccurate = false; static const int indices[] = { CPU_USER, CPU_NICE, CPU_SYS, CPU_IDLE, CPU_IOWAIT, -1 }; res->value[CPU_USER] = stats_sane(s1, s2, CPU_USER); res->value[CPU_NICE] = stats_sane(s1, s2, CPU_NICE); res->value[CPU_SYS] = stats_sane(s1, s2, CPU_SYS); res->value[CPU_IDLE] = stats_sane(s1, s2, CPU_IDLE); res->value[CPU_IOWAIT] = stats_sane(s1, s2, CPU_IOWAIT); res->value[CPU_IRQ] = stats_sane(s1, s2, CPU_IRQ); res->value[CPU_SOFTIRQ] = stats_sane(s1, s2, CPU_SOFTIRQ); res->value[CPU_CTXT] = stats_sane(s1, s2, CPU_CTXT); res->value[CPU_INTR] = stats_sane(s1, s2, CPU_INTR); for (i = 0; (j = indices[i]) != -1; i++) inaccurate |= (s1->inaccurate[j] | s2->inaccurate[j]); total = res->value[CPU_USER] + res->value[CPU_NICE] + res->value[CPU_SYS] + res->value[CPU_IDLE] + res->value[CPU_IOWAIT]; /* * This should not happen, but we need to avoid division * by zero or weird results if the data is deemed valid */ if (!inaccurate && total <= 0.0) return false; res->value[CPU_TOTAL] = 100.0 * (total - res->value[CPU_IDLE]) / total; for (i = 0; (j = indices[i]) != -1; i++) { res->value[j] = (INACCURATE(s1, s2, j) || (total <= 0.0)) ? NAN : (100.0 * res->value[j]) / total; } res->value[CPU_CTXT] = (INACCURATE(s1, s2, CPU_CTXT) || (sample_delay <= 0.0)) ? NAN : res->value[CPU_CTXT] / sample_delay; res->value[CPU_INTR] = (INACCURATE(s1, s2, CPU_INTR) || (sample_delay <= 0.0)) ? NAN : res->value[CPU_INTR] / sample_delay; res->value[CPU_PROCS_RUN] = s2->inaccurate[CPU_PROCS_RUN] ? NAN : s2->value[CPU_PROCS_RUN]; res->value[CPU_PROCS_BLK] = s2->inaccurate[CPU_PROCS_BLK] ? NAN : s2->value[CPU_PROCS_BLK]; res->value[CPU_FREQ] = s2->value[CPU_FREQ]; res->value[CPU_FREQ_MIN] = s2->value[CPU_FREQ_MIN]; res->value[CPU_FREQ_MAX] = s2->value[CPU_FREQ_MAX]; res->value[GPU_FREQ] = s2->value[GPU_FREQ]; return true; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403853", "function_addr": 4208723, "binary_name": "bdab7ddff0624b4c28b528347e3fd09c86197aaa65fe8bbabad0b26e0585e4fd.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 38h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_5], 0"], [7, "mov rcx, [rbp+var_30]"], [8, "mov rax, [rbp+var_28]"], [9, "mov edx, 0"], [10, "mov rsi, rcx"], [11, "mov rdi, rax"], [12, "call sub_4037CB"], [13, "movq rax, xmm0"], [14, "mov rdx, [rbp+var_38]"], [15, "mov [rdx], rax"], [16, "mov rcx, [rbp+var_30]"], [17, "mov rax, [rbp+var_28]"], [18, "mov edx, 1"], [19, "mov rsi, rcx"], [20, "mov rdi, rax"], [21, "call sub_4037CB"], [22, "movq rax, xmm0"], [23, "mov rdx, [rbp+var_38]"], [24, "mov [rdx+8], rax"], [25, "mov rcx, [rbp+var_30]"], [26, "mov rax, [rbp+var_28]"], [27, "mov edx, 2"], [28, "mov rsi, rcx"], [29, "mov rdi, rax"], [30, "call sub_4037CB"], [31, "movq rax, xmm0"], [32, "mov rdx, [rbp+var_38]"], [33, "mov [rdx+10h], rax"], [34, "mov rcx, [rbp+var_30]"], [35, "mov rax, [rbp+var_28]"], [36, "mov edx, 3"], [37, "mov rsi, rcx"], [38, "mov rdi, rax"], [39, "call sub_4037CB"], [40, "movq rax, xmm0"], [41, "mov rdx, [rbp+var_38]"], [42, "mov [rdx+18h], rax"], [43, "mov rcx, [rbp+var_30]"], [44, "mov rax, [rbp+var_28]"], [45, "mov edx, 4"], [46, "mov rsi, rcx"], [47, "mov rdi, rax"], [48, "call sub_4037CB"], [49, "movq rax, xmm0"], [50, "mov rdx, [rbp+var_38]"], [51, "mov [rdx+20h], rax"], [52, "mov rcx, [rbp+var_30]"], [53, "mov rax, [rbp+var_28]"], [54, "mov edx, 6"], [55, "mov rsi, rcx"], [56, "mov rdi, rax"], [57, "call sub_4037CB"], [58, "movq rax, xmm0"], [59, "mov rdx, [rbp+var_38]"], [60, "mov [rdx+30h], rax"], [61, "mov rcx, [rbp+var_30]"], [62, "mov rax, [rbp+var_28]"], [63, "mov edx, 7"], [64, "mov rsi, rcx"], [65, "mov rdi, rax"], [66, "call sub_4037CB"], [67, "movq rax, xmm0"], [68, "mov rdx, [rbp+var_38]"], [69, "mov [rdx+38h], rax"], [70, "mov rcx, [rbp+var_30]"], [71, "mov rax, [rbp+var_28]"], [72, "mov edx, 9"], [73, "mov rsi, rcx"], [74, "mov rdi, rax"], [75, "call sub_4037CB"], [76, "movq rax, xmm0"], [77, "mov rdx, [rbp+var_38]"], [78, "mov [rdx+48h], rax"], [79, "mov rcx, [rbp+var_30]"], [80, "mov rax, [rbp+var_28]"], [81, "mov edx, 8"], [82, "mov rsi, rcx"], [83, "mov rdi, rax"], [84, "call sub_4037CB"], [85, "movq rax, xmm0"], [86, "mov rdx, [rbp+var_38]"], [87, "mov [rdx+40h], rax"], [88, "mov [rbp+var_4], 0"], [89, "jmp short loc_4039F6"], [90, "mov rdx, [rbp+var_28]"], [91, "mov eax, [rbp+var_C]"], [92, "cdqe"], [93, "movzx ecx, byte ptr [rdx+rax+198h]"], [94, "mov rdx, [rbp+var_30]"], [95, "mov eax, [rbp+var_C]"], [96, "cdqe"], [97, "movzx eax, byte ptr [rdx+rax+198h]"], [98, "or eax, ecx"], [99, "or al, [rbp+var_5]"], [100, "movzx eax, al"], [101, "test eax, eax"], [102, "setnz al"], [103, "mov [rbp+var_5], al"], [104, "add [rbp+var_4], 1"], [105, "mov eax, [rbp+var_4]"], [106, "cdqe"], [107, "mov eax, ds:dword_40BCB0[rax*4]"], [108, "mov [rbp+var_C], eax"], [109, "cmp [rbp+var_C], 0FFFFFFFFh"], [110, "jnz short loc_4039C0"], [111, "mov rax, [rbp+var_38]"], [112, "movsd xmm1, qword ptr [rax]"], [113, "mov rax, [rbp+var_38]"], [114, "movsd xmm0, qword ptr [rax+8]"], [115, "addsd xmm1, xmm0"], [116, "mov rax, [rbp+var_38]"], [117, "movsd xmm0, qword ptr [rax+10h]"], [118, "addsd xmm1, xmm0"], [119, "mov rax, [rbp+var_38]"], [120, "movsd xmm0, qword ptr [rax+18h]"], [121, "addsd xmm1, xmm0"], [122, "mov rax, [rbp+var_38]"], [123, "movsd xmm0, qword ptr [rax+20h]"], [124, "addsd xmm0, xmm1"], [125, "movsd [rbp+var_18], xmm0"], [126, "movzx eax, [rbp+var_5]"], [127, "xor eax, 1"], [128, "test al, al"], [129, "jz short loc_403A6C"], [130, "pxor xmm0, xmm0"], [131, "comisd xmm0, [rbp+var_18]"], [132, "jb short loc_403A6C"], [133, "mov eax, 0"], [134, "jmp locret_403C83"], [135, "mov rax, [rbp+var_38]"], [136, "movsd xmm2, qword ptr [rax+18h]"], [137, "movsd xmm0, [rbp+var_18]"], [138, "movapd xmm1, xmm0"], [139, "subsd xmm1, xmm2"], [140, "movsd xmm0, cs:qword_40BD00"], [141, "mulsd xmm0, xmm1"], [142, "divsd xmm0, [rbp+var_18]"], [143, "mov rax, [rbp+var_38]"], [144, "movsd qword ptr [rax+28h], xmm0"], [145, "mov [rbp+var_4], 0"], [146, "jmp short loc_403B1D"], [147, "mov rdx, [rbp+var_28]"], [148, "mov eax, [rbp+var_C]"], [149, "cdqe"], [150, "movzx ecx, byte ptr [rdx+rax+198h]"], [151, "mov rdx, [rbp+var_30]"], [152, "mov eax, [rbp+var_C]"], [153, "cdqe"], [154, "movzx eax, byte ptr [rdx+rax+198h]"], [155, "or eax, ecx"], [156, "test al, al"], [157, "jnz short loc_403B02"], [158, "pxor xmm0, xmm0"], [159, "comisd xmm0, [rbp+var_18]"], [160, "setnb al"], [161, "xor eax, 1"], [162, "test al, al"], [163, "jz short loc_403B02"], [164, "mov rax, [rbp+var_38]"], [165, "mov edx, [rbp+var_C]"], [166, "movsxd rdx, edx"], [167, "movsd xmm1, qword ptr [rax+rdx*8]"], [168, "movsd xmm0, cs:qword_40BD00"], [169, "mulsd xmm0, xmm1"], [170, "divsd xmm0, [rbp+var_18]"], [171, "jmp short loc_403B0A"], [172, "movsd xmm0, cs:qword_40BD08"], [173, "mov rax, [rbp+var_38]"], [174, "mov edx, [rbp+var_C]"], [175, "movsxd rdx, edx"], [176, "movsd qword ptr [rax+rdx*8], xmm0"], [177, "add [rbp+var_4], 1"], [178, "mov eax, [rbp+var_4]"], [179, "cdqe"], [180, "mov eax, ds:dword_40BCB0[rax*4]"], [181, "mov [rbp+var_C], eax"], [182, "cmp [rbp+var_C], 0FFFFFFFFh"], [183, "jnz loc_403AA5"], [184, "mov rax, [rbp+var_28]"], [185, "movzx edx, byte ptr [rax+1A1h]"], [186, "mov rax, [rbp+var_30]"], [187, "movzx eax, byte ptr [rax+1A1h]"], [188, "or eax, edx"], [189, "test al, al"], [190, "jnz short loc_403B83"], [191, "movsd xmm1, cs:qword_40E248"], [192, "pxor xmm0, xmm0"], [193, "comisd xmm0, xmm1"], [194, "setnb al"], [195, "xor eax, 1"], [196, "test al, al"], [197, "jz short loc_403B83"], [198, "mov rax, [rbp+var_38]"], [199, "movsd xmm0, qword ptr [rax+48h]"], [200, "movsd xmm1, cs:qword_40E248"], [201, "divsd xmm0, xmm1"], [202, "jmp short loc_403B8B"], [203, "movsd xmm0, cs:qword_40BD08"], [204, "mov rax, [rbp+var_38]"], [205, "movsd qword ptr [rax+48h], xmm0"], [206, "mov rax, [rbp+var_28]"], [207, "movzx edx, byte ptr [rax+1A0h]"], [208, "mov rax, [rbp+var_30]"], [209, "movzx eax, byte ptr [rax+1A0h]"], [210, "or eax, edx"], [211, "test al, al"], [212, "jnz short loc_403BE1"], [213, "movsd xmm1, cs:qword_40E248"], [214, "pxor xmm0, xmm0"], [215, "comisd xmm0, xmm1"], [216, "setnb al"], [217, "xor eax, 1"], [218, "test al, al"], [219, "jz short loc_403BE1"], [220, "mov rax, [rbp+var_38]"], [221, "movsd xmm0, qword ptr [rax+40h]"], [222, "movsd xmm1, cs:qword_40E248"], [223, "divsd xmm0, xmm1"], [224, "jmp short loc_403BE9"], [225, "movsd xmm0, cs:qword_40BD08"], [226, "mov rax, [rbp+var_38]"], [227, "movsd qword ptr [rax+40h], xmm0"], [228, "mov rax, [rbp+var_30]"], [229, "movzx eax, byte ptr [rax+1A2h]"], [230, "test al, al"], [231, "jz short loc_403C0B"], [232, "movsd xmm0, cs:qword_40BD08"], [233, "jmp short loc_403C14"], [234, "mov rax, [rbp+var_30]"], [235, "movsd xmm0, qword ptr [rax+50h]"], [236, "mov rax, [rbp+var_38]"], [237, "movsd qword ptr [rax+50h], xmm0"], [238, "mov rax, [rbp+var_30]"], [239, "movzx eax, byte ptr [rax+1A3h]"], [240, "test al, al"], [241, "jz short loc_403C36"], [242, "movsd xmm0, cs:qword_40BD08"], [243, "jmp short loc_403C3F"], [244, "mov rax, [rbp+var_30]"], [245, "movsd xmm0, qword ptr [rax+58h]"], [246, "mov rax, [rbp+var_38]"], [247, "movsd qword ptr [rax+58h], xmm0"], [248, "mov rax, [rbp+var_30]"], [249, "movsd xmm0, qword ptr [rax+60h]"], [250, "mov rax, [rbp+var_38]"], [251, "movsd qword ptr [rax+60h], xmm0"], [252, "mov rax, [rbp+var_30]"], [253, "movsd xmm0, qword ptr [rax+68h]"], [254, "mov rax, [rbp+var_38]"], [255, "movsd qword ptr [rax+68h], xmm0"], [256, "mov rax, [rbp+var_30]"], [257, "movsd xmm0, qword ptr [rax+70h]"], [258, "mov rax, [rbp+var_38]"], [259, "movsd qword ptr [rax+70h], xmm0"], [260, "mov eax, 1"], [261, "leave"], [262, "retn"]], "data_dep": [[7, 4], [8, 3], [10, 7], [11, 8], [14, 5], [15, 14], [15, 13], [16, 4], [17, 3], [19, 16], [20, 17], [23, 5], [24, 22], [24, 23], [25, 4], [26, 3], [28, 25], [29, 26], [32, 5], [33, 32], [33, 31], [34, 4], [35, 3], [37, 34], [38, 35], [41, 5], [42, 41], [42, 40], [43, 4], [44, 3], [46, 43], [47, 44], [50, 5], [51, 50], [51, 49], [52, 4], [53, 3], [55, 52], [56, 53], [59, 5], [60, 59], [60, 58], [61, 4], [62, 3], [64, 61], [65, 62], [68, 5], [69, 67], [69, 68], [70, 4], [71, 3], [73, 70], [74, 71], [77, 5], [78, 77], [78, 76], [79, 4], [80, 3], [82, 79], [83, 80], [86, 5], [87, 86], [87, 85], [90, 3], [91, 108], [93, 33], [93, 42], [93, 51], [93, 60], [93, 69], [93, 78], [93, 87], [93, 91], [93, 15], [93, 24], [94, 4], [95, 108], [97, 15], [97, 95], [97, 24], [97, 33], [97, 42], [97, 51], [97, 60], [97, 69], [97, 78], [97, 87], [98, 97], [98, 93], [99, 103], [99, 98], [99, 6], [100, 99], [101, 100], [102, 101], [103, 102], [104, 88], [104, 104], [105, 104], [105, 88], [108, 107], [109, 108], [110, 109], [111, 5], [112, 24], [112, 33], [112, 42], [112, 51], [112, 60], [112, 111], [112, 69], [112, 78], [112, 87], [112, 15], [113, 5], [114, 78], [114, 87], [114, 15], [114, 24], [114, 113], [114, 33], [114, 42], [114, 51], [114, 60], [114, 69], [115, 112], [115, 114], [116, 5], [117, 116], [117, 69], [117, 78], [117, 87], [117, 15], [117, 24], [117, 33], [117, 42], [117, 51], [117, 60], [118, 117], [118, 115], [119, 5], [120, 24], [120, 33], [120, 42], [120, 51], [120, 60], [120, 69], [120, 78], [120, 87], [120, 119], [120, 15], [121, 118], [121, 120], [122, 5], [123, 24], [123, 33], [123, 42], [123, 51], [123, 60], [123, 69], [123, 78], [123, 87], [123, 15], [123, 122], [124, 123], [124, 121], [125, 124], [126, 103], [126, 6], [127, 126], [128, 127], [129, 128], [131, 130], [131, 125], [132, 128], [135, 5], [136, 135], [136, 144], [136, 78], [136, 87], [136, 15], [136, 24], [136, 33], [136, 42], [136, 51], [136, 60], [136, 69], [137, 125], [138, 137], [139, 138], [139, 136], [141, 140], [141, 139], [142, 125], [142, 141], [143, 5], [144, 143], [144, 142], [147, 3], [148, 181], [150, 33], [150, 42], [150, 51], [150, 60], [150, 69], [150, 176], [150, 144], [150, 148], [150, 78], [150, 87], [150, 15], [150, 24], [151, 4], [152, 181], [154, 15], [154, 24], [154, 33], [154, 42], [154, 51], [154, 60], [154, 69], [154, 176], [154, 144], [154, 152], [154, 78], [154, 87], [155, 150], [155, 154], [156, 155], [157, 156], [159, 158], [159, 125], [160, 156], [161, 160], [162, 161], [163, 162], [164, 5], [165, 181], [166, 165], [167, 164], [167, 15], [167, 24], [167, 33], [167, 42], [167, 51], [167, 60], [167, 69], [167, 176], [167, 144], [167, 78], [167, 87], [169, 167], [169, 168], [170, 169], [170, 125], [173, 5], [174, 181], [175, 174], [176, 170], [176, 173], [176, 172], [177, 145], [177, 177], [178, 145], [178, 177], [181, 180], [182, 181], [183, 182], [184, 3], [185, 144], [185, 87], [185, 184], [185, 15], [185, 24], [185, 33], [185, 42], [185, 51], [185, 60], [185, 69], [185, 78], [185, 176], [186, 4], [187, 78], [187, 87], [187, 15], [187, 24], [187, 186], [187, 33], [187, 42], [187, 51], [187, 60], [187, 69], [187, 176], [187, 144], [188, 187], [188, 185], [189, 188], [190, 189], [193, 192], [193, 191], [194, 189], [195, 194], [196, 195], [197, 196], [198, 5], [199, 42], [199, 51], [199, 60], [199, 69], [199, 78], [199, 176], [199, 144], [199, 87], [199, 198], [199, 15], [199, 24], [199, 33], [201, 199], [201, 200], [204, 5], [205, 201], [205, 204], [205, 203], [206, 3], [207, 206], [207, 205], [208, 4], [209, 208], [209, 205], [210, 209], [210, 207], [211, 210], [212, 211], [215, 214], [215, 213], [216, 211], [217, 216], [218, 217], [219, 218], [220, 5], [221, 205], [221, 42], [221, 51], [221, 60], [221, 69], [221, 78], [221, 176], [221, 144], [221, 87], [221, 220], [221, 15], [221, 24], [221, 33], [223, 222], [223, 221], [226, 5], [227, 223], [227, 226], [227, 225], [228, 4], [229, 228], [229, 227], [230, 229], [231, 230], [234, 4], [235, 24], [235, 33], [235, 42], [235, 144], [235, 205], [235, 227], [235, 51], [235, 60], [235, 69], [235, 78], [235, 87], [235, 176], [235, 234], [235, 15], [236, 5], [237, 232], [237, 236], [237, 235], [238, 4], [239, 238], [239, 237], [240, 239], [241, 240], [244, 4], [245, 51], [245, 60], [245, 69], [245, 78], [245, 87], [245, 176], [245, 244], [245, 15], [245, 24], [245, 33], [245, 42], [245, 144], [245, 237], [245, 205], [245, 227], [246, 5], [247, 245], [247, 242], [247, 246], [248, 4], [249, 247], [249, 248], [250, 5], [251, 250], [251, 249], [252, 4], [253, 252], [253, 251], [254, 5], [255, 253], [255, 254], [256, 4], [257, 256], [257, 255], [258, 5], [259, 258], [259, 257], [262, 260], [262, 133]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/bdab7ddff0624b4c28b528347e3fd09c86197aaa65fe8bbabad0b26e0585e4fd_bdab7ddff0624b4c28b528347e3fd09c86197aaa65fe8bbabad0b26e0585e4fd.jsonl.gz", "strip_func_name": "sub_403853", "query": "\n\n\n__int64 __fastcall sub_403853(__int64 a1, __int64 a2, __int64 a3, double a4)\n{\ndouble v5; // xmm0_8\ndouble v6; // xmm0_8\ndouble v7; // xmm0_8\n__int64 v8; // xmm0_8\n__int64 v9; // xmm0_8\ndouble v11; // [rsp+20h] [rbp-18h]\nint v12; // [rsp+2Ch] [rbp-Ch]\nint v13; // [rsp+2Ch] [rbp-Ch]\nbool v14; // [rsp+33h] [rbp-5h]\nint i; // [rsp+34h] [rbp-4h]\nint j; // [rsp+34h] [rbp-4h]\n\nv14 = 0;\nsub_4037CB(a1, a2, 0);\n*(double *)a3 = a4;\nsub_4037CB(a1, a2, 1);\n*(double *)(a3 + 8) = a4;\nsub_4037CB(a1, a2, 2);\n*(double *)(a3 + 16) = a4;\nsub_4037CB(a1, a2, 3);\n*(double *)(a3 + 24) = a4;\nsub_4037CB(a1, a2, 4);\n*(double *)(a3 + 32) = a4;\nsub_4037CB(a1, a2, 6);\n*(double *)(a3 + 48) = a4;\nsub_4037CB(a1, a2, 7);\n*(double *)(a3 + 56) = a4;\nsub_4037CB(a1, a2, 9);\n*(double *)(a3 + 72) = a4;\nsub_4037CB(a1, a2, 8);\n*(double *)(a3 + 64) = a4;\nfor ( i = 0; ; ++i )\n{\nv12 = dword_40BCB0[i];\nif ( v12 == -1 )\nbreak;\nv14 = (unsigned __int8)(v14 | *(_BYTE *)(a1 + v12 + 408) | *(_BYTE *)(a2 + v12 + 408)) != 0;\n}\nv11 = *(double *)(a3 + 32) + *(double *)a3 + *(double *)(a3 + 8) + *(double *)(a3 + 16) + *(double *)(a3 + 24);\nif ( !v14 && v11 <= 0.0 )\nreturn 0LL;\n*(double *)(a3 + 40) = 100.0 * (v11 - *(double *)(a3 + 24)) / v11;\nfor ( j = 0; ; ++j )\n{\nv13 = dword_40BCB0[j];\nif ( v13 == -1 )\nbreak;\nif ( *(_BYTE *)(a1 + v13 + 408) | *(_BYTE *)(a2 + v13 + 408) || v11 <= 0.0 )\nv5 = NAN;\nelse\nv5 = 100.0 * *(double *)(a3 + 8LL * v13) / v11;\n*(double *)(a3 + 8LL * v13) = v5;\n}\nif ( *(_BYTE *)(a1 + 417) | *(_BYTE *)(a2 + 417) || *(double *)&qword_40E248 <= 0.0 )\nv6 = NAN;\nelse\nv6 = *(double *)(a3 + 72) / *(double *)&qword_40E248;\n*(double *)(a3 + 72) = v6;\nif ( *(_BYTE *)(a1 + 416) | *(_BYTE *)(a2 + 416) || *(double *)&qword_40E248 <= 0.0 )\nv7 = NAN;\nelse\nv7 = *(double *)(a3 + 64) / *(double *)&qword_40E248;\n*(double *)(a3 + 64) = v7;\nif ( *(_BYTE *)(a2 + 418) )\nv8 = 0x7FF8000000000000LL;\nelse\nv8 = *(_QWORD *)(a2 + 80);\n*(_QWORD *)(a3 + 80) = v8;\nif ( *(_BYTE *)(a2 + 419) )\nv9 = 0x7FF8000000000000LL;\nelse\nv9 = *(_QWORD *)(a2 + 88);\n*(_QWORD *)(a3 + 88) = v9;\n*(_QWORD *)(a3 + 96) = *(_QWORD *)(a2 + 96);\n*(_QWORD *)(a3 + 104) = *(_QWORD *)(a2 + 104);\n*(_QWORD *)(a3 + 112) = *(_QWORD *)(a2 + 112);\nreturn 1LL;\n}\n\n\n\nQ:[a3,a1,a2,v11,v14,j,sub_403853,sub_4037CB,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'res', 'a1': 's1', 'a2': 's2', 'v11': 'total', 'v14': 'inaccurate', 'j': 'ia', 'sub_403853': 'stats_gather', 'sub_4037CB': 'stats_sane'}"}
PrintUTimeByFormat
76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60
Wiimm
wiimms-szs-tools
NA
ccp PrintUTimeByFormat ( // returns temporary buffer by GetCircBuf(); ccp format, // format string for strftime() // 1-9 '@' in row replaced by digits of 'usec' u_usec_t utime // time in nsec, e.g. get by GetTimeNSec(false) ) { return PrintNSecByFormat(format,utime/USEC_PER_SEC,utime%USEC_PER_SEC*NSEC_PER_USEC); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_446124", "function_addr": 4481316, "binary_name": "76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60.elf_extract.pkl\n"}, "code": [[0, "sub rsp, 18h"], [1, "mov [rsp+18h+var_10], rdi"], [2, "mov [rsp+18h+var_18], rsi"], [3, "mov rcx, [rsp+18h+var_18]"], [4, "mov rdx, 431BDE82D7B634DBh"], [5, "mov rax, rcx"], [6, "mul rdx"], [7, "mov rax, rdx"], [8, "shr rax, 12h"], [9, "imul rdx, rax, 0F4240h"], [10, "mov rax, rcx"], [11, "sub rax, rdx"], [12, "imul ecx, eax, 3E8h"], [13, "mov rax, [rsp+18h+var_18]"], [14, "mov rdx, 431BDE82D7B634DBh"], [15, "mul rdx"], [16, "mov rax, rdx"], [17, "shr rax, 12h"], [18, "mov rsi, rax"], [19, "mov rax, [rsp+18h+var_10]"], [20, "mov edx, ecx"], [21, "mov rdi, rax"], [22, "call sub_445E1E"], [23, "add rsp, 18h"], [24, "retn"]], "data_dep": [[3, 2], [5, 3], [6, 4], [7, 6], [8, 7], [9, 8], [9, 6], [10, 3], [11, 10], [11, 9], [12, 3], [12, 11], [13, 2], [15, 14], [16, 15], [17, 16], [18, 17], [19, 1], [20, 12], [21, 19], [23, 0], [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/76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60_76c05f321c4703deb67fa538c2cf508c66723817fc1ebd22a9f48d40487c4c60.jsonl.gz", "strip_func_name": "sub_446124", "query": "\n\n\nvoid *__fastcall sub_446124(char *a1, unsigned __int64 a2)\n{\nreturn sub_445E1E(a1, a2 / 0xF4240, 1000 * (unsigned int)(a2 % 0xF4240));\n}\n\n\n\nQ:[a1,a2,sub_446124,sub_445E1E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'format', 'a2': 'utime', 'sub_446124': 'PrintUTimeByFormat', 'sub_445E1E': 'PrintNSecByFormat'}"}
tchdbtrancommit
812e8dfce92fa099466d25318f60cd3447e0cec291f3b4540a415d01df80fb51
HewlettPackard
nvthreads
NA
bool tchdbtrancommit(TCHDB *hdb){ assert(hdb); if(!HDBLOCKMETHOD(hdb, true)) return false; if(hdb->fd < 0 || !(hdb->omode & HDBOWRITER) || hdb->fatal || !hdb->tran){ tchdbsetecode(hdb, TCEINVALID, __FILE__, __LINE__, __func__); HDBUNLOCKMETHOD(hdb); return false; } bool err = false; if(hdb->async && !tchdbflushdrp(hdb)) err = true; if(!tchdbmemsync(hdb, hdb->omode & HDBOTSYNC)) err = true; if(!err && ftruncate(hdb->walfd, 0) == -1){ tchdbsetecode(hdb, TCETRUNC, __FILE__, __LINE__, __func__); err = true; } hdb->tran = false; HDBUNLOCKMETHOD(hdb); return !err; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44B815", "function_addr": 4503573, "binary_name": "812e8dfce92fa099466d25318f60cd3447e0cec291f3b4540a415d01df80fb51.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rax, [rbp+var_18]"], [5, "mov rax, [rax]"], [6, "test rax, rax"], [7, "jz short loc_44B84F"], [8, "mov rax, [rbp+var_18]"], [9, "mov esi, 1"], [10, "mov rdi, rax"], [11, "call sub_4592A0"], [12, "xor eax, 1"], [13, "test al, al"], [14, "jz short loc_44B84F"], [15, "mov eax, 0"], [16, "jmp locret_44B9A7"], [17, "mov rax, [rbp+var_18]"], [18, "mov eax, [rax+50h]"], [19, "test eax, eax"], [20, "js short loc_44B889"], [21, "mov rax, [rbp+var_18]"], [22, "mov eax, [rax+54h]"], [23, "and eax, 2"], [24, "test eax, eax"], [25, "jz short loc_44B889"], [26, "mov rax, [rbp+var_18]"], [27, "movzx eax, byte ptr [rax+124h]"], [28, "test al, al"], [29, "jnz short loc_44B889"], [30, "mov rax, [rbp+var_18]"], [31, "movzx eax, byte ptr [rax+140h]"], [32, "xor eax, 1"], [33, "test al, al"], [34, "jz short loc_44B8CF"], [35, "mov rax, [rbp+var_18]"], [36, "lea r8, aTchdbtrancommi"], [37, "mov ecx, 488h"], [38, "lea rdx, aTchdbC"], [39, "mov esi, 2"], [40, "mov rdi, rax"], [41, "call sub_44BE5F"], [42, "mov rax, [rbp+var_18]"], [43, "mov rax, [rax]"], [44, "test rax, rax"], [45, "jz short loc_44B8C5"], [46, "mov rax, [rbp+var_18]"], [47, "mov rdi, rax"], [48, "call sub_459317"], [49, "mov eax, 0"], [50, "jmp locret_44B9A7"], [51, "mov [rbp+var_1], 0"], [52, "mov rax, [rbp+var_18]"], [53, "movzx eax, byte ptr [rax+0D0h]"], [54, "test al, al"], [55, "jz short loc_44B8F9"], [56, "mov rax, [rbp+var_18]"], [57, "mov rdi, rax"], [58, "call sub_4518D6"], [59, "xor eax, 1"], [60, "test al, al"], [61, "jz short loc_44B8F9"], [62, "mov [rbp+var_1], 1"], [63, "mov rax, [rbp+var_18]"], [64, "mov eax, [rax+54h]"], [65, "and eax, 40h"], [66, "test eax, eax"], [67, "setnz al"], [68, "movzx edx, al"], [69, "mov rax, [rbp+var_18]"], [70, "mov esi, edx"], [71, "mov rdi, rax"], [72, "call sub_44C104"], [73, "xor eax, 1"], [74, "test al, al"], [75, "jz short loc_44B924"], [76, "mov [rbp+var_1], 1"], [77, "movzx eax, [rbp+var_1]"], [78, "xor eax, 1"], [79, "test al, al"], [80, "jz short loc_44B972"], [81, "mov rax, [rbp+var_18]"], [82, "mov eax, [rax+144h]"], [83, "mov esi, 0"], [84, "mov edi, eax"], [85, "call _ftruncate"], [86, "cmp eax, 0FFFFFFFFh"], [87, "jnz short loc_44B972"], [88, "mov rax, [rbp+var_18]"], [89, "lea r8, aTchdbtrancommi"], [90, "mov ecx, 490h"], [91, "lea rdx, aTchdbC"], [92, "mov esi, 9"], [93, "mov rdi, rax"], [94, "call sub_44BE5F"], [95, "mov [rbp+var_1], 1"], [96, "mov rax, [rbp+var_18]"], [97, "mov byte ptr [rax+140h], 0"], [98, "mov rax, [rbp+var_18]"], [99, "mov rax, [rax]"], [100, "test rax, rax"], [101, "jz short loc_44B995"], [102, "mov rax, [rbp+var_18]"], [103, "mov rdi, rax"], [104, "call sub_459317"], [105, "movzx eax, [rbp+var_1]"], [106, "test eax, eax"], [107, "setnz al"], [108, "xor eax, 1"], [109, "movzx eax, al"], [110, "and eax, 1"], [111, "leave"], [112, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 3], [10, 8], [12, 11], [13, 12], [14, 13], [17, 3], [18, 17], [19, 18], [20, 19], [21, 3], [22, 21], [23, 22], [24, 23], [25, 24], [26, 3], [27, 26], [28, 27], [29, 28], [30, 3], [31, 30], [32, 31], [33, 32], [34, 33], [35, 3], [40, 35], [42, 3], [43, 42], [44, 43], [45, 44], [46, 3], [47, 46], [52, 3], [53, 52], [54, 53], [55, 54], [56, 3], [57, 56], [59, 58], [60, 59], [61, 60], [63, 3], [64, 63], [65, 64], [66, 65], [67, 66], [68, 67], [69, 3], [70, 68], [71, 69], [73, 72], [74, 73], [75, 74], [77, 62], [77, 76], [77, 51], [78, 77], [79, 78], [80, 79], [81, 3], [82, 81], [84, 82], [86, 85], [87, 86], [88, 3], [91, 68], [93, 88], [96, 3], [97, 96], [98, 3], [99, 97], [99, 98], [100, 99], [101, 100], [102, 3], [103, 102], [105, 95], [105, 51], [105, 76], [105, 62], [106, 105], [107, 106], [108, 107], [109, 108], [110, 109], [112, 15], [112, 49], [112, 110]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/812e8dfce92fa099466d25318f60cd3447e0cec291f3b4540a415d01df80fb51_812e8dfce92fa099466d25318f60cd3447e0cec291f3b4540a415d01df80fb51.jsonl.gz", "strip_func_name": "sub_44B815", "query": "\n\n\n_BOOL8 __fastcall sub_44B815(__int64 a1)\n{\n_BOOL8 result; // rax\nchar v2; // [rsp+1Fh] [rbp-1h]\n\nif ( *(_QWORD *)a1 && (unsigned __int8)sub_4592A0(a1, 1LL) != 1 )\nreturn 0LL;\nif ( *(int *)(a1 + 80) < 0 || (*(_DWORD *)(a1 + 84) & 2) == 0 || *(_BYTE *)(a1 + 292) || *(_BYTE *)(a1 + 320) != 1 )\n{\nsub_44BE5F(a1, 2LL, \"tchdb.c\", 1160LL, \"tchdbtrancommit\");\nif ( *(_QWORD *)a1 )\nsub_459317(a1);\nresult = 0LL;\n}\nelse\n{\nv2 = 0;\nif ( *(_BYTE *)(a1 + 208) && (unsigned __int8)sub_4518D6(a1) != 1 )\nv2 = 1;\nif ( (unsigned __int8)sub_44C104(a1, (*(_DWORD *)(a1 + 84) & 0x40) != 0) != 1 )\nv2 = 1;\nif ( v2 != 1 && ftruncate(*(_DWORD *)(a1 + 324), 0LL) == -1 )\n{\nsub_44BE5F(a1, 9LL, \"tchdb.c\", 1168LL, \"tchdbtrancommit\");\nv2 = 1;\n}\n*(_BYTE *)(a1 + 320) = 0;\nif ( *(_QWORD *)a1 )\nsub_459317(a1);\nresult = v2 == 0;\n}\nreturn result;\n}\n\n\n\nQ:[a1,v2,sub_44B815,sub_4592A0,sub_44BE5F,sub_459317,sub_4518D6,sub_44C104,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'hdb', 'v2': 'err', 'sub_44B815': 'tchdbtrancommit', 'sub_4592A0': 'tchdblockmethod', 'sub_44BE5F': 'tchdbsetecode', 'sub_459317': 'tchdbunlockmethod', 'sub_4518D6': 'tchdbflushdrp', 'sub_44C104': 'tchdbmemsync'}"}
finish
ec69b678fc63e48b3082d592dcf5f03de378e586462605581c2bf735ad3b9e6d
dgibson
iputils
NA
void finish(void) { struct timeval tv = cur_time; char *comma = ""; tvsub(&tv, &start_time); putchar('\n'); fflush(stdout); printf("--- %s ping statistics ---\n", hostname); printf("%ld packets transmitted, ", ntransmitted); printf("%ld received", nreceived); if (nrepeats) printf(", +%ld duplicates", nrepeats); if (nchecksum) printf(", +%ld corrupted", nchecksum); if (nerrors) printf(", +%ld errors", nerrors); if (ntransmitted) { printf(", %d%% packet loss", (int) ((((long long)(ntransmitted - nreceived)) * 100) / ntransmitted)); printf(", time %ldms", 1000*tv.tv_sec+tv.tv_usec/1000); } putchar('\n'); if (nreceived && timing) { long tmdev; tsum /= nreceived + nrepeats; tsum2 /= nreceived + nrepeats; tmdev = llsqrt(tsum2 - tsum * tsum); printf("rtt min/avg/max/mdev = %ld.%03ld/%lu.%03ld/%ld.%03ld/%ld.%03ld ms", (long)tmin/1000, (long)tmin%1000, (unsigned long)(tsum/1000), (long)(tsum%1000), (long)tmax/1000, (long)tmax%1000, (long)tmdev/1000, (long)tmdev%1000 ); comma = ", "; } if (pipesize > 1) { printf("%spipe %d", comma, pipesize); comma = ", "; } if (nreceived && (!interval || (options&(F_FLOOD|F_ADAPTIVE))) && ntransmitted > 1) { int ipg = (1000000*(long long)tv.tv_sec+tv.tv_usec)/(ntransmitted-1); printf("%sipg/ewma %d.%03d/%d.%03d ms", comma, ipg/1000, ipg%1000, rtt/8000, (rtt/8)%1000); } putchar('\n'); exit(!nreceived || (deadline && nreceived < npackets)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4075C5", "function_addr": 4224453, "binary_name": "ec69b678fc63e48b3082d592dcf5f03de378e586462605581c2bf735ad3b9e6d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 38h"], [4, "mov rax, cs:tv.tv_sec"], [5, "mov rdx, cs:tv.tv_usec"], [6, "mov [rbp+var_40], rax"], [7, "mov [rbp+var_38], rdx"], [8, "mov [rbp+var_18], offset unk_4095F3"], [9, "lea rax, [rbp+var_40]"], [10, "mov esi, offset stru_41E5E0"], [11, "mov rdi, rax"], [12, "call sub_405291"], [13, "mov edi, 0Ah"], [14, "call _putchar"], [15, "mov rax, cs:stdout"], [16, "mov rdi, rax"], [17, "call _fflush"], [18, "mov rax, cs:qword_41E708"], [19, "mov rsi, rax"], [20, "mov edi, offset aSPingStatistic"], [21, "mov eax, 0"], [22, "call _printf"], [23, "mov rax, cs:qword_41E5B8"], [24, "mov rsi, rax"], [25, "mov edi, offset aLdPacketsTrans"], [26, "mov eax, 0"], [27, "call _printf"], [28, "mov rax, cs:qword_41E5A8"], [29, "mov rsi, rax"], [30, "mov edi, offset aLdReceived"], [31, "mov eax, 0"], [32, "call _printf"], [33, "mov rax, cs:qword_41E5B0"], [34, "test rax, rax"], [35, "jz short loc_407686"], [36, "mov rax, cs:qword_41E5B0"], [37, "mov rsi, rax"], [38, "mov edi, offset aLdDuplicates"], [39, "mov eax, 0"], [40, "call _printf"], [41, "mov rax, cs:qword_41E5C0"], [42, "test rax, rax"], [43, "jz short loc_4076AB"], [44, "mov rax, cs:qword_41E5C0"], [45, "mov rsi, rax"], [46, "mov edi, offset aLdCorrupted"], [47, "mov eax, 0"], [48, "call _printf"], [49, "mov rax, cs:qword_41E5C8"], [50, "test rax, rax"], [51, "jz short loc_4076D0"], [52, "mov rax, cs:qword_41E5C8"], [53, "mov rsi, rax"], [54, "mov edi, offset aLdErrors"], [55, "mov eax, 0"], [56, "call _printf"], [57, "mov rax, cs:qword_41E5B8"], [58, "test rax, rax"], [59, "jz loc_40776F"], [60, "mov rax, cs:qword_41E5B8"], [61, "mov rcx, cs:qword_41E5A8"], [62, "sub rax, rcx"], [63, "mov rdx, rax"], [64, "mov rax, rdx"], [65, "shl rax, 2"], [66, "add rax, rdx"], [67, "lea rdx, ds:0[rax*4]"], [68, "add rax, rdx"], [69, "shl rax, 2"], [70, "mov rbx, cs:qword_41E5B8"], [71, "cqo"], [72, "idiv rbx"], [73, "mov esi, eax"], [74, "mov edi, offset aDPacketLoss"], [75, "mov eax, 0"], [76, "call _printf"], [77, "mov rax, [rbp+var_40]"], [78, "imul rsi, rax, 3E8h"], [79, "mov rcx, [rbp+var_38]"], [80, "mov rdx, 20C49BA5E353F7CFh"], [81, "mov rax, rcx"], [82, "imul rdx"], [83, "mov rax, rdx"], [84, "sar rax, 7"], [85, "sar rcx, 3Fh"], [86, "mov rdx, rcx"], [87, "sub rax, rdx"], [88, "add rax, rsi"], [89, "mov rsi, rax"], [90, "mov edi, offset aTimeLdms"], [91, "mov eax, 0"], [92, "call _printf"], [93, "mov edi, 0Ah"], [94, "call _putchar"], [95, "mov rax, cs:qword_41E5A8"], [96, "test rax, rax"], [97, "jz loc_4079BE"], [98, "mov eax, cs:dword_41E6EC"], [99, "test eax, eax"], [100, "jz loc_4079BE"], [101, "mov rax, cs:qword_41E6F8"], [102, "mov rcx, cs:qword_41E5A8"], [103, "mov rdx, cs:qword_41E5B0"], [104, "lea rbx, [rdx+rcx]"], [105, "cqo"], [106, "idiv rbx"], [107, "mov cs:qword_41E6F8, rax"], [108, "mov rax, cs:qword_41E700"], [109, "mov rcx, cs:qword_41E5A8"], [110, "mov rdx, cs:qword_41E5B0"], [111, "lea rbx, [rdx+rcx]"], [112, "cqo"], [113, "idiv rbx"], [114, "mov cs:qword_41E700, rax"], [115, "mov rax, cs:qword_41E700"], [116, "mov rcx, cs:qword_41E6F8"], [117, "mov rdx, cs:qword_41E6F8"], [118, "imul rdx, rcx"], [119, "sub rax, rdx"], [120, "mov rdi, rax"], [121, "call sub_407561"], [122, "mov [rbp+var_20], rax"], [123, "mov rcx, [rbp+var_20]"], [124, "mov rdx, 20C49BA5E353F7CFh"], [125, "mov rax, rcx"], [126, "imul rdx"], [127, "mov rax, rdx"], [128, "sar rax, 7"], [129, "mov rdx, rcx"], [130, "sar rdx, 3Fh"], [131, "sub rax, rdx"], [132, "mov rdi, rax"], [133, "imul rax, rdi, 3E8h"], [134, "mov rdi, rcx"], [135, "sub rdi, rax"], [136, "mov rcx, [rbp+var_20]"], [137, "mov rdx, 20C49BA5E353F7CFh"], [138, "mov rax, rcx"], [139, "imul rdx"], [140, "mov rax, rdx"], [141, "sar rax, 7"], [142, "sar rcx, 3Fh"], [143, "mov rdx, rcx"], [144, "sub rax, rdx"], [145, "mov r9, rax"], [146, "mov rsi, cs:qword_41E6F0"], [147, "mov rdx, 20C49BA5E353F7CFh"], [148, "mov rax, rsi"], [149, "imul rdx"], [150, "mov rax, rdx"], [151, "sar rax, 7"], [152, "mov rdx, rsi"], [153, "sar rdx, 3Fh"], [154, "sub rax, rdx"], [155, "mov rcx, rax"], [156, "imul rax, rcx, 3E8h"], [157, "mov rcx, rsi"], [158, "sub rcx, rax"], [159, "mov rsi, cs:qword_41E6F0"], [160, "mov rdx, 20C49BA5E353F7CFh"], [161, "mov rax, rsi"], [162, "imul rdx"], [163, "mov rax, rdx"], [164, "sar rax, 7"], [165, "sar rsi, 3Fh"], [166, "mov rdx, rsi"], [167, "sub rax, rdx"], [168, "mov r11, rax"], [169, "mov rsi, cs:qword_41E6F8"], [170, "mov rdx, 20C49BA5E353F7CFh"], [171, "mov rax, rsi"], [172, "imul rdx"], [173, "mov rax, rdx"], [174, "sar rax, 7"], [175, "mov rdx, rsi"], [176, "sar rdx, 3Fh"], [177, "sub rax, rdx"], [178, "mov r10, rax"], [179, "imul rax, r10, 3E8h"], [180, "sub rsi, rax"], [181, "mov r10, rsi"], [182, "mov rsi, cs:qword_41E6F8"], [183, "mov rdx, 20C49BA5E353F7CFh"], [184, "mov rax, rsi"], [185, "imul rdx"], [186, "mov rax, rdx"], [187, "sar rax, 7"], [188, "sar rsi, 3Fh"], [189, "mov rdx, rsi"], [190, "sub rax, rdx"], [191, "mov rbx, rax"], [192, "mov r8, cs:qword_40B408"], [193, "mov rdx, 20C49BA5E353F7CFh"], [194, "mov rax, r8"], [195, "imul rdx"], [196, "mov rax, rdx"], [197, "sar rax, 7"], [198, "mov rdx, r8"], [199, "sar rdx, 3Fh"], [200, "sub rax, rdx"], [201, "mov rsi, rax"], [202, "imul rax, rsi, 3E8h"], [203, "mov rsi, r8"], [204, "sub rsi, rax"], [205, "mov r8, cs:qword_40B408"], [206, "mov rdx, 20C49BA5E353F7CFh"], [207, "mov rax, r8"], [208, "imul rdx"], [209, "mov rax, rdx"], [210, "sar rax, 7"], [211, "mov rdx, r8"], [212, "sar rdx, 3Fh"], [213, "sub rax, rdx"], [214, "sub rsp, 8"], [215, "push rdi"], [216, "push r9"], [217, "push rcx"], [218, "mov r9, r11"], [219, "mov r8, r10"], [220, "mov rcx, rbx"], [221, "mov rdx, rsi"], [222, "mov rsi, rax"], [223, "mov edi, offset aRttMinAvgMaxMd"], [224, "mov eax, 0"], [225, "call _printf"], [226, "add rsp, 20h"], [227, "mov [rbp+var_18], offset asc_4096CA"], [228, "mov eax, cs:dword_40B410"], [229, "cmp eax, 1"], [230, "jle short loc_4079ED"], [231, "mov edx, cs:dword_40B410"], [232, "mov rax, [rbp+var_18]"], [233, "mov rsi, rax"], [234, "mov edi, offset aSpipeD"], [235, "mov eax, 0"], [236, "call _printf"], [237, "mov [rbp+var_18], offset asc_4096CA"], [238, "mov rax, cs:qword_41E5A8"], [239, "test rax, rax"], [240, "jz loc_407B02"], [241, "mov eax, cs:dword_40B3FC"], [242, "test eax, eax"], [243, "jz short loc_407A1A"], [244, "mov eax, cs:dword_41C580"], [245, "and eax, 4001h"], [246, "test eax, eax"], [247, "jz loc_407B02"], [248, "mov rax, cs:qword_41E5B8"], [249, "cmp rax, 1"], [250, "jle loc_407B02"], [251, "mov rax, [rbp+var_40]"], [252, "imul rdx, rax, 0F4240h"], [253, "mov rax, [rbp+var_38]"], [254, "add rax, rdx"], [255, "mov rdx, cs:qword_41E5B8"], [256, "lea rbx, [rdx-1]"], [257, "cqo"], [258, "idiv rbx"], [259, "mov [rbp+var_24], eax"], [260, "mov eax, cs:dword_41C590"], [261, "lea edx, [rax+7]"], [262, "test eax, eax"], [263, "cmovs eax, edx"], [264, "sar eax, 3"], [265, "movsxd rdx, eax"], [266, "imul rdx, 10624DD3h"], [267, "shr rdx, 20h"], [268, "sar edx, 6"], [269, "mov esi, eax"], [270, "sar esi, 1Fh"], [271, "mov ecx, edx"], [272, "sub ecx, esi"], [273, "imul edx, ecx, 3E8h"], [274, "sub eax, edx"], [275, "mov ecx, eax"], [276, "mov eax, cs:dword_41C590"], [277, "movsxd rdx, eax"], [278, "imul rdx, 10624DD3h"], [279, "shr rdx, 20h"], [280, "sar edx, 9"], [281, "sar eax, 1Fh"], [282, "mov edi, edx"], [283, "sub edi, eax"], [284, "mov edx, [rbp+var_24]"], [285, "movsxd rax, edx"], [286, "imul rax, 10624DD3h"], [287, "shr rax, 20h"], [288, "sar eax, 6"], [289, "mov esi, edx"], [290, "sar esi, 1Fh"], [291, "sub eax, esi"], [292, "imul esi, eax, 3E8h"], [293, "mov eax, edx"], [294, "sub eax, esi"], [295, "mov edx, [rbp+var_24]"], [296, "movsxd rsi, edx"], [297, "imul rsi, 10624DD3h"], [298, "shr rsi, 20h"], [299, "sar esi, 6"], [300, "sar edx, 1Fh"], [301, "mov r8d, edx"], [302, "sub esi, r8d"], [303, "mov edx, esi"], [304, "mov rsi, [rbp+var_18]"], [305, "mov r9d, ecx"], [306, "mov r8d, edi"], [307, "mov ecx, eax"], [308, "mov edi, offset aSipgEwmaD03dD0"], [309, "mov eax, 0"], [310, "call _printf"], [311, "mov edi, 0Ah"], [312, "call _putchar"], [313, "mov rax, cs:qword_41E5A8"], [314, "test rax, rax"], [315, "jz short loc_407B35"], [316, "mov eax, cs:dword_41E5D4"], [317, "test eax, eax"], [318, "jz short loc_407B3C"], [319, "mov rdx, cs:qword_41E5A8"], [320, "mov rax, cs:qword_41E5A0"], [321, "cmp rdx, rax"], [322, "jge short loc_407B3C"], [323, "mov eax, 1"], [324, "jmp short loc_407B41"], [325, "mov eax, 0"], [326, "mov edi, eax"], [327, "call _exit"]], "data_dep": [[6, 4], [7, 5], [9, 4], [9, 6], [11, 9], [16, 15], [19, 18], [24, 23], [29, 28], [34, 33], [35, 34], [37, 36], [42, 41], [43, 42], [45, 44], [50, 49], [51, 50], [53, 52], [58, 57], [59, 58], [62, 60], [62, 61], [63, 62], [64, 63], [65, 64], [66, 63], [66, 65], [67, 63], [68, 66], [68, 67], [69, 68], [72, 70], [73, 69], [77, 6], [78, 77], [78, 73], [79, 7], [81, 79], [82, 80], [83, 82], [84, 83], [85, 79], [86, 85], [87, 84], [87, 86], [88, 78], [88, 87], [89, 88], [96, 95], [97, 96], [99, 98], [100, 99], [104, 72], [104, 102], [106, 104], [107, 101], [111, 109], [111, 106], [113, 111], [114, 108], [115, 114], [116, 107], [117, 107], [118, 117], [118, 116], [119, 118], [119, 115], [120, 119], [122, 121], [123, 122], [125, 123], [126, 124], [127, 126], [128, 127], [129, 123], [130, 129], [131, 128], [131, 130], [132, 131], [133, 132], [133, 131], [134, 123], [135, 133], [135, 134], [136, 122], [138, 136], [139, 137], [140, 139], [141, 140], [142, 136], [143, 142], [144, 141], [144, 143], [145, 144], [148, 146], [149, 147], [150, 149], [151, 150], [152, 146], [153, 152], [154, 151], [154, 153], [155, 154], [156, 154], [156, 155], [157, 146], [158, 156], [158, 157], [161, 159], [162, 160], [163, 162], [164, 163], [165, 159], [166, 165], [167, 164], [167, 166], [168, 167], [169, 107], [171, 169], [172, 170], [173, 172], [174, 173], [175, 169], [176, 175], [177, 174], [177, 176], [178, 177], [179, 178], [179, 177], [180, 179], [180, 169], [181, 180], [182, 107], [184, 182], [185, 183], [186, 185], [187, 186], [188, 182], [189, 188], [190, 187], [190, 189], [191, 190], [194, 192], [195, 193], [196, 195], [197, 196], [198, 192], [199, 198], [200, 197], [200, 199], [201, 200], [202, 200], [202, 201], [203, 192], [204, 203], [204, 202], [207, 205], [208, 206], [209, 208], [210, 209], [211, 205], [212, 211], [213, 210], [213, 212], [214, 3], [215, 135], [216, 145], [217, 158], [218, 168], [219, 181], [220, 191], [221, 204], [222, 213], [226, 214], [229, 228], [230, 229], [232, 8], [232, 227], [233, 232], [239, 238], [240, 239], [242, 241], [243, 242], [245, 244], [246, 245], [247, 246], [249, 248], [250, 249], [251, 6], [252, 5], [252, 231], [252, 251], [252, 221], [252, 86], [253, 7], [254, 252], [254, 253], [256, 255], [256, 191], [256, 72], [258, 256], [259, 254], [261, 255], [261, 260], [262, 260], [263, 262], [263, 261], [264, 263], [265, 264], [266, 265], [267, 266], [268, 267], [269, 264], [270, 269], [271, 268], [272, 271], [272, 270], [273, 268], [273, 272], [274, 264], [274, 273], [275, 274], [277, 276], [278, 277], [279, 278], [280, 279], [281, 276], [282, 280], [283, 281], [283, 282], [284, 259], [285, 284], [286, 285], [287, 286], [288, 287], [289, 284], [290, 289], [291, 288], [291, 290], [292, 291], [292, 290], [293, 284], [294, 293], [294, 292], [295, 259], [296, 295], [297, 296], [298, 297], [299, 298], [300, 295], [301, 300], [302, 299], [302, 301], [303, 302], [304, 237], [304, 8], [304, 227], [305, 275], [306, 283], [307, 294], [314, 313], [315, 314], [317, 316], [318, 317], [321, 320], [321, 319], [322, 321], [326, 323], [326, 325]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/ec69b678fc63e48b3082d592dcf5f03de378e586462605581c2bf735ad3b9e6d_ec69b678fc63e48b3082d592dcf5f03de378e586462605581c2bf735ad3b9e6d.jsonl.gz", "strip_func_name": "sub_4075C5", "query": "\n\n\nvoid __noreturn sub_4075C5()\n{\nint v0; // eax\nstruct timeval v1; // [rsp+0h] [rbp-40h] BYREF\nint v2; // [rsp+1Ch] [rbp-24h]\n__int64 v3; // [rsp+20h] [rbp-20h]\nconst char *v4; // [rsp+28h] [rbp-18h]\n\nv1 = tv;\nv4 = (const char *)&unk_4095F3;\nsub_405291(&v1, &stru_41E5E0);\nputchar(10);\nfflush(stdout);\nprintf(\"--- %s ping statistics ---\\n\", (const char *)qword_41E708);\nprintf(\"%ld packets transmitted, \", qword_41E5B8);\nprintf(\"%ld received\", qword_41E5A8);\nif ( qword_41E5B0 )\nprintf(\", +%ld duplicates\", qword_41E5B0);\nif ( qword_41E5C0 )\nprintf(\", +%ld corrupted\", qword_41E5C0);\nif ( qword_41E5C8 )\nprintf(\", +%ld errors\", qword_41E5C8);\nif ( qword_41E5B8 )\n{\nprintf(\", %d%% packet loss\", (unsigned int)(100 * (qword_41E5B8 - qword_41E5A8) / qword_41E5B8));\nprintf(\", time %ldms\", 1000 * v1.tv_sec + v1.tv_usec / 1000);\n}\nputchar(10);\nif ( qword_41E5A8 && dword_41E6EC )\n{\nqword_41E6F8 /= qword_41E5B0 + qword_41E5A8;\nqword_41E700 /= qword_41E5B0 + qword_41E5A8;\nv3 = sub_407561(qword_41E700 - qword_41E6F8 * qword_41E6F8);\nprintf(\n\"rtt min/avg/max/mdev = %ld.%03ld/%lu.%03ld/%ld.%03ld/%ld.%03ld ms\",\nqword_40B408 / 1000,\nqword_40B408 % 1000,\nqword_41E6F8 / 1000,\nqword_41E6F8 % 1000,\nqword_41E6F0 / 1000,\nqword_41E6F0 % 1000,\nv3 / 1000,\nv3 % 1000);\nv4 = \", \";\n}\nif ( dword_40B410 > 1 )\n{\nprintf(\"%spipe %d\", v4, (unsigned int)dword_40B410);\nv4 = \", \";\n}\nif ( qword_41E5A8 && (!dword_40B3FC || (dword_41C580 & 0x4001) != 0) && qword_41E5B8 > 1 )\n{\nv2 = (1000000 * v1.tv_sec + v1.tv_usec) / (qword_41E5B8 - 1);\nprintf(\n\"%sipg/ewma %d.%03d/%d.%03d ms\",\nv4,\n(unsigned int)(v2 / 1000),\n(unsigned int)(v2 % 1000),\n(unsigned int)(dword_41C590 / 8000),\n(unsigned int)(dword_41C590 / 8 % 1000));\n}\nputchar(10);\nv0 = !qword_41E5A8 || dword_41E5D4 && qword_41E5A8 < qword_41E5A0;\nexit(v0);\n}\n\n\n\nQ:[v1,v2,v3,v4,sub_4075C5,sub_405291,sub_407561,]\nAssistant: ", "hints": "[]", "response": "{'v1': 'tv', 'v2': 'ipg', 'v3': 'tmdev', 'v4': 'comma', 'sub_4075C5': 'finish', 'sub_405291': 'tvsub', 'sub_407561': 'llsqrt'}"}
btf_equal_common
754893a25b4b87819d18c7ee6b52c6c20f23fe536c4bd2569813da3e47f0f46d
sonyxperiadev
kernel
NA
static bool btf_equal_common(struct btf_type *t1, struct btf_type *t2) { return t1->name_off == t2->name_off && t1->info == t2->info && t1->size == t2->size; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41635A", "function_addr": 4285274, "binary_name": "754893a25b4b87819d18c7ee6b52c6c20f23fe536c4bd2569813da3e47f0f46d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_10], rsi"], [4, "mov rax, [rbp+var_8]"], [5, "mov edx, [rax]"], [6, "mov rax, [rbp+var_10]"], [7, "mov eax, [rax]"], [8, "cmp edx, eax"], [9, "jnz short loc_4163A1"], [10, "mov rax, [rbp+var_8]"], [11, "mov edx, [rax+4]"], [12, "mov rax, [rbp+var_10]"], [13, "mov eax, [rax+4]"], [14, "cmp edx, eax"], [15, "jnz short loc_4163A1"], [16, "mov rax, [rbp+var_8]"], [17, "mov edx, [rax+8]"], [18, "mov rax, [rbp+var_10]"], [19, "mov eax, [rax+8]"], [20, "cmp edx, eax"], [21, "jnz short loc_4163A1"], [22, "mov eax, 1"], [23, "jmp short loc_4163A6"], [24, "mov eax, 0"], [25, "and eax, 1"], [26, "pop rbp"], [27, "retn"]], "data_dep": [[4, 2], [5, 4], [6, 3], [7, 6], [8, 5], [8, 7], [9, 8], [10, 2], [11, 10], [12, 3], [13, 12], [14, 13], [14, 11], [15, 14], [16, 2], [17, 16], [18, 3], [19, 18], [20, 17], [20, 19], [21, 20], [25, 22], [25, 24], [26, 0], [27, 25]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/754893a25b4b87819d18c7ee6b52c6c20f23fe536c4bd2569813da3e47f0f46d_754893a25b4b87819d18c7ee6b52c6c20f23fe536c4bd2569813da3e47f0f46d.jsonl.gz", "strip_func_name": "sub_41635A", "query": "\n\n\n_BOOL8 __fastcall sub_41635A(_DWORD *a1, _DWORD *a2)\n{\nreturn *a1 == *a2 && a1[1] == a2[1] && a1[2] == a2[2];\n}\n\n\n\nQ:[a1,a2,sub_41635A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 't1', 'a2': 't2', 'sub_41635A': 'btf_equal_common'}"}
u8g2_Setup_uc1608_240x128_f
f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4
olikraus
u8g2
NA
void u8g2_Setup_uc1608_240x128_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) { uint8_t tile_buf_height; uint8_t *buf; u8g2_SetupDisplay(u8g2, u8x8_d_uc1608_240x128, u8x8_cad_001, byte_cb, gpio_and_delay_cb); buf = u8g2_m_30_16_f(&tile_buf_height); u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_416C4E", "function_addr": 4287566, "binary_name": "f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4.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 rcx, [rbp+var_30]"], [8, "mov rdx, [rbp+var_28]"], [9, "mov rax, [rbp+var_18]"], [10, "mov r8, rcx"], [11, "mov rcx, rdx"], [12, "mov edx, offset sub_42561B"], [13, "mov esi, offset sub_407D98"], [14, "mov rdi, rax"], [15, "call sub_40843C"], [16, "lea rax, [rbp+var_9]"], [17, "mov rdi, rax"], [18, "call sub_404B70"], [19, "mov [rbp+var_8], rax"], [20, "movzx eax, [rbp+var_9]"], [21, "movzx edx, al"], [22, "mov rcx, [rbp+var_20]"], [23, "mov rsi, [rbp+var_8]"], [24, "mov rax, [rbp+var_18]"], [25, "mov r8, rcx"], [26, "mov ecx, offset sub_402AE9"], [27, "mov rdi, rax"], [28, "call sub_4324C6"], [29, "nop"], [30, "leave"], [31, "retn"]], "data_dep": [[7, 6], [8, 5], [9, 3], [10, 7], [11, 8], [14, 9], [16, 15], [17, 16], [19, 18], [21, 20], [22, 4], [23, 19], [24, 3], [25, 22], [27, 24], [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/f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4_f223df43e71fd244b2d3fc8309aa4a9e557a38d76ce9c8ff7a1df98b1c82c5e4.jsonl.gz", "strip_func_name": "sub_416C4E", "query": "\n\n\n__int64 __fastcall sub_416C4E(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4)\n{\nunsigned __int8 v5; // [rsp+27h] [rbp-9h] BYREF\nvoid *v6; // [rsp+28h] [rbp-8h]\n\nsub_40843C(a1, (__int64)sub_407D98, (__int64)sub_42561B, a3, a4);\nv6 = sub_404B70(&v5);\nreturn sub_4324C6(a1, v6, v5, sub_402AE9, a2);\n}\n\n\n\nQ:[a3,a4,a1,a2,v5,v6,sub_416C4E,sub_40843C,sub_407D98,sub_42561B,sub_404B70,sub_4324C6,sub_402AE9,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'byte_cb', 'a4': 'gpio_and_delay_cb', 'a1': 'u8g2', 'a2': 'rotation', 'v5': 'tile_buf_height', 'v6': 'buf', 'sub_416C4E': 'u8g2_Setup_uc1608_240x128_f', 'sub_40843C': 'u8x8_Setup', 'sub_407D98': 'u8x8_d_uc1608_240x128', 'sub_42561B': 'u8x8_cad_001', 'sub_404B70': 'u8g2_m_30_16_f', 'sub_4324C6': 'u8g2_SetupBuffer', 'sub_402AE9': 'u8g2_ll_hvline_vertical_top_lsb'}"}
remark_cmd
c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad
open-simh
simh
NA
void remark_cmd (char *remark) {sim_printf("%s\n", remark);}
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40F4B1", "function_addr": 4256945, "binary_name": "c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad.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 rsi, rax"], [6, "mov edi, offset unk_49583B"], [7, "mov eax, 0"], [8, "call sub_438107"], [9, "nop"], [10, "leave"], [11, "retn"]], "data_dep": [[4, 3], [5, 4], [11, 8]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad_c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad.jsonl.gz", "strip_func_name": "sub_40F4B1", "query": "\n\n\n__int64 __fastcall sub_40F4B1(int a1, __int64 a2, int a3, int a4, int a5, int a6)\n{\nreturn sub_438107((unsigned int)&unk_49583B, a1, a3, a4, a5, a6);\n}\n\n\n\nQ:[a1,sub_40F4B1,sub_438107,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'remark', 'sub_40F4B1': 'remark_cmd', 'sub_438107': 'sim_printf'}"}
mp3_buffer_finished
0e38df53f7f5104321d5e3c89a3594d086d01dbf39606a931eb978c1f5f2a365
arduino
linino
NA
unsigned char mp3_buffer_finished(void){ return ioctl(mp3_fd, IOCTL_MP3_END_REACHED, 0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404073", "function_addr": 4210803, "binary_name": "0e38df53f7f5104321d5e3c89a3594d086d01dbf39606a931eb978c1f5f2a365.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, cs:fd"], [3, "mov edx, 0"], [4, "mov esi, 9"], [5, "mov edi, eax"], [6, "mov eax, 0"], [7, "call _ioctl"], [8, "pop rbp"], [9, "retn"]], "data_dep": [[5, 2], [8, 0], [9, 7]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0e38df53f7f5104321d5e3c89a3594d086d01dbf39606a931eb978c1f5f2a365_0e38df53f7f5104321d5e3c89a3594d086d01dbf39606a931eb978c1f5f2a365.jsonl.gz", "strip_func_name": "sub_404073", "query": "\n\n\nint sub_404073()\n{\nreturn ioctl(fd, 9uLL, 0LL);\n}\n\n\n\nQ:[sub_404073,]\nAssistant: ", "hints": "[]", "response": "{'sub_404073': 'mp3_buffer_finished'}"}
write_data
a3bb29302dcbadc3cc646d325f886c48f3a9739c79ada54a6dd32b27a3225533
syzygy1
tb
NA
void write_data(FILE *F, uint8_t *src, uint64_t offset, uint64_t size, uint8_t *v) { init(); cmprs_F = F; cmprs_ptr = src; cmprs_size = offset + size; cmprs_v = v; cmprs_idx = offset; run_compression(write_data_worker); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41556A", "function_addr": 4281706, "binary_name": "a3bb29302dcbadc3cc646d325f886c48f3a9739c79ada54a6dd32b27a3225533.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov [rbp+var_20], rcx"], [7, "mov [rbp+var_28], r8"], [8, "call sub_41515A"], [9, "mov rax, [rbp+var_8]"], [10, "mov cs:qword_5BD188, rax"], [11, "mov rax, [rbp+var_10]"], [12, "mov cs:qword_5BD190, rax"], [13, "mov rdx, [rbp+var_18]"], [14, "mov rax, [rbp+var_20]"], [15, "add rax, rdx"], [16, "mov cs:qword_5BD198, rax"], [17, "mov rax, [rbp+var_28]"], [18, "mov cs:qword_5BD1A0, rax"], [19, "mov rax, [rbp+var_18]"], [20, "mov cs:qword_5BD1A8, rax"], [21, "mov edi, offset sub_4153EF"], [22, "call sub_411F18"], [23, "nop"], [24, "leave"], [25, "retn"]], "data_dep": [[9, 3], [10, 9], [11, 4], [12, 11], [13, 5], [14, 6], [15, 14], [15, 13], [16, 15], [17, 7], [18, 17], [19, 5], [20, 19], [25, 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/a3bb29302dcbadc3cc646d325f886c48f3a9739c79ada54a6dd32b27a3225533_a3bb29302dcbadc3cc646d325f886c48f3a9739c79ada54a6dd32b27a3225533.jsonl.gz", "strip_func_name": "sub_41556A", "query": "\n\n\nvoid *__fastcall sub_41556A(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5)\n{\nsub_41515A();\nqword_5BD188 = a1;\nqword_5BD190 = a2;\nqword_5BD198 = a3 + a4;\nqword_5BD1A0 = a5;\nqword_5BD1A8 = a3;\nreturn sub_411F18((__int64 (__fastcall *)(_QWORD))sub_4153EF);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,sub_41556A,sub_41515A,sub_411F18,sub_4153EF,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'offset', 'a4': 'size', 'a1': 'F', 'a2': 'src', 'a5': 'v', 'sub_41556A': 'write_data', 'sub_41515A': 'init', 'sub_411F18': 'run_compression', 'sub_4153EF': 'write_data_worker'}"}
ShiftMix
9e5ed998603d4a4bec6a0155dac36698df46b941b6fa147e44fcff659a57d6e8
syzygy1
tb
NA
static uint64_t ShiftMix(uint64_t val) { return val ^ (val >> 47); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42F589", "function_addr": 4388233, "binary_name": "9e5ed998603d4a4bec6a0155dac36698df46b941b6fa147e44fcff659a57d6e8.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, "shr rax, 2Fh"], [5, "xor rax, [rbp+var_8]"], [6, "pop rbp"], [7, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [5, 2], [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/9e5ed998603d4a4bec6a0155dac36698df46b941b6fa147e44fcff659a57d6e8_9e5ed998603d4a4bec6a0155dac36698df46b941b6fa147e44fcff659a57d6e8.jsonl.gz", "strip_func_name": "sub_42F589", "query": "\n\n\nunsigned __int64 __fastcall sub_42F589(unsigned __int64 a1)\n{\nreturn a1 ^ (a1 >> 47);\n}\n\n\n\nQ:[a1,sub_42F589,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'val', 'sub_42F589': 'ShiftMix'}"}
uf_str_len
6777466a820da13d1d4919f3fb1a3b4931863ac576dbf701d94d529128065ae6
QuentinPerez
42-toolkit
NA
size_t uf_str_len(const char *str) { size_t len; len = 0; if (str == NULL) return (M_ERROR(0, "Pointer NULL")); while (str[len] != '\0') len = len + 1; return (len); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401574", "function_addr": 4199796, "binary_name": "6777466a820da13d1d4919f3fb1a3b4931863ac576dbf701d94d529128065ae6.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_8], 0"], [5, "cmp [rbp+var_18], 0"], [6, "jnz short loc_4015C3"], [7, "mov edx, offset aUfStrLen"], [8, "mov esi, 27h "], [9, "mov edi, offset aSrcFStrToolsC"], [10, "call sub_40161A"], [11, "movsx eax, al"], [12, "mov edx, offset aPointerNull"], [13, "mov esi, 0"], [14, "mov edi, eax"], [15, "mov eax, 0"], [16, "call sub_4016A4"], [17, "jmp short locret_4015D9"], [18, "add [rbp+var_8], 1"], [19, "mov rdx, [rbp+var_18]"], [20, "mov rax, [rbp+var_8]"], [21, "add rax, rdx"], [22, "movzx eax, byte ptr [rax]"], [23, "test al, al"], [24, "jnz short loc_4015BE"], [25, "mov rax, [rbp+var_8]"], [26, "leave"], [27, "retn"]], "data_dep": [[5, 3], [6, 5], [11, 10], [14, 11], [18, 4], [18, 18], [19, 3], [20, 4], [20, 18], [21, 20], [21, 19], [22, 21], [23, 22], [24, 23], [25, 18], [25, 4], [27, 16], [27, 25]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/6777466a820da13d1d4919f3fb1a3b4931863ac576dbf701d94d529128065ae6_6777466a820da13d1d4919f3fb1a3b4931863ac576dbf701d94d529128065ae6.jsonl.gz", "strip_func_name": "sub_401574", "query": "\n\n\n__int64 __fastcall sub_401574(__int64 a1)\n{\nchar v1; // al\nint v2; // ecx\nint v3; // er8\nint v4; // er9\n__int64 result; // rax\n__int64 v6; // [rsp+18h] [rbp-8h]\n\nv6 = 0LL;\nif ( a1 )\n{\nwhile ( *(_BYTE *)(a1 + v6) )\n++v6;\nresult = v6;\n}\nelse\n{\nv1 = sub_40161A(\"src/f_str_tools.c\", 39LL, \"uf_str_len\");\nresult = sub_4016A4(v1, 0, (unsigned int)\"Pointer NULL\", v2, v3, v4);\n}\nreturn result;\n}\n\n\n\nQ:[a1,v6,sub_401574,sub_40161A,sub_4016A4,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'str', 'v6': 'len', 'sub_401574': 'uf_str_len', 'sub_40161A': 'mf_print_infos', 'sub_4016A4': 'mf_error'}"}
getsym
59d34e8bc5e415dcaab67712ab24c88767734e5a3387c65d896cb0687a64dc65
lkundrak
dev86
NA
PUBLIC void getsym() { register char *reglineptr; reglineptr = lineptr; advance: symname = reglineptr; switch (sym = symofchar[(unsigned char) *reglineptr++]) { case WHITESPACE: goto advance; case ADDOP: if (*reglineptr == '+') { sym = POSTINCOP; ++reglineptr; } break; case BINCONST: numbase = 2; lineptr = reglineptr; intconst(); return; case CHARCONST: if ((number = *reglineptr) < ' ') number = ' '; if (*reglineptr != EOL) ++reglineptr; sym = INTCONST; break; case GREATERTHAN: /* context-sensitive */ if (*reglineptr == '>') { sym = SROP; ++reglineptr; } break; case HEXCONST: numbase = 16; lineptr = reglineptr; intconst(); return; case IDENT: /* walk to end of identifier - magic INTCONST is max of INT, IDENT */ while (symofchar[(unsigned char) *reglineptr] <= INTCONST) ++reglineptr; lineptr = reglineptr; gsymptr = lookup(); return; case INTCONST: if (*(reglineptr - 1) == '0') { if (*reglineptr != 'x' && *reglineptr != 'X') numbase = 8; else { numbase = 16; ++reglineptr; } } else { --reglineptr; numbase = 10; } lineptr = reglineptr; intconst(); return; case LESSTHAN: /* context-sensitive */ if (*reglineptr == '<') { sym = SLOP; ++reglineptr; } break; case SUBOP: if (*reglineptr == '-') { sym = PREDECOP; ++reglineptr; } break; } lineptr = reglineptr; return; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40AFFD", "function_addr": 4239357, "binary_name": "59d34e8bc5e415dcaab67712ab24c88767734e5a3387c65d896cb0687a64dc65.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 8"], [4, "mov rbx, cs:qword_416A60"], [5, "mov cs:s1, rbx"], [6, "mov rax, rbx"], [7, "lea rbx, [rax+1]"], [8, "movzx eax, byte ptr [rax]"], [9, "movzx eax, al"], [10, "cdqe"], [11, "movzx eax, byte_412E20[rax]"], [12, "mov cs:byte_416A79, al"], [13, "movzx eax, cs:byte_416A79"], [14, "movsx eax, al"], [15, "cmp eax, 9"], [16, "ja def_40B04D"], [17, "mov eax, eax"], [18, "mov rax, ds:jpt_40B04D[rax*8]"], [19, "jmp rax"], [20, "movzx eax, byte ptr [rbx]"], [21, "cmp al, 2Bh "], [22, "jnz loc_40B1A0"], [23, "mov cs:byte_416A79, 16h"], [24, "add rbx, 1"], [25, "jmp loc_40B1A0"], [26, "mov cs:dword_416A88, 2"], [27, "mov cs:qword_416A60, rbx"], [28, "call sub_40B1E3"], [29, "jmp loc_40B1B2"], [30, "movzx eax, byte ptr [rbx]"], [31, "movsx rax, al"], [32, "mov cs:qword_416A68, rax"], [33, "mov rax, cs:qword_416A68"], [34, "cmp rax, 1Fh"], [35, "ja short loc_40B0AB"], [36, "mov cs:qword_416A68, 20h "], [37, "movzx eax, byte ptr [rbx]"], [38, "test al, al"], [39, "jz short loc_40B0B6"], [40, "add rbx, 1"], [41, "mov cs:byte_416A79, 1"], [42, "jmp def_40B04D"], [43, "movzx eax, byte ptr [rbx]"], [44, "cmp al, 3Eh "], [45, "jnz loc_40B1A3"], [46, "mov cs:byte_416A79, 1Ch"], [47, "add rbx, 1"], [48, "jmp loc_40B1A3"], [49, "mov cs:dword_416A88, 10h"], [50, "mov cs:qword_416A60, rbx"], [51, "call sub_40B1E3"], [52, "jmp loc_40B1B2"], [53, "add rbx, 1"], [54, "movzx eax, byte ptr [rbx]"], [55, "movzx eax, al"], [56, "cdqe"], [57, "movzx eax, byte_412E20[rax]"], [58, "cmp al, 1"], [59, "jle short loc_40B0F8"], [60, "mov cs:qword_416A60, rbx"], [61, "call sub_40B53B"], [62, "mov cs:qword_416A50, rax"], [63, "jmp loc_40B1B2"], [64, "lea rax, [rbx-1]"], [65, "movzx eax, byte ptr [rax]"], [66, "cmp al, 30h "], [67, "jnz short loc_40B15C"], [68, "movzx eax, byte ptr [rbx]"], [69, "cmp al, 78h "], [70, "jz short loc_40B14C"], [71, "movzx eax, byte ptr [rbx]"], [72, "cmp al, 58h "], [73, "jz short loc_40B14C"], [74, "mov cs:dword_416A88, 8"], [75, "jmp short loc_40B16A"], [76, "mov cs:dword_416A88, 10h"], [77, "add rbx, 1"], [78, "jmp short loc_40B16A"], [79, "sub rbx, 1"], [80, "mov cs:dword_416A88, 0Ah"], [81, "mov cs:qword_416A60, rbx"], [82, "call sub_40B1E3"], [83, "jmp short loc_40B1B2"], [84, "movzx eax, byte ptr [rbx]"], [85, "cmp al, 3Ch "], [86, "jnz short loc_40B1A6"], [87, "mov cs:byte_416A79, 1Bh"], [88, "add rbx, 1"], [89, "jmp short loc_40B1A6"], [90, "movzx eax, byte ptr [rbx]"], [91, "cmp al, 2Dh "], [92, "jnz short loc_40B1A9"], [93, "mov cs:byte_416A79, 17h"], [94, "add rbx, 1"], [95, "jmp short loc_40B1A9"], [96, "nop"], [97, "jmp short def_40B04D"], [98, "nop"], [99, "jmp short def_40B04D"], [100, "nop"], [101, "jmp short def_40B04D"], [102, "nop"], [103, "mov cs:qword_416A60, rbx"], [104, "nop"], [105, "mov rbx, [rbp+var_8]"], [106, "leave"], [107, "retn"]], "data_dep": [[5, 7], [5, 4], [6, 4], [6, 7], [7, 7], [7, 4], [7, 6], [8, 6], [9, 8], [12, 11], [13, 12], [14, 13], [15, 14], [16, 15], [17, 14], [19, 18], [20, 7], [21, 20], [22, 21], [24, 7], [27, 7], [30, 7], [31, 30], [32, 31], [33, 32], [34, 33], [35, 34], [37, 7], [38, 37], [39, 38], [40, 7], [43, 7], [44, 43], [45, 44], [47, 7], [50, 7], [53, 7], [53, 53], [54, 53], [54, 7], [55, 54], [58, 57], [59, 58], [60, 53], [60, 7], [62, 61], [64, 7], [64, 18], [65, 64], [66, 65], [67, 66], [68, 7], [69, 68], [70, 69], [71, 7], [72, 71], [73, 72], [77, 7], [79, 7], [81, 7], [81, 77], [81, 79], [84, 7], [85, 84], [86, 85], [88, 7], [90, 7], [91, 90], [92, 91], [94, 7], [103, 88], [103, 47], [103, 40], [103, 24], [103, 94], [103, 7], [107, 51], [107, 90], [107, 28], [107, 14], [107, 82], [107, 20], [107, 84], [107, 43], [107, 61], [107, 38]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/59d34e8bc5e415dcaab67712ab24c88767734e5a3387c65d896cb0687a64dc65_59d34e8bc5e415dcaab67712ab24c88767734e5a3387c65d896cb0687a64dc65.jsonl.gz", "strip_func_name": "sub_40AFFD", "query": "\n\n\n__int64 sub_40AFFD()\n{\nchar *v0; // rbx\nchar *v1; // rax\n__int64 result; // rax\n\nv0 = (char *)qword_416A60;\nwhile ( 2 )\n{\ns1 = v0;\nv1 = v0++;\nbyte_416A79 = byte_412E20[(unsigned __int8)*v1];\nresult = (unsigned int)byte_416A79;\nswitch ( byte_416A79 )\n{\ncase 0:\nwhile ( byte_412E20[(unsigned __int8)*v0] <= 1 )\n++v0;\nqword_416A60 = (__int64)v0;\nresult = sub_40B53B();\nqword_416A50 = result;\nreturn result;\ncase 1:\nif ( *(v0 - 1) == 48 )\n{\nif ( *v0 == 120 || *v0 == 88 )\n{\ndword_416A88 = 16;\n++v0;\n}\nelse\n{\ndword_416A88 = 8;\n}\n}\nelse\n{\n--v0;\ndword_416A88 = 10;\n}\nqword_416A60 = (__int64)v0;\nreturn sub_40B1E3();\ncase 2:\nresult = (unsigned __int8)*v0;\nif ( (_BYTE)result == 43 )\n{\nbyte_416A79 = 22;\n++v0;\n}\ngoto LABEL_28;\ncase 3:\ndword_416A88 = 2;\nqword_416A60 = (__int64)v0;\nreturn sub_40B1E3();\ncase 4:\nqword_416A68 = *v0;\nif ( (unsigned __int64)qword_416A68 <= 0x1F )\nqword_416A68 = 32LL;\nresult = (unsigned __int8)*v0;\nif ( (_BYTE)result )\n++v0;\nbyte_416A79 = 1;\ngoto LABEL_28;\ncase 5:\nresult = (unsigned __int8)*v0;\nif ( (_BYTE)result == 62 )\n{\nbyte_416A79 = 28;\n++v0;\n}\ngoto LABEL_28;\ncase 6:\ndword_416A88 = 16;\nqword_416A60 = (__int64)v0;\nreturn sub_40B1E3();\ncase 7:\nresult = (unsigned __int8)*v0;\nif ( (_BYTE)result == 60 )\n{\nbyte_416A79 = 27;\n++v0;\n}\ngoto LABEL_28;\ncase 8:\nresult = (unsigned __int8)*v0;\nif ( (_BYTE)result == 45 )\n{\nbyte_416A79 = 23;\n++v0;\n}\ngoto LABEL_28;\ncase 9:\ncontinue;\ndefault:\nLABEL_28:\nqword_416A60 = (__int64)v0;\nreturn result;\n}\n}\n}\n\n\n\nQ:[sub_40AFFD,sub_40B53B,sub_40B1E3,]\nAssistant: ", "hints": "[]", "response": "{'sub_40AFFD': 'getsym', 'sub_40B53B': 'lookup', 'sub_40B1E3': 'intconst'}"}
print_usage
b9430bc24c7e96f9b08759bb26469bc904d8797355b4a9a298232cd132268934
lh3
partig
NA
static void print_usage(FILE *fp, const pt_pdopt_t *po) { fprintf(stderr, "Usage: partig [options] <in.gfa>\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, " -k INT k-mer size [%d]\n", po->k); fprintf(stderr, " -w INT minimizer window size [%d]\n", po->w); fprintf(stderr, " -c INT max occurrance [%d]\n", po->max_occ); fprintf(stderr, " -m FLOAT mini k-mer similarity [%.3g]\n", po->min_sim); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40C665", "function_addr": 4245093, "binary_name": "b9430bc24c7e96f9b08759bb26469bc904d8797355b4a9a298232cd132268934.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, cs:stderr"], [6, "mov rcx, rax"], [7, "mov edx, 21h "], [8, "mov esi, 1"], [9, "mov edi, offset aUsagePartigOpt"], [10, "call _fwrite"], [11, "mov rax, cs:stderr"], [12, "mov rcx, rax"], [13, "mov edx, 9"], [14, "mov esi, 1"], [15, "mov edi, offset aOptions"], [16, "call _fwrite"], [17, "mov rax, [rbp+var_10]"], [18, "mov edx, [rax]"], [19, "mov rax, cs:stderr"], [20, "mov esi, offset aKIntKMerSizeD"], [21, "mov rdi, rax"], [22, "mov eax, 0"], [23, "call _fprintf"], [24, "mov rax, [rbp+var_10]"], [25, "mov edx, [rax+4]"], [26, "mov rax, cs:stderr"], [27, "mov esi, offset aWIntMinimizerW"], [28, "mov rdi, rax"], [29, "mov eax, 0"], [30, "call _fprintf"], [31, "mov rax, [rbp+var_10]"], [32, "mov edx, [rax+0Ch]"], [33, "mov rax, cs:stderr"], [34, "mov esi, offset aCIntMaxOccurra"], [35, "mov rdi, rax"], [36, "mov eax, 0"], [37, "call _fprintf"], [38, "mov rax, [rbp+var_10]"], [39, "mov rdx, [rax+18h]"], [40, "mov rax, cs:stderr"], [41, "movq xmm0, rdx"], [42, "mov esi, offset aMFloatMiniKMer"], [43, "mov rdi, rax"], [44, "mov eax, 1"], [45, "call _fprintf"], [46, "nop"], [47, "leave"], [48, "retn"]], "data_dep": [[6, 5], [12, 11], [17, 4], [18, 17], [21, 19], [24, 4], [25, 24], [28, 26], [31, 4], [32, 31], [35, 33], [38, 4], [39, 38], [41, 39], [43, 40], [48, 45]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/b9430bc24c7e96f9b08759bb26469bc904d8797355b4a9a298232cd132268934_b9430bc24c7e96f9b08759bb26469bc904d8797355b4a9a298232cd132268934.jsonl.gz", "strip_func_name": "sub_40C665", "query": "\n\n\nint __fastcall sub_40C665(__int64 a1, double *a2)\n{\nfwrite(\"Usage: partig [options] <in.gfa>\\n\", 1uLL, 0x21uLL, stderr);\nfwrite(\"Options:\\n\", 1uLL, 9uLL, stderr);\nfprintf(stderr, \" -k INT k-mer size [%d]\\n\", *(unsigned int *)a2);\nfprintf(stderr, \" -w INT minimizer window size [%d]\\n\", *((unsigned int *)a2 + 1));\nfprintf(stderr, \" -c INT max occurrance [%d]\\n\", *((unsigned int *)a2 + 3));\nreturn fprintf(stderr, \" -m FLOAT mini k-mer similarity [%.3g]\\n\", a2[3]);\n}\n\n\n\nQ:[a2,a1,sub_40C665,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'po', 'a1': 'fp', 'sub_40C665': 'print_usage'}"}
do_file
11d51f39d967e6c925cbbbf561559e32fec33ac3b7a84b8e1e75a62d16d81f0a
sniperHW
chuck
NA
static int do_file(const char *filename, const char *fullpath, enum Hash h) { STACK_OF (X509_INFO) *inf = NULL; X509_INFO *x; X509_NAME *name = NULL; BIO *b; const char *ext; unsigned char digest[EVP_MAX_MD_SIZE]; int type, errs = 0; size_t i; /* Does it end with a recognized extension? */ if ((ext = strrchr(filename, '.')) == NULL) goto end; for (i = 0; i < OSSL_NELEM(extensions); i++) { if (strcasecmp(extensions[i], ext + 1) == 0) break; } if (i >= OSSL_NELEM(extensions)) goto end; /* Does it have X.509 data in it? */ if ((b = BIO_new_file(fullpath, "r")) == NULL) { BIO_printf(bio_err, "%s: skipping %s, cannot open file\n", opt_getprog(), filename); errs++; goto end; } inf = PEM_X509_INFO_read_bio(b, NULL, NULL, NULL); BIO_free(b); if (inf == NULL) goto end; if (sk_X509_INFO_num(inf) != 1) { BIO_printf(bio_err, "%s: skipping %s," "it does not contain exactly one certificate or CRL\n", opt_getprog(), filename); /* This is not an error. */ goto end; } x = sk_X509_INFO_value(inf, 0); if (x->x509) { type = TYPE_CERT; name = X509_get_subject_name(x->x509); X509_digest(x->x509, evpmd, digest, NULL); } else if (x->crl) { type = TYPE_CRL; name = X509_CRL_get_issuer(x->crl); X509_CRL_digest(x->crl, evpmd, digest, NULL); } else { ++errs; goto end; } if (name) { if ((h == HASH_NEW) || (h == HASH_BOTH)) errs += add_entry(type, X509_NAME_hash(name), filename, digest, 1, ~0); if ((h == HASH_OLD) || (h == HASH_BOTH)) errs += add_entry(type, X509_NAME_hash_old(name), filename, digest, 1, ~0); } end: sk_X509_INFO_pop_free(inf, X509_INFO_free); return errs; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_442042", "function_addr": 4464706, "binary_name": "11d51f39d967e6c925cbbbf561559e32fec33ac3b7a84b8e1e75a62d16d81f0a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0A0h"], [3, "mov [rbp+s], rdi"], [4, "mov [rbp+var_90], rsi"], [5, "mov [rbp+var_94], edx"], [6, "mov [rbp+var_8], 0"], [7, "mov [rbp+var_10], 0"], [8, "mov [rbp+var_18], 0"], [9, "mov rax, [rbp+s]"], [10, "mov esi, 2Eh "], [11, "mov rdi, rax"], [12, "call _strrchr"], [13, "mov [rbp+var_28], rax"], [14, "cmp [rbp+var_28], 0"], [15, "jz loc_4422F6"], [16, "mov [rbp+var_20], 0"], [17, "jmp short loc_4420CD"], [18, "mov rax, [rbp+var_28]"], [19, "lea rdx, [rax+1]"], [20, "mov rax, [rbp+var_20]"], [21, "mov rax, off_4976E0[rax*8]"], [22, "mov rsi, rdx"], [23, "mov rdi, rax"], [24, "call _strcasecmp"], [25, "test eax, eax"], [26, "jz short loc_4420D6"], [27, "add [rbp+var_20], 1"], [28, "cmp [rbp+var_20], 3"], [29, "jbe short loc_4420A5"], [30, "jmp short loc_4420D7"], [31, "nop"], [32, "cmp [rbp+var_20], 3"], [33, "ja loc_4422F9"], [34, "mov rax, [rbp+var_90]"], [35, "mov esi, offset unk_478441"], [36, "mov rdi, rax"], [37, "call _BIO_new_file"], [38, "mov [rbp+var_30], rax"], [39, "cmp [rbp+var_30], 0"], [40, "jnz short loc_442138"], [41, "call sub_43A028"], [42, "mov rsi, rax"], [43, "mov rax, cs:qword_4A1E88"], [44, "mov rdx, [rbp+s]"], [45, "mov rcx, rdx"], [46, "mov rdx, rsi"], [47, "mov esi, offset aSSkippingSCann"], [48, "mov rdi, rax"], [49, "mov eax, 0"], [50, "call _BIO_printf"], [51, "add [rbp+var_18], 1"], [52, "jmp loc_442300"], [53, "mov rax, [rbp+var_30]"], [54, "mov ecx, 0"], [55, "mov edx, 0"], [56, "mov esi, 0"], [57, "mov rdi, rax"], [58, "call _PEM_X509_INFO_read_bio"], [59, "mov [rbp+var_8], rax"], [60, "mov rax, [rbp+var_30]"], [61, "mov rdi, rax"], [62, "call _BIO_free"], [63, "cmp [rbp+var_8], 0"], [64, "jz loc_4422FC"], [65, "mov rax, [rbp+var_8]"], [66, "mov rdi, rax"], [67, "call sub_4419E7"], [68, "cmp eax, 1"], [69, "jz short loc_4421B2"], [70, "call sub_43A028"], [71, "mov rsi, rax"], [72, "mov rax, cs:qword_4A1E88"], [73, "mov rdx, [rbp+s]"], [74, "mov rcx, rdx"], [75, "mov rdx, rsi"], [76, "mov esi, offset aSSkippingSItDo"], [77, "mov rdi, rax"], [78, "mov eax, 0"], [79, "call _BIO_printf"], [80, "jmp loc_442300"], [81, "mov rax, [rbp+var_8]"], [82, "mov esi, 0"], [83, "mov rdi, rax"], [84, "call sub_441A01"], [85, "mov [rbp+var_38], rax"], [86, "mov rax, [rbp+var_38]"], [87, "mov rax, [rax]"], [88, "test rax, rax"], [89, "jz short loc_44220E"], [90, "mov [rbp+var_14], 0"], [91, "mov rax, [rbp+var_38]"], [92, "mov rax, [rax]"], [93, "mov rdi, rax"], [94, "call _X509_get_subject_name"], [95, "mov [rbp+var_10], rax"], [96, "mov rsi, cs:qword_4A1FA8"], [97, "mov rax, [rbp+var_38]"], [98, "mov rax, [rax]"], [99, "lea rdx, [rbp+var_80]"], [100, "mov ecx, 0"], [101, "mov rdi, rax"], [102, "call _X509_digest"], [103, "jmp short loc_442261"], [104, "mov rax, [rbp+var_38]"], [105, "mov rax, [rax+8]"], [106, "test rax, rax"], [107, "jz short loc_442258"], [108, "mov [rbp+var_14], 1"], [109, "mov rax, [rbp+var_38]"], [110, "mov rax, [rax+8]"], [111, "mov rdi, rax"], [112, "call _X509_CRL_get_issuer"], [113, "mov [rbp+var_10], rax"], [114, "mov rsi, cs:qword_4A1FA8"], [115, "mov rax, [rbp+var_38]"], [116, "mov rax, [rax+8]"], [117, "lea rdx, [rbp+var_80]"], [118, "mov ecx, 0"], [119, "mov rdi, rax"], [120, "call _X509_CRL_digest"], [121, "jmp short loc_442261"], [122, "add [rbp+var_18], 1"], [123, "jmp loc_442300"], [124, "cmp [rbp+var_10], 0"], [125, "jz loc_4422FF"], [126, "cmp [rbp+var_94], 1"], [127, "jz short loc_44227E"], [128, "cmp [rbp+var_94], 2"], [129, "jnz short loc_4422B0"], [130, "mov rax, [rbp+var_10]"], [131, "mov rdi, rax"], [132, "call _X509_NAME_hash"], [133, "mov esi, eax"], [134, "mov eax, [rbp+var_14]"], [135, "lea rcx, [rbp+var_80]"], [136, "mov rdx, [rbp+s]"], [137, "mov r9d, 0FFFFh"], [138, "mov r8d, 1"], [139, "mov edi, eax"], [140, "call sub_441AC6"], [141, "add [rbp+var_18], eax"], [142, "cmp [rbp+var_94], 0"], [143, "jz short loc_4422C2"], [144, "cmp [rbp+var_94], 2"], [145, "jnz short loc_4422FF"], [146, "mov rax, [rbp+var_10]"], [147, "mov rdi, rax"], [148, "call _X509_NAME_hash_old"], [149, "mov esi, eax"], [150, "mov eax, [rbp+var_14]"], [151, "lea rcx, [rbp+var_80]"], [152, "mov rdx, [rbp+s]"], [153, "mov r9d, 0FFFFh"], [154, "mov r8d, 1"], [155, "mov edi, eax"], [156, "call sub_441AC6"], [157, "add [rbp+var_18], eax"], [158, "jmp short loc_442300"], [159, "nop"], [160, "jmp short loc_442300"], [161, "nop"], [162, "jmp short loc_442300"], [163, "nop"], [164, "jmp short loc_442300"], [165, "nop"], [166, "mov rax, [rbp+var_8]"], [167, "mov esi, offset _X509_INFO_free"], [168, "mov rdi, rax"], [169, "call sub_441A23"], [170, "mov eax, [rbp+var_18]"], [171, "leave"], [172, "retn"]], "data_dep": [[9, 3], [11, 9], [13, 12], [14, 13], [15, 14], [18, 13], [19, 18], [19, 19], [20, 16], [20, 27], [22, 19], [23, 21], [25, 24], [26, 25], [27, 16], [27, 27], [28, 16], [28, 27], [29, 28], [32, 16], [32, 27], [33, 32], [34, 4], [36, 34], [38, 37], [39, 38], [40, 39], [42, 41], [44, 3], [45, 44], [46, 42], [48, 43], [51, 8], [53, 38], [57, 53], [59, 58], [60, 38], [61, 60], [63, 59], [64, 63], [65, 59], [66, 65], [68, 67], [69, 68], [71, 70], [73, 3], [74, 73], [75, 71], [77, 72], [81, 59], [83, 81], [85, 84], [86, 85], [87, 86], [88, 87], [89, 88], [91, 85], [92, 91], [93, 92], [95, 94], [97, 85], [98, 97], [99, 55], [101, 98], [104, 85], [105, 104], [106, 105], [107, 106], [109, 85], [110, 109], [111, 110], [113, 112], [115, 85], [116, 115], [117, 55], [119, 116], [122, 8], [124, 113], [124, 95], [125, 124], [126, 5], [127, 126], [128, 5], [129, 128], [130, 95], [130, 113], [131, 130], [133, 132], [134, 90], [134, 108], [135, 100], [135, 118], [136, 3], [139, 134], [141, 8], [141, 140], [142, 5], [143, 142], [144, 5], [145, 144], [146, 95], [146, 113], [147, 146], [149, 148], [150, 90], [150, 108], [151, 100], [151, 118], [151, 135], [152, 3], [155, 150], [157, 141], [157, 8], [157, 156], [166, 59], [166, 6], [168, 166], [170, 157], [170, 141], [170, 8], [170, 122], [170, 51], [172, 170]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/11d51f39d967e6c925cbbbf561559e32fec33ac3b7a84b8e1e75a62d16d81f0a_11d51f39d967e6c925cbbbf561559e32fec33ac3b7a84b8e1e75a62d16d81f0a.jsonl.gz", "strip_func_name": "sub_442042", "query": "\n\n\n__int64 __fastcall sub_442042(const char *a1, __int64 a2, int a3)\n{\nint v3; // eax\nint v4; // eax\nint v5; // eax\nint v6; // eax\nchar v9[72]; // [rsp+20h] [rbp-80h] BYREF\n_QWORD *v10; // [rsp+68h] [rbp-38h]\nchar *v12; // [rsp+78h] [rbp-28h]\nunsigned __int64 i; // [rsp+80h] [rbp-20h]\nunsigned int v14; // [rsp+88h] [rbp-18h]\nint v15; // [rsp+8Ch] [rbp-14h]\n__int64 v16; // [rsp+90h] [rbp-10h]\n__int64 v17; // [rsp+98h] [rbp-8h]\n\nv17 = 0LL;\nv16 = 0LL;\nv14 = 0;\nv12 = strrchr(a1, 46);\nif ( v12 )\n{\nfor ( i = 0LL; i <= 3 && strcasecmp((&off_4976E0)[i], v12 + 1); ++i )\n;\nif ( i <= 3 )\n{\nif ( BIO_new_file() )\n{\nv17 = PEM_X509_INFO_read_bio();\nBIO_free();\nif ( v17 )\n{\nif ( (unsigned int)sub_4419E7(v17, 0LL) == 1 )\n{\nv10 = (_QWORD *)sub_441A01(v17, 0LL);\nif ( *v10 )\n{\nv15 = 0;\nv16 = X509_get_subject_name();\nX509_digest();\n}\nelse\n{\nif ( !v10[1] )\n{\n++v14;\ngoto LABEL_24;\n}\nv15 = 1;\nv16 = X509_CRL_get_issuer();\nX509_CRL_digest();\n}\nif ( v16 )\n{\nif ( a3 == 1 || a3 == 2 )\n{\nv3 = X509_NAME_hash();\nv4 = sub_441AC6(v15, v3, a1, v9, 1, 0xFFFFu);\nv14 += v4;\n}\nif ( !a3 || a3 == 2 )\n{\nv5 = X509_NAME_hash_old();\nv6 = sub_441AC6(v15, v5, a1, v9, 1, 0xFFFFu);\nv14 += v6;\n}\n}\n}\nelse\n{\nsub_43A028();\nBIO_printf();\n}\n}\n}\nelse\n{\nsub_43A028();\nBIO_printf();\n++v14;\n}\n}\n}\nLABEL_24:\nsub_441A23(v17, X509_INFO_free);\nreturn v14;\n}\n\n\n\nQ:[a3,a1,a2,v9,v10,v12,v14,v15,v16,v17,sub_442042,sub_4419E7,sub_441A01,sub_441AC6,sub_43A028,sub_441A23,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'h', 'a1': 'filename', 'a2': 'fullpath', 'v9': 'digest', 'v10': 'x', 'v12': 'ext', 'v14': 'errs', 'v15': 'type', 'v16': 'name', 'v17': 'inf', 'sub_442042': 'do_file', 'sub_4419E7': 'sk_X509_INFO_num_1', 'sub_441A01': 'sk_X509_INFO_value_0', 'sub_441AC6': 'add_entry', 'sub_43A028': 'opt_getprog', 'sub_441A23': 'sk_X509_INFO_pop_free_0'}"}
getrange_slow
69aac2dcd42fd621a0b7296a2f253ca5155c56a98f63adcec8bea3284dfea720
WukLab
Hotpot
NA
static bool getrange_slow(struct vringh *vrh, u64 addr, struct vringh_range *r) { if (addr < (u64)(unsigned long)__user_addr_min - user_addr_offset) return false; if (addr >= (u64)(unsigned long)__user_addr_max - user_addr_offset) return false; r->start = addr; r->end_incl = r->start; r->offset = user_addr_offset; return true; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401781", "function_addr": 4200321, "binary_name": "69aac2dcd42fd621a0b7296a2f253ca5155c56a98f63adcec8bea3284dfea720.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, cs:ptr"], [6, "mov rdx, cs:qword_40C178"], [7, "sub rax, rdx"], [8, "cmp [rbp+var_10], rax"], [9, "jnb short loc_4017AF"], [10, "mov eax, 0"], [11, "jmp short loc_4017FB"], [12, "mov rax, cs:qword_40C158"], [13, "mov rdx, cs:qword_40C178"], [14, "sub rax, rdx"], [15, "cmp [rbp+var_10], rax"], [16, "jb short loc_4017CD"], [17, "mov eax, 0"], [18, "jmp short loc_4017FB"], [19, "mov rax, [rbp+var_18]"], [20, "mov rdx, [rbp+var_10]"], [21, "mov [rax], rdx"], [22, "mov rax, [rbp+var_18]"], [23, "mov rdx, [rax]"], [24, "mov rax, [rbp+var_18]"], [25, "mov [rax+8], rdx"], [26, "mov rdx, cs:qword_40C178"], [27, "mov rax, [rbp+var_18]"], [28, "mov [rax+10h], rdx"], [29, "mov eax, 1"], [30, "pop rbp"], [31, "retn"]], "data_dep": [[7, 6], [7, 5], [8, 3], [8, 7], [9, 8], [14, 13], [14, 12], [15, 14], [15, 3], [16, 15], [19, 4], [20, 3], [21, 19], [21, 20], [22, 4], [23, 22], [23, 21], [24, 4], [25, 23], [25, 24], [27, 4], [28, 27], [28, 26], [30, 0], [31, 17], [31, 29], [31, 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/69aac2dcd42fd621a0b7296a2f253ca5155c56a98f63adcec8bea3284dfea720_69aac2dcd42fd621a0b7296a2f253ca5155c56a98f63adcec8bea3284dfea720.jsonl.gz", "strip_func_name": "sub_401781", "query": "\n\n\n__int64 __fastcall sub_401781(__int64 a1, char *a2, char **a3)\n{\nif ( a2 < (char *)ptr - qword_40C178 )\nreturn 0LL;\nif ( (unsigned __int64)a2 >= qword_40C158 - qword_40C178 )\nreturn 0LL;\n*a3 = a2;\na3[1] = *a3;\na3[2] = (char *)qword_40C178;\nreturn 1LL;\n}\n\n\n\nQ:[a3,a2,a1,sub_401781,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'r', 'a2': 'addr', 'a1': 'vrh', 'sub_401781': 'getrange_slow'}"}
mdev_munmap
42b7bb3daa242e2847b11ae8e23e10be8dfc6fadd65fe79d9f672661ebe9ac51
teslamotors
coreboot
NA
static int mdev_munmap(const struct region_device *rd __unused, void *mapping __unused) { return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_416023", "function_addr": 4284451, "binary_name": "42b7bb3daa242e2847b11ae8e23e10be8dfc6fadd65fe79d9f672661ebe9ac51.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 eax, 0"], [5, "pop rbp"], [6, "retn"]], "data_dep": [[5, 0], [6, 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/42b7bb3daa242e2847b11ae8e23e10be8dfc6fadd65fe79d9f672661ebe9ac51_42b7bb3daa242e2847b11ae8e23e10be8dfc6fadd65fe79d9f672661ebe9ac51.jsonl.gz", "strip_func_name": "sub_416023", "query": "\n\n\n__int64 sub_416023()\n{\nreturn 0LL;\n}\n\n\n\nQ:[sub_416023,]\nAssistant: ", "hints": "[]", "response": "{'sub_416023': 'mdev_munmap'}"}
p2p_info
8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f
sonic-net
sonic-buildimage
NA
void p2p_info(struct p2p_data *p2p, const char *fmt, ...) { va_list ap; char buf[500]; if (!p2p->cfg->debug_print) return; va_start(ap, fmt); vsnprintf(buf, sizeof(buf), fmt, ap); buf[sizeof(buf) - 1] = '\0'; va_end(ap); p2p->cfg->debug_print(p2p->cfg->cb_ctx, MSG_INFO, buf); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_416A85", "function_addr": 4287109, "binary_name": "8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 2D0h"], [3, "mov [rbp+var_2C8], rdi"], [4, "mov [rbp+format], rsi"], [5, "mov [rbp+var_A0], rdx"], [6, "mov [rbp+var_98], rcx"], [7, "mov [rbp+var_90], r8"], [8, "mov [rbp+var_88], r9"], [9, "test al, al"], [10, "jz short loc_416ADE"], [11, "movaps [rbp+var_80], xmm0"], [12, "movaps [rbp+var_70], xmm1"], [13, "movaps [rbp+var_60], xmm2"], [14, "movaps [rbp+var_50], xmm3"], [15, "movaps [rbp+var_40], xmm4"], [16, "movaps [rbp+var_30], xmm5"], [17, "movaps [rbp+var_20], xmm6"], [18, "movaps [rbp+var_10], xmm7"], [19, "mov rax, [rbp+var_2C8]"], [20, "mov rax, [rax]"], [21, "mov rax, [rax+960h]"], [22, "test rax, rax"], [23, "jz loc_416B83"], [24, "mov [rbp+arg], 10h"], [25, "mov [rbp+var_C4], 30h "], [26, "lea rax, [rbp+arg_0]"], [27, "mov [rbp+var_C0], rax"], [28, "lea rax, [rbp+var_B0]"], [29, "mov [rbp+var_B8], rax"], [30, "lea rcx, [rbp+arg]"], [31, "mov rdx, [rbp+format]"], [32, "lea rax, [rbp+s]"], [33, "mov esi, 1F4h"], [34, "mov rdi, rax"], [35, "call _vsnprintf"], [36, "mov [rbp+var_CD], 0"], [37, "mov rax, [rbp+var_2C8]"], [38, "mov rax, [rax]"], [39, "mov rcx, [rax+960h]"], [40, "mov rax, [rbp+var_2C8]"], [41, "mov rax, [rax]"], [42, "mov rax, [rax+958h]"], [43, "lea rdx, [rbp+s]"], [44, "mov esi, 3"], [45, "mov rdi, rax"], [46, "call rcx"], [47, "jmp short locret_416B84"], [48, "nop"], [49, "leave"], [50, "retn"]], "data_dep": [[10, 9], [19, 3], [20, 19], [21, 20], [22, 21], [23, 22], [26, 22], [27, 26], [28, 26], [29, 28], [30, 24], [31, 4], [32, 28], [34, 32], [37, 3], [38, 37], [39, 38], [40, 3], [41, 40], [42, 41], [43, 31], [45, 42], [46, 39], [50, 46], [50, 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/8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f_8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f.jsonl.gz", "strip_func_name": "sub_416A85", "query": "\n\n\n__int64 sub_416A85(__int64 a1, const char *a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, ...)\n{\n__int64 result; // rax\nchar s[504]; // [rsp+10h] [rbp-2C0h] BYREF\ngcc_va_list arg; // [rsp+208h] [rbp-C8h] BYREF\n__int64 v9; // [rsp+230h] [rbp-A0h]\n__int64 v10; // [rsp+238h] [rbp-98h]\n__int64 v11; // [rsp+240h] [rbp-90h]\n__int64 v12; // [rsp+248h] [rbp-88h]\n\nv9 = a3;\nv10 = a4;\nv11 = a5;\nv12 = a6;\nresult = *(_QWORD *)(*(_QWORD *)a1 + 2400LL);\nif ( result )\n{\narg[0].gp_offset = 16;\nva_start(arg, a6);\nvsnprintf(s, 0x1F4uLL, a2, arg);\ns[499] = 0;\nresult = (*(__int64 (__fastcall **)(_QWORD, __int64, char *))(*(_QWORD *)a1 + 2400LL))(\n*(_QWORD *)(*(_QWORD *)a1 + 2392LL),\n3LL,\ns);\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,s,arg,sub_416A85,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'p2p', 'a2': 'fmt', 's': 'buf', 'arg': 'ap', 'sub_416A85': 'p2p_info'}"}
sim_tape_wrtmk
c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad
open-simh
simh
NA
t_stat sim_tape_wrtmk (UNIT *uptr) { struct tape_context *ctx = (struct tape_context *)uptr->tape_ctx; if (ctx == NULL) /* if not properly attached? */ return sim_messagef (SCPE_IERR, "Bad Attach\n"); /* that's a problem */ sim_debug_unit (ctx->dbit, uptr, "sim_tape_wrtmk(unit=%d)\n", (int)(uptr-ctx->dptr->units)); if (MT_GET_FMT (uptr) == MTUF_F_P7B) { /* P7B? */ uint8 buf = P7B_EOF; /* eof mark */ return sim_tape_wrrecf (uptr, &buf, 1); /* write char */ } if (MT_GET_FMT (uptr) == MTUF_F_AWS) /* AWS? */ return sim_tape_aws_wrdata (uptr, NULL, 0); return sim_tape_wrdata (uptr, MTR_TMK); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_471DF5", "function_addr": 4660725, "binary_name": "c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad.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+78h]"], [6, "mov [rbp+var_8], rax"], [7, "cmp [rbp+var_8], 0"], [8, "jnz short loc_471E2D"], [9, "mov esi, offset aBadAttach"], [10, "mov edi, 65h "], [11, "mov eax, 0"], [12, "call sub_4384B4"], [13, "jmp locret_471F2D"], [14, "mov rax, cs:qword_4F7F80"], [15, "test rax, rax"], [16, "jz loc_471EC2"], [17, "cmp [rbp+var_18], 0"], [18, "jz short loc_471EC2"], [19, "mov rax, [rbp+var_18]"], [20, "mov rax, [rax+0B0h]"], [21, "test rax, rax"], [22, "jz short loc_471EC2"], [23, "mov rax, [rbp+var_18]"], [24, "mov edx, [rax+0B8h]"], [25, "mov rax, [rbp+var_18]"], [26, "mov rax, [rax+0B0h]"], [27, "mov eax, [rax+74h]"], [28, "or edx, eax"], [29, "mov rax, [rbp+var_8]"], [30, "mov eax, [rax+8]"], [31, "and eax, edx"], [32, "test eax, eax"], [33, "jz short loc_471EC2"], [34, "mov rax, [rbp+var_8]"], [35, "mov rax, [rax]"], [36, "mov rdx, [rax+8]"], [37, "mov rax, [rbp+var_18]"], [38, "sub rax, rdx"], [39, "sar rax, 3"], [40, "mov rdx, rax"], [41, "mov rax, 0F83E0F83E0F83E1h"], [42, "imul rax, rdx"], [43, "mov edx, eax"], [44, "mov rax, [rbp+var_8]"], [45, "mov eax, [rax+8]"], [46, "mov rsi, [rbp+var_18]"], [47, "mov ecx, edx"], [48, "mov edx, offset aSimTapeWrtmkUn"], [49, "mov edi, eax"], [50, "mov eax, 0"], [51, "call sub_438DCE"], [52, "mov rax, [rbp+var_18]"], [53, "mov eax, [rax+3Ch]"], [54, "shr eax, 0Dh"], [55, "and eax, 0Fh"], [56, "cmp eax, 3"], [57, "jnz short loc_471EF2"], [58, "mov [rbp+var_9], 0Fh"], [59, "lea rcx, [rbp+var_9]"], [60, "mov rax, [rbp+var_18]"], [61, "mov edx, 1"], [62, "mov rsi, rcx"], [63, "mov rdi, rax"], [64, "call sub_4713EF"], [65, "jmp short locret_471F2D"], [66, "mov rax, [rbp+var_18]"], [67, "mov eax, [rax+3Ch]"], [68, "shr eax, 0Dh"], [69, "and eax, 0Fh"], [70, "cmp eax, 4"], [71, "jnz short loc_471F1C"], [72, "mov rax, [rbp+var_18]"], [73, "mov edx, 0"], [74, "mov esi, 0"], [75, "mov rdi, rax"], [76, "call sub_4719F9"], [77, "jmp short locret_471F2D"], [78, "mov rax, [rbp+var_18]"], [79, "mov esi, 0"], [80, "mov rdi, rax"], [81, "call sub_471C5E"], [82, "leave"], [83, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [15, 14], [16, 15], [17, 3], [18, 17], [19, 3], [20, 19], [21, 20], [22, 21], [23, 3], [24, 23], [25, 3], [26, 25], [27, 26], [28, 24], [28, 27], [29, 6], [30, 29], [31, 28], [31, 30], [32, 31], [33, 32], [34, 6], [35, 34], [36, 35], [37, 3], [38, 37], [38, 36], [39, 38], [40, 39], [42, 41], [42, 40], [43, 42], [44, 6], [45, 44], [46, 3], [47, 43], [49, 45], [52, 3], [53, 52], [54, 53], [55, 54], [56, 55], [57, 56], [59, 58], [59, 47], [60, 3], [62, 59], [63, 60], [66, 3], [67, 66], [68, 67], [69, 68], [70, 69], [71, 70], [72, 3], [75, 72], [78, 3], [80, 78], [83, 64], [83, 12], [83, 76], [83, 81]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad_c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad.jsonl.gz", "strip_func_name": "sub_471DF5", "query": "\n\n\n__int64 __fastcall sub_471DF5(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 result; // rax\nchar v7; // [rsp+17h] [rbp-9h] BYREF\nint *v8; // [rsp+18h] [rbp-8h]\n\nv8 = *(int **)(a1 + 120);\nif ( !v8 )\nreturn sub_4384B4(101, \"Bad Attach\\n\", a3, a4, a5, a6);\nif ( qword_4F7F80 )\n{\nif ( a1 )\n{\nif ( *(_QWORD *)(a1 + 176) )\n{\na3 = (unsigned int)(*(_DWORD *)(*(_QWORD *)(a1 + 176) + 116LL) | *(_DWORD *)(a1 + 184));\nif ( ((unsigned int)a3 & v8[2]) != 0 )\nsub_438DCE(\nv8[2],\na1,\n\"sim_tape_wrtmk(unit=%d)\\n\",\n1041204193 * (unsigned int)((a1 - *(_QWORD *)(*(_QWORD *)v8 + 8LL)) >> 3),\na5,\na6);\n}\n}\n}\nif ( ((*(_DWORD *)(a1 + 60) >> 13) & 0xF) == 3 )\n{\nv7 = 15;\nresult = sub_4713EF(a1, &v7, 1LL, (__int64)&v7, a5, a6);\n}\nelse if ( ((*(_DWORD *)(a1 + 60) >> 13) & 0xF) == 4 )\n{\nresult = sub_4719F9(a1, 0LL, 0);\n}\nelse\n{\nresult = sub_471C5E(a1, 0, a3, a4, a5, a6);\n}\nreturn result;\n}\n\n\n\nQ:[a1,v7,v8,sub_471DF5,sub_4384B4,sub_438DCE,sub_4713EF,sub_4719F9,sub_471C5E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'uptr', 'v7': 'buf', 'v8': 'ctx', 'sub_471DF5': 'sim_tape_wrtmk', 'sub_4384B4': 'sim_messagef', 'sub_438DCE': '_sim_debug_unit', 'sub_4713EF': 'sim_tape_wrrecf', 'sub_4719F9': 'sim_tape_aws_wrdata', 'sub_471C5E': 'sim_tape_wrdata'}"}
xm_trigger_note
b8066d87e6e3405796b135c71086659e5e4bd37c4dfa5687ee2dab50437be3d6
Ryzee119
Omnispeak64
NA
static void xm_trigger_note(xm_context_t* ctx, xm_channel_context_t* ch, unsigned int flags) { if(!(flags & XM_TRIGGER_KEEP_SAMPLE_POSITION)) { ch->sample_position = 0.f; ch->ping = true; } if(ch->sample != NULL) { if(!(flags & XM_TRIGGER_KEEP_VOLUME)) { ch->volume = ch->sample->volume; } ch->panning = ch->sample->panning; } if(!(flags & XM_TRIGGER_KEEP_ENVELOPE)) { ch->sustained = true; ch->fadeout_volume = ch->volume_envelope_volume = 1.0f; ch->panning_envelope_panning = .5f; ch->volume_envelope_frame_count = ch->panning_envelope_frame_count = 0; } ch->vibrato_note_offset = 0.f; ch->tremolo_volume = 0.f; ch->tremor_on = false; ch->autovibrato_ticks = 0; if(ch->vibrato_waveform_retrigger) { ch->vibrato_ticks = 0; /* XXX: should the waveform itself also * be reset to sine? */ } if(ch->tremolo_waveform_retrigger) { ch->tremolo_ticks = 0; } if(!(flags & XM_TRIGGER_KEEP_PERIOD)) { ch->period = xm_period(ctx, ch->note); xm_update_frequency(ctx, ch); } ch->latest_trigger = ctx->generated_samples; if(ch->instrument != NULL) { ch->instrument->latest_trigger = ctx->generated_samples; } if(ch->sample != NULL) { ch->sample->latest_trigger = ctx->generated_samples; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_411C87", "function_addr": 4267143, "binary_name": "b8066d87e6e3405796b135c71086659e5e4bd37c4dfa5687ee2dab50437be3d6.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, "mov eax, [rbp+var_14]"], [7, "and eax, 4"], [8, "test eax, eax"], [9, "jnz short loc_411CB9"], [10, "mov rax, [rbp+var_10]"], [11, "pxor xmm0, xmm0"], [12, "movss dword ptr [rax+20h], xmm0"], [13, "mov rax, [rbp+var_10]"], [14, "mov byte ptr [rax+30h], 1"], [15, "mov rax, [rbp+var_10]"], [16, "mov rax, [rax+10h]"], [17, "test rax, rax"], [18, "jz short loc_411CFC"], [19, "mov eax, [rbp+var_14]"], [20, "and eax, 1"], [21, "test eax, eax"], [22, "jnz short loc_411CE6"], [23, "mov rax, [rbp+var_10]"], [24, "mov rax, [rax+10h]"], [25, "movss xmm0, dword ptr [rax+28h]"], [26, "mov rax, [rbp+var_10]"], [27, "movss dword ptr [rax+34h], xmm0"], [28, "mov rax, [rbp+var_10]"], [29, "mov rax, [rax+10h]"], [30, "movss xmm0, dword ptr [rax+34h]"], [31, "mov rax, [rbp+var_10]"], [32, "movss dword ptr [rax+38h], xmm0"], [33, "mov eax, [rbp+var_14]"], [34, "and eax, 8"], [35, "test eax, eax"], [36, "jnz short loc_411D5C"], [37, "mov rax, [rbp+var_10]"], [38, "mov byte ptr [rax+3Eh], 1"], [39, "mov rax, [rbp+var_10]"], [40, "movss xmm0, cs:dword_424264"], [41, "movss dword ptr [rax+44h], xmm0"], [42, "mov rax, [rbp+var_10]"], [43, "movss xmm0, dword ptr [rax+44h]"], [44, "mov rax, [rbp+var_10]"], [45, "movss dword ptr [rax+40h], xmm0"], [46, "mov rax, [rbp+var_10]"], [47, "movss xmm0, cs:dword_424308"], [48, "movss dword ptr [rax+48h], xmm0"], [49, "mov rax, [rbp+var_10]"], [50, "mov word ptr [rax+4Eh], 0"], [51, "mov rax, [rbp+var_10]"], [52, "movzx edx, word ptr [rax+4Eh]"], [53, "mov rax, [rbp+var_10]"], [54, "mov [rax+4Ch], dx"], [55, "mov rax, [rbp+var_10]"], [56, "pxor xmm0, xmm0"], [57, "movss dword ptr [rax+78h], xmm0"], [58, "mov rax, [rbp+var_10]"], [59, "pxor xmm0, xmm0"], [60, "movss dword ptr [rax+84h], xmm0"], [61, "mov rax, [rbp+var_10]"], [62, "mov byte ptr [rax+89h], 0"], [63, "mov rax, [rbp+var_10]"], [64, "mov word ptr [rax+3Ch], 0"], [65, "mov rax, [rbp+var_10]"], [66, "movzx eax, byte ptr [rax+74h]"], [67, "test al, al"], [68, "jz short loc_411DA4"], [69, "mov rax, [rbp+var_10]"], [70, "mov word ptr [rax+76h], 0"], [71, "mov rax, [rbp+var_10]"], [72, "movzx eax, byte ptr [rax+80h]"], [73, "test al, al"], [74, "jz short loc_411DBE"], [75, "mov rax, [rbp+var_10]"], [76, "mov byte ptr [rax+82h], 0"], [77, "mov eax, [rbp+var_14]"], [78, "and eax, 2"], [79, "test eax, eax"], [80, "jnz short loc_411DFC"], [81, "mov rax, [rbp+var_10]"], [82, "mov edx, [rax]"], [83, "mov rax, [rbp+var_8]"], [84, "movd xmm0, edx"], [85, "mov rdi, rax"], [86, "call sub_410892"], [87, "movd eax, xmm0"], [88, "mov rdx, [rbp+var_10]"], [89, "mov [rdx+24h], eax"], [90, "mov rdx, [rbp+var_10]"], [91, "mov rax, [rbp+var_8]"], [92, "mov rsi, rdx"], [93, "mov rdi, rax"], [94, "call sub_410C90"], [95, "mov rax, [rbp+var_8]"], [96, "mov rdx, [rax+1F8h]"], [97, "mov rax, [rbp+var_10]"], [98, "mov [rax+90h], rdx"], [99, "mov rax, [rbp+var_10]"], [100, "mov rax, [rax+8]"], [101, "test rax, rax"], [102, "jz short loc_411E39"], [103, "mov rax, [rbp+var_10]"], [104, "mov rax, [rax+8]"], [105, "mov rdx, [rbp+var_8]"], [106, "mov rdx, [rdx+1F8h]"], [107, "mov [rax+0F8h], rdx"], [108, "mov rax, [rbp+var_10]"], [109, "mov rax, [rax+10h]"], [110, "test rax, rax"], [111, "jz short loc_411E5D"], [112, "mov rax, [rbp+var_10]"], [113, "mov rax, [rax+10h]"], [114, "mov rdx, [rbp+var_8]"], [115, "mov rdx, [rdx+1F8h]"], [116, "mov [rax+40h], rdx"], [117, "nop"], [118, "leave"], [119, "retn"]], "data_dep": [[6, 5], [7, 6], [8, 7], [9, 8], [10, 4], [12, 10], [12, 11], [13, 4], [14, 13], [15, 4], [16, 15], [16, 12], [16, 14], [17, 16], [18, 17], [19, 5], [20, 19], [21, 20], [22, 21], [23, 4], [24, 12], [24, 14], [24, 23], [24, 27], [25, 27], [25, 24], [25, 12], [25, 14], [26, 4], [27, 26], [27, 25], [28, 4], [29, 32], [29, 27], [29, 28], [29, 12], [29, 14], [30, 27], [30, 29], [30, 12], [30, 14], [30, 32], [31, 4], [32, 30], [32, 31], [33, 5], [34, 33], [35, 34], [36, 35], [37, 4], [38, 37], [39, 4], [41, 40], [41, 39], [42, 4], [43, 41], [43, 42], [44, 4], [45, 43], [45, 44], [46, 4], [48, 47], [48, 46], [49, 4], [50, 49], [51, 4], [52, 51], [52, 50], [53, 4], [54, 53], [54, 52], [55, 4], [57, 56], [57, 55], [58, 4], [60, 59], [60, 58], [61, 4], [62, 61], [63, 4], [64, 63], [65, 4], [66, 64], [66, 65], [67, 66], [68, 67], [69, 4], [70, 69], [71, 4], [72, 27], [72, 57], [72, 50], [72, 70], [72, 45], [72, 54], [72, 38], [72, 60], [72, 62], [72, 12], [72, 48], [72, 14], [72, 32], [72, 41], [72, 71], [72, 64], [73, 72], [74, 73], [75, 4], [76, 75], [77, 5], [78, 77], [79, 78], [80, 79], [81, 4], [82, 38], [82, 81], [82, 12], [82, 76], [82, 60], [82, 14], [82, 32], [82, 62], [82, 89], [82, 64], [82, 48], [82, 57], [82, 41], [82, 50], [82, 70], [82, 27], [82, 45], [82, 54], [83, 3], [84, 82], [85, 83], [87, 84], [88, 4], [89, 88], [89, 87], [90, 4], [91, 3], [92, 90], [93, 91], [95, 3], [96, 95], [96, 60], [96, 12], [96, 76], [96, 48], [96, 14], [96, 32], [96, 41], [96, 62], [96, 89], [96, 98], [96, 64], [96, 27], [96, 57], [96, 50], [96, 70], [96, 45], [96, 54], [96, 38], [97, 4], [98, 96], [98, 97], [99, 4], [100, 98], [100, 99], [101, 100], [102, 101], [103, 4], [104, 32], [104, 62], [104, 89], [104, 98], [104, 64], [104, 27], [104, 48], [104, 57], [104, 41], [104, 50], [104, 107], [104, 70], [104, 45], [104, 54], [104, 38], [104, 12], [104, 76], [104, 103], [104, 60], [104, 14], [105, 3], [106, 50], [106, 107], [106, 70], [106, 45], [106, 54], [106, 38], [106, 60], [106, 57], [106, 12], [106, 76], [106, 48], [106, 14], [106, 32], [106, 41], [106, 105], [106, 62], [106, 89], [106, 98], [106, 64], [106, 27], [107, 104], [107, 106], [108, 4], [109, 108], [109, 12], [109, 76], [109, 60], [109, 14], [109, 32], [109, 62], [109, 89], [109, 98], [109, 64], [109, 27], [109, 48], [109, 57], [109, 41], [109, 50], [109, 107], [109, 70], [109, 45], [109, 54], [109, 38], [110, 109], [111, 110], [112, 4], [113, 12], [113, 76], [113, 60], [113, 14], [113, 32], [113, 62], [113, 89], [113, 64], [113, 27], [113, 48], [113, 112], [113, 57], [113, 41], [113, 50], [113, 98], [113, 107], [113, 116], [113, 70], [113, 45], [113, 54], [113, 38], [114, 3], [115, 32], [115, 41], [115, 62], [115, 89], [115, 98], [115, 64], [115, 27], [115, 48], [115, 57], [115, 114], [115, 14], [115, 107], [115, 116], [115, 70], [115, 45], [115, 54], [115, 38], [115, 50], [115, 60], [115, 12], [115, 76], [116, 113], [116, 115], [119, 113], [119, 110]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/b8066d87e6e3405796b135c71086659e5e4bd37c4dfa5687ee2dab50437be3d6_b8066d87e6e3405796b135c71086659e5e4bd37c4dfa5687ee2dab50437be3d6.jsonl.gz", "strip_func_name": "sub_411C87", "query": "\n\n\n__int64 __fastcall sub_411C87(__int64 a1, __int64 a2, char a3)\n{\n__int64 result; // rax\n\nif ( (a3 & 4) == 0 )\n{\n*(_DWORD *)(a2 + 32) = 0;\n*(_BYTE *)(a2 + 48) = 1;\n}\nif ( *(_QWORD *)(a2 + 16) )\n{\nif ( (a3 & 1) == 0 )\n*(_DWORD *)(a2 + 52) = *(_DWORD *)(*(_QWORD *)(a2 + 16) + 40LL);\n*(_DWORD *)(a2 + 56) = *(_DWORD *)(*(_QWORD *)(a2 + 16) + 52LL);\n}\nif ( (a3 & 8) == 0 )\n{\n*(_BYTE *)(a2 + 62) = 1;\n*(_DWORD *)(a2 + 68) = 1065353216;\n*(_DWORD *)(a2 + 64) = *(_DWORD *)(a2 + 68);\n*(_DWORD *)(a2 + 72) = 1056964608;\n*(_WORD *)(a2 + 78) = 0;\n*(_WORD *)(a2 + 76) = *(_WORD *)(a2 + 78);\n}\n*(_DWORD *)(a2 + 120) = 0;\n*(_DWORD *)(a2 + 132) = 0;\n*(_BYTE *)(a2 + 137) = 0;\n*(_WORD *)(a2 + 60) = 0;\nif ( *(_BYTE *)(a2 + 116) )\n*(_WORD *)(a2 + 118) = 0;\nif ( *(_BYTE *)(a2 + 128) )\n*(_BYTE *)(a2 + 130) = 0;\nif ( (a3 & 2) == 0 )\n{\n*(_DWORD *)(a2 + 36) = _mm_cvtsi128_si32(sub_410892(a1, *(float *)a2));\nsub_410C90(a1, a2);\n}\n*(_QWORD *)(a2 + 144) = *(_QWORD *)(a1 + 504);\nif ( *(_QWORD *)(a2 + 8) )\n*(_QWORD *)(*(_QWORD *)(a2 + 8) + 248LL) = *(_QWORD *)(a1 + 504);\nresult = *(_QWORD *)(a2 + 16);\nif ( result )\n{\nresult = *(_QWORD *)(a2 + 16);\n*(_QWORD *)(result + 64) = *(_QWORD *)(a1 + 504);\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_411C87,sub_410892,sub_410C90,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'flags', 'a1': 'ctx', 'a2': 'ch_0', 'sub_411C87': 'xm_trigger_note', 'sub_410892': 'xm_period', 'sub_410C90': 'xm_update_frequency'}"}
indev_encoder_proc
19729148c2fecc0159cbd120947156a1f58505e3a7e54d3fb0c2e0bd24f28bc1
zephray
Fobu
NA
static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) { #if LV_USE_GROUP if(data->state == LV_INDEV_STATE_PR && i->proc.wait_until_release) return; if(i->proc.wait_until_release) { i->proc.wait_until_release = 0; i->proc.pr_timestamp = 0; i->proc.long_pr_sent = 0; i->proc.types.keypad.last_state = LV_INDEV_STATE_REL; /*To skip the processing of release*/ } /* Save the last keys before anything else. * They need to be already saved if the the function returns for any reason*/ lv_indev_state_t last_state = i->proc.types.keypad.last_state; i->proc.types.keypad.last_state = data->state; i->proc.types.keypad.last_key = data->key; lv_group_t * g = i->group; if(g == NULL) return; indev_obj_act = lv_group_get_focused(g); if(indev_obj_act == NULL) return; /*Process the steps they are valid only with released button*/ if(data->state != LV_INDEV_STATE_REL) { data->enc_diff = 0; } /*Refresh the focused object. It might change due to lv_group_focus_prev/next*/ indev_obj_act = lv_group_get_focused(g); if(indev_obj_act == NULL) return; /*Button press happened*/ if(data->state == LV_INDEV_STATE_PR && last_state == LV_INDEV_STATE_REL) { i->proc.pr_timestamp = lv_tick_get(); if(data->key == LV_KEY_ENTER) { bool editable = false; indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_GET_EDITABLE, &editable); if(lv_group_get_editing(g) == true || editable == false) { indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_PRESSED, NULL); if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_PRESSED, NULL); if(indev_reset_check(&i->proc)) return; } } else if(data->key == LV_KEY_LEFT) { /*emulate encoder left*/ data->enc_diff--; } else if(data->key == LV_KEY_RIGHT) { /*emulate encoder right*/ data->enc_diff++; } else if(data->key == LV_KEY_ESC) { /*Send the ESC as a normal KEY*/ lv_group_send_data(g, LV_KEY_ESC); lv_event_send(indev_obj_act, LV_EVENT_CANCEL, NULL); if(indev_reset_check(&i->proc)) return; } /*Just send other keys to the object (e.g. 'A' or `LV_GROUP_KEY_RIGHT`)*/ else { lv_group_send_data(g, data->key); } } /*Pressing*/ else if(data->state == LV_INDEV_STATE_PR && last_state == LV_INDEV_STATE_PR) { /* Long press*/ if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) { i->proc.long_pr_sent = 1; i->proc.longpr_rep_timestamp = lv_tick_get(); if(data->key == LV_KEY_ENTER) { bool editable = false; indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_GET_EDITABLE, &editable); /*On enter long press toggle edit mode.*/ if(editable) { /*Don't leave edit mode if there is only one object (nowhere to navigate)*/ if(_lv_ll_is_empty(&g->obj_ll) == false) { lv_group_set_editing(g, lv_group_get_editing(g) ? false : true); /*Toggle edit mode on long press*/ } } /*If not editable then just send a long press signal*/ else { indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS, NULL); if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL); if(indev_reset_check(&i->proc)) return; } } i->proc.long_pr_sent = 1; } /*Long press repeated time has elapsed?*/ else if(i->proc.long_pr_sent != 0 && lv_tick_elaps(i->proc.longpr_rep_timestamp) > i->driver.long_press_rep_time) { i->proc.longpr_rep_timestamp = lv_tick_get(); if(data->key == LV_KEY_ENTER) { indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS_REP, NULL); if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED_REPEAT, NULL); if(indev_reset_check(&i->proc)) return; } else if(data->key == LV_KEY_LEFT) { /*emulate encoder left*/ data->enc_diff--; } else if(data->key == LV_KEY_RIGHT) { /*emulate encoder right*/ data->enc_diff++; } else { lv_group_send_data(g, data->key); if(indev_reset_check(&i->proc)) return; } } } /*Release happened*/ else if(data->state == LV_INDEV_STATE_REL && last_state == LV_INDEV_STATE_PR) { if(data->key == LV_KEY_ENTER) { bool editable = false; indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_GET_EDITABLE, &editable); /*The button was released on a non-editable object. Just send enter*/ if(editable == false) { indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, NULL); if(indev_reset_check(&i->proc)) return; if(i->proc.long_pr_sent == 0) lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL); if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL); if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL); if(indev_reset_check(&i->proc)) return; } /*An object is being edited and the button is released. */ else if(g->editing) { /*Ignore long pressed enter release because it comes from mode switch*/ if(!i->proc.long_pr_sent || _lv_ll_is_empty(&g->obj_ll)) { indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, NULL); if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL); if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL); if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL); if(indev_reset_check(&i->proc)) return; lv_group_send_data(g, LV_KEY_ENTER); } } /*If the focused object is editable and now in navigate mode then on enter switch edit mode*/ else if(editable && !g->editing && !i->proc.long_pr_sent) { lv_group_set_editing(g, true); /*Set edit mode*/ } } i->proc.pr_timestamp = 0; i->proc.long_pr_sent = 0; } indev_obj_act = NULL; /*if encoder steps or simulated steps via left/right keys*/ if(data->enc_diff != 0) { /*In edit mode send LEFT/RIGHT keys*/ if(lv_group_get_editing(g)) { int32_t s; if(data->enc_diff < 0) { for(s = 0; s < -data->enc_diff; s++) lv_group_send_data(g, LV_KEY_LEFT); } else if(data->enc_diff > 0) { for(s = 0; s < data->enc_diff; s++) lv_group_send_data(g, LV_KEY_RIGHT); } } /*In navigate mode focus on the next/prev objects*/ else { int32_t s; if(data->enc_diff < 0) { for(s = 0; s < -data->enc_diff; s++) lv_group_focus_prev(g); } else if(data->enc_diff > 0) { for(s = 0; s < data->enc_diff; s++) lv_group_focus_next(g); } } } #else (void)data; /*Unused*/ (void)i; /*Unused*/ #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40405A", "function_addr": 4210778, "binary_name": "19729148c2fecc0159cbd120947156a1f58505e3a7e54d3fb0c2e0bd24f28bc1.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov rax, [rbp+var_30]"], [6, "movzx eax, byte ptr [rax+0Eh]"], [7, "cmp al, 1"], [8, "jnz short loc_404089"], [9, "mov rax, [rbp+var_28]"], [10, "movzx eax, byte ptr [rax+78h]"], [11, "and eax, 8"], [12, "test al, al"], [13, "jnz loc_404961"], [14, "mov rax, [rbp+var_28]"], [15, "movzx eax, byte ptr [rax+78h]"], [16, "and eax, 8"], [17, "test al, al"], [18, "jz short loc_4040C7"], [19, "mov rax, [rbp+var_28]"], [20, "movzx edx, byte ptr [rax+78h]"], [21, "and edx, 0FFFFFFF7h"], [22, "mov [rax+78h], dl"], [23, "mov rax, [rbp+var_28]"], [24, "mov dword ptr [rax+70h], 0"], [25, "mov rax, [rbp+var_28]"], [26, "movzx edx, byte ptr [rax+78h]"], [27, "and edx, 0FFFFFFFEh"], [28, "mov [rax+78h], dl"], [29, "mov rax, [rbp+var_28]"], [30, "mov byte ptr [rax+38h], 0"], [31, "mov rax, [rbp+var_28]"], [32, "movzx eax, byte ptr [rax+38h]"], [33, "mov [rbp+var_9], al"], [34, "mov rax, [rbp+var_30]"], [35, "movzx edx, byte ptr [rax+0Eh]"], [36, "mov rax, [rbp+var_28]"], [37, "mov [rax+38h], dl"], [38, "mov rax, [rbp+var_30]"], [39, "mov edx, [rax+4]"], [40, "mov rax, [rbp+var_28]"], [41, "mov [rax+3Ch], edx"], [42, "mov rax, [rbp+var_28]"], [43, "mov rax, [rax+88h]"], [44, "mov [rbp+var_18], rax"], [45, "cmp [rbp+var_18], 0"], [46, "jz loc_404964"], [47, "mov rax, [rbp+var_18]"], [48, "mov rdi, rax"], [49, "call sub_402D98"], [50, "mov cs:qword_4A55F8, rax"], [51, "mov rax, cs:qword_4A55F8"], [52, "test rax, rax"], [53, "jz loc_404967"], [54, "mov rax, [rbp+var_30]"], [55, "movzx eax, byte ptr [rax+0Eh]"], [56, "test al, al"], [57, "jz short loc_404142"], [58, "mov rax, [rbp+var_30]"], [59, "mov word ptr [rax+0Ch], 0"], [60, "mov rax, [rbp+var_18]"], [61, "mov rdi, rax"], [62, "call sub_402D98"], [63, "mov cs:qword_4A55F8, rax"], [64, "mov rax, cs:qword_4A55F8"], [65, "test rax, rax"], [66, "jz loc_40496A"], [67, "mov rax, [rbp+var_30]"], [68, "movzx eax, byte ptr [rax+0Eh]"], [69, "cmp al, 1"], [70, "jnz loc_404306"], [71, "cmp [rbp+var_9], 0"], [72, "jnz loc_404306"], [73, "call sub_416B72"], [74, "mov rdx, [rbp+var_28]"], [75, "mov [rdx+70h], eax"], [76, "mov rax, [rbp+var_30]"], [77, "mov eax, [rax+4]"], [78, "cmp eax, 0Ah"], [79, "jnz loc_40424D"], [80, "mov [rbp+var_19], 0"], [81, "mov rax, cs:qword_4A55F8"], [82, "mov rcx, [rax+30h]"], [83, "mov rax, cs:qword_4A55F8"], [84, "lea rdx, [rbp+var_19]"], [85, "mov esi, 19h"], [86, "mov rdi, rax"], [87, "call rcx"], [88, "mov rax, [rbp+var_18]"], [89, "mov rdi, rax"], [90, "call sub_402DEF"], [91, "test al, al"], [92, "jnz short loc_4041DE"], [93, "movzx eax, [rbp+var_19]"], [94, "xor eax, 1"], [95, "test al, al"], [96, "jz loc_40483D"], [97, "mov rax, cs:qword_4A55F8"], [98, "mov rcx, [rax+30h]"], [99, "mov rax, cs:qword_4A55F8"], [100, "mov edx, 0"], [101, "mov esi, 0Bh"], [102, "mov rdi, rax"], [103, "call rcx"], [104, "mov rax, [rbp+var_28]"], [105, "add rax, 30h "], [106, "mov rdi, rax"], [107, "call sub_4066B5"], [108, "test al, al"], [109, "jnz loc_40496D"], [110, "mov rax, cs:qword_4A55F8"], [111, "mov edx, 0"], [112, "mov esi, 0"], [113, "mov rdi, rax"], [114, "call sub_40C088"], [115, "mov rax, [rbp+var_28]"], [116, "add rax, 30h "], [117, "mov rdi, rax"], [118, "call sub_4066B5"], [119, "test al, al"], [120, "jz loc_40483D"], [121, "jmp locret_40498C"], [122, "mov rax, [rbp+var_30]"], [123, "mov eax, [rax+4]"], [124, "cmp eax, 14h"], [125, "jnz short loc_404273"], [126, "mov rax, [rbp+var_30]"], [127, "movzx eax, word ptr [rax+0Ch]"], [128, "sub eax, 1"], [129, "mov edx, eax"], [130, "mov rax, [rbp+var_30]"], [131, "mov [rax+0Ch], dx"], [132, "jmp loc_40483D"], [133, "mov rax, [rbp+var_30]"], [134, "mov eax, [rax+4]"], [135, "cmp eax, 13h"], [136, "jnz short loc_404299"], [137, "mov rax, [rbp+var_30]"], [138, "movzx eax, word ptr [rax+0Ch]"], [139, "add eax, 1"], [140, "mov edx, eax"], [141, "mov rax, [rbp+var_30]"], [142, "mov [rax+0Ch], dx"], [143, "jmp loc_40483D"], [144, "mov rax, [rbp+var_30]"], [145, "mov eax, [rax+4]"], [146, "cmp eax, 1Bh"], [147, "jnz short loc_4042EC"], [148, "mov rax, [rbp+var_18]"], [149, "mov esi, 1Bh"], [150, "mov rdi, rax"], [151, "call sub_402BA9"], [152, "mov rax, cs:qword_4A55F8"], [153, "mov edx, 0"], [154, "mov esi, 14h"], [155, "mov rdi, rax"], [156, "call sub_40C088"], [157, "mov rax, [rbp+var_28]"], [158, "add rax, 30h "], [159, "mov rdi, rax"], [160, "call sub_4066B5"], [161, "test al, al"], [162, "jz loc_40483D"], [163, "jmp locret_40498C"], [164, "mov rax, [rbp+var_30]"], [165, "mov edx, [rax+4]"], [166, "mov rax, [rbp+var_18]"], [167, "mov esi, edx"], [168, "mov rdi, rax"], [169, "call sub_402BA9"], [170, "jmp loc_40483D"], [171, "mov rax, [rbp+var_30]"], [172, "movzx eax, byte ptr [rax+0Eh]"], [173, "cmp al, 1"], [174, "jnz loc_404599"], [175, "cmp [rbp+var_9], 1"], [176, "jnz loc_404599"], [177, "mov rax, [rbp+var_28]"], [178, "movzx eax, byte ptr [rax+78h]"], [179, "and eax, 1"], [180, "test al, al"], [181, "jnz loc_404460"], [182, "mov rax, [rbp+var_28]"], [183, "mov eax, [rax+70h]"], [184, "mov edi, eax"], [185, "call sub_416B96"], [186, "mov rdx, [rbp+var_28]"], [187, "movzx edx, word ptr [rdx+2Ch]"], [188, "movzx edx, dx"], [189, "cmp eax, edx"], [190, "jbe loc_404460"], [191, "mov rax, [rbp+var_28]"], [192, "movzx edx, byte ptr [rax+78h]"], [193, "or edx, 1"], [194, "mov [rax+78h], dl"], [195, "call sub_416B72"], [196, "mov rdx, [rbp+var_28]"], [197, "mov [rdx+74h], eax"], [198, "mov rax, [rbp+var_30]"], [199, "mov eax, [rax+4]"], [200, "cmp eax, 0Ah"], [201, "jnz loc_40444D"], [202, "mov [rbp+var_1A], 0"], [203, "mov rax, cs:qword_4A55F8"], [204, "mov rcx, [rax+30h]"], [205, "mov rax, cs:qword_4A55F8"], [206, "lea rdx, [rbp+var_1A]"], [207, "mov esi, 19h"], [208, "mov rdi, rax"], [209, "call rcx"], [210, "movzx eax, [rbp+var_1A]"], [211, "test al, al"], [212, "jz short loc_4043E3"], [213, "mov rax, [rbp+var_18]"], [214, "mov rdi, rax"], [215, "call sub_42AFF7"], [216, "xor eax, 1"], [217, "test al, al"], [218, "jz loc_40444D"], [219, "mov rax, [rbp+var_18]"], [220, "mov rdi, rax"], [221, "call sub_402DEF"], [222, "xor eax, 1"], [223, "movzx edx, al"], [224, "mov rax, [rbp+var_18]"], [225, "mov esi, edx"], [226, "mov rdi, rax"], [227, "call sub_402C44"], [228, "jmp short loc_40444D"], [229, "mov rax, cs:qword_4A55F8"], [230, "mov rcx, [rax+30h]"], [231, "mov rax, cs:qword_4A55F8"], [232, "mov edx, 0"], [233, "mov esi, 0Fh"], [234, "mov rdi, rax"], [235, "call rcx"], [236, "mov rax, [rbp+var_28]"], [237, "add rax, 30h "], [238, "mov rdi, rax"], [239, "call sub_4066B5"], [240, "test al, al"], [241, "jnz loc_404970"], [242, "mov rax, cs:qword_4A55F8"], [243, "mov edx, 0"], [244, "mov esi, 4"], [245, "mov rdi, rax"], [246, "call sub_40C088"], [247, "mov rax, [rbp+var_28]"], [248, "add rax, 30h "], [249, "mov rdi, rax"], [250, "call sub_4066B5"], [251, "test al, al"], [252, "jnz loc_404973"], [253, "mov rax, [rbp+var_28]"], [254, "movzx edx, byte ptr [rax+78h]"], [255, "or edx, 1"], [256, "mov [rax+78h], dl"], [257, "jmp loc_404840"], [258, "mov rax, [rbp+var_28]"], [259, "movzx eax, byte ptr [rax+78h]"], [260, "and eax, 1"], [261, "test al, al"], [262, "jz loc_404840"], [263, "mov rax, [rbp+var_28]"], [264, "mov eax, [rax+74h]"], [265, "mov edi, eax"], [266, "call sub_416B96"], [267, "mov rdx, [rbp+var_28]"], [268, "movzx edx, word ptr [rdx+2Eh]"], [269, "movzx edx, dx"], [270, "cmp eax, edx"], [271, "jbe loc_404840"], [272, "call sub_416B72"], [273, "mov rdx, [rbp+var_28]"], [274, "mov [rdx+74h], eax"], [275, "mov rax, [rbp+var_30]"], [276, "mov eax, [rax+4]"], [277, "cmp eax, 0Ah"], [278, "jnz short loc_40451B"], [279, "mov rax, cs:qword_4A55F8"], [280, "mov rcx, [rax+30h]"], [281, "mov rax, cs:qword_4A55F8"], [282, "mov edx, 0"], [283, "mov esi, 10h"], [284, "mov rdi, rax"], [285, "call rcx"], [286, "mov rax, [rbp+var_28]"], [287, "add rax, 30h "], [288, "mov rdi, rax"], [289, "call sub_4066B5"], [290, "test al, al"], [291, "jnz loc_404976"], [292, "mov rax, cs:qword_4A55F8"], [293, "mov edx, 0"], [294, "mov esi, 5"], [295, "mov rdi, rax"], [296, "call sub_40C088"], [297, "mov rax, [rbp+var_28]"], [298, "add rax, 30h "], [299, "mov rdi, rax"], [300, "call sub_4066B5"], [301, "test al, al"], [302, "jz loc_404840"], [303, "jmp locret_40498C"], [304, "mov rax, [rbp+var_30]"], [305, "mov eax, [rax+4]"], [306, "cmp eax, 14h"], [307, "jnz short loc_404541"], [308, "mov rax, [rbp+var_30]"], [309, "movzx eax, word ptr [rax+0Ch]"], [310, "sub eax, 1"], [311, "mov edx, eax"], [312, "mov rax, [rbp+var_30]"], [313, "mov [rax+0Ch], dx"], [314, "jmp loc_404840"], [315, "mov rax, [rbp+var_30]"], [316, "mov eax, [rax+4]"], [317, "cmp eax, 13h"], [318, "jnz short loc_404567"], [319, "mov rax, [rbp+var_30]"], [320, "movzx eax, word ptr [rax+0Ch]"], [321, "add eax, 1"], [322, "mov edx, eax"], [323, "mov rax, [rbp+var_30]"], [324, "mov [rax+0Ch], dx"], [325, "jmp loc_404840"], [326, "mov rax, [rbp+var_30]"], [327, "mov edx, [rax+4]"], [328, "mov rax, [rbp+var_18]"], [329, "mov esi, edx"], [330, "mov rdi, rax"], [331, "call sub_402BA9"], [332, "mov rax, [rbp+var_28]"], [333, "add rax, 30h "], [334, "mov rdi, rax"], [335, "call sub_4066B5"], [336, "test al, al"], [337, "jz loc_404840"], [338, "jmp locret_40498C"], [339, "mov rax, [rbp+var_30]"], [340, "movzx eax, byte ptr [rax+0Eh]"], [341, "test al, al"], [342, "jnz loc_404841"], [343, "cmp [rbp+var_9], 1"], [344, "jnz loc_404841"], [345, "mov rax, [rbp+var_30]"], [346, "mov eax, [rax+4]"], [347, "cmp eax, 0Ah"], [348, "jnz loc_404822"], [349, "mov [rbp+var_1B], 0"], [350, "mov rax, cs:qword_4A55F8"], [351, "mov rcx, [rax+30h]"], [352, "mov rax, cs:qword_4A55F8"], [353, "lea rdx, [rbp+var_1B]"], [354, "mov esi, 19h"], [355, "mov rdi, rax"], [356, "call rcx"], [357, "movzx eax, [rbp+var_1B]"], [358, "xor eax, 1"], [359, "test al, al"], [360, "jz loc_4046D6"], [361, "mov rax, cs:qword_4A55F8"], [362, "mov rcx, [rax+30h]"], [363, "mov rax, cs:qword_4A55F8"], [364, "mov edx, 0"], [365, "mov esi, 0Eh"], [366, "mov rdi, rax"], [367, "call rcx"], [368, "mov rax, [rbp+var_28]"], [369, "add rax, 30h "], [370, "mov rdi, rax"], [371, "call sub_4066B5"], [372, "test al, al"], [373, "jnz loc_404979"], [374, "mov rax, [rbp+var_28]"], [375, "movzx eax, byte ptr [rax+78h]"], [376, "and eax, 1"], [377, "test al, al"], [378, "jnz short loc_404657"], [379, "mov rax, cs:qword_4A55F8"], [380, "mov edx, 0"], [381, "mov esi, 3"], [382, "mov rdi, rax"], [383, "call sub_40C088"], [384, "mov rax, [rbp+var_28]"], [385, "add rax, 30h "], [386, "mov rdi, rax"], [387, "call sub_4066B5"], [388, "test al, al"], [389, "jnz loc_40497C"], [390, "mov rax, cs:qword_4A55F8"], [391, "mov edx, 0"], [392, "mov esi, 6"], [393, "mov rdi, rax"], [394, "call sub_40C088"], [395, "mov rax, [rbp+var_28]"], [396, "add rax, 30h "], [397, "mov rdi, rax"], [398, "call sub_4066B5"], [399, "test al, al"], [400, "jnz loc_40497F"], [401, "mov rax, cs:qword_4A55F8"], [402, "mov edx, 0"], [403, "mov esi, 7"], [404, "mov rdi, rax"], [405, "call sub_40C088"], [406, "mov rax, [rbp+var_28]"], [407, "add rax, 30h "], [408, "mov rdi, rax"], [409, "call sub_4066B5"], [410, "test al, al"], [411, "jz loc_404822"], [412, "jmp locret_40498C"], [413, "mov rax, [rbp+var_18]"], [414, "movzx eax, byte ptr [rax+28h]"], [415, "and eax, 2"], [416, "test al, al"], [417, "jz loc_4047EB"], [418, "mov rax, [rbp+var_28]"], [419, "movzx eax, byte ptr [rax+78h]"], [420, "and eax, 1"], [421, "test al, al"], [422, "jz short loc_40470C"], [423, "mov rax, [rbp+var_18]"], [424, "mov rdi, rax"], [425, "call sub_42AFF7"], [426, "test al, al"], [427, "jz loc_404822"], [428, "mov rax, cs:qword_4A55F8"], [429, "mov rcx, [rax+30h]"], [430, "mov rax, cs:qword_4A55F8"], [431, "mov edx, 0"], [432, "mov esi, 0Eh"], [433, "mov rdi, rax"], [434, "call rcx"], [435, "mov rax, [rbp+var_28]"], [436, "add rax, 30h "], [437, "mov rdi, rax"], [438, "call sub_4066B5"], [439, "test al, al"], [440, "jnz loc_404982"], [441, "mov rax, cs:qword_4A55F8"], [442, "mov edx, 0"], [443, "mov esi, 3"], [444, "mov rdi, rax"], [445, "call sub_40C088"], [446, "mov rax, [rbp+var_28]"], [447, "add rax, 30h "], [448, "mov rdi, rax"], [449, "call sub_4066B5"], [450, "test al, al"], [451, "jnz loc_404985"], [452, "mov rax, cs:qword_4A55F8"], [453, "mov edx, 0"], [454, "mov esi, 6"], [455, "mov rdi, rax"], [456, "call sub_40C088"], [457, "mov rax, [rbp+var_28]"], [458, "add rax, 30h "], [459, "mov rdi, rax"], [460, "call sub_4066B5"], [461, "test al, al"], [462, "jnz loc_404988"], [463, "mov rax, cs:qword_4A55F8"], [464, "mov edx, 0"], [465, "mov esi, 7"], [466, "mov rdi, rax"], [467, "call sub_40C088"], [468, "mov rax, [rbp+var_28]"], [469, "add rax, 30h "], [470, "mov rdi, rax"], [471, "call sub_4066B5"], [472, "test al, al"], [473, "jnz loc_40498B"], [474, "mov rax, [rbp+var_18]"], [475, "mov esi, 0Ah"], [476, "mov rdi, rax"], [477, "call sub_402BA9"], [478, "jmp short loc_404822"], [479, "movzx eax, [rbp+var_1B]"], [480, "test al, al"], [481, "jz short loc_404822"], [482, "mov rax, [rbp+var_18]"], [483, "movzx eax, byte ptr [rax+28h]"], [484, "and eax, 2"], [485, "test al, al"], [486, "jnz short loc_404822"], [487, "mov rax, [rbp+var_28]"], [488, "movzx eax, byte ptr [rax+78h]"], [489, "and eax, 1"], [490, "test al, al"], [491, "jnz short loc_404822"], [492, "mov rax, [rbp+var_18]"], [493, "mov esi, 1"], [494, "mov rdi, rax"], [495, "call sub_402C44"], [496, "mov rax, [rbp+var_28]"], [497, "mov dword ptr [rax+70h], 0"], [498, "mov rax, [rbp+var_28]"], [499, "movzx edx, byte ptr [rax+78h]"], [500, "and edx, 0FFFFFFFEh"], [501, "mov [rax+78h], dl"], [502, "jmp short loc_404841"], [503, "nop"], [504, "jmp short loc_404841"], [505, "nop"], [506, "mov cs:qword_4A55F8, 0"], [507, "mov rax, [rbp+var_30]"], [508, "movzx eax, word ptr [rax+0Ch]"], [509, "test ax, ax"], [510, "jz locret_40498C"], [511, "mov rax, [rbp+var_18]"], [512, "mov rdi, rax"], [513, "call sub_402DEF"], [514, "test al, al"], [515, "jz loc_4048F3"], [516, "mov rax, [rbp+var_30]"], [517, "movzx eax, word ptr [rax+0Ch]"], [518, "test ax, ax"], [519, "jns short loc_4048B1"], [520, "mov [rbp+var_4], 0"], [521, "jmp short loc_40489C"], [522, "mov rax, [rbp+var_18]"], [523, "mov esi, 14h"], [524, "mov rdi, rax"], [525, "call sub_402BA9"], [526, "add [rbp+var_4], 1"], [527, "mov rax, [rbp+var_30]"], [528, "movzx eax, word ptr [rax+0Ch]"], [529, "cwde"], [530, "neg eax"], [531, "cmp [rbp+var_4], eax"], [532, "jl short loc_404887"], [533, "jmp locret_40498C"], [534, "mov rax, [rbp+var_30]"], [535, "movzx eax, word ptr [rax+0Ch]"], [536, "test ax, ax"], [537, "jle locret_40498C"], [538, "mov [rbp+var_4], 0"], [539, "jmp short loc_4048E0"], [540, "mov rax, [rbp+var_18]"], [541, "mov esi, 13h"], [542, "mov rdi, rax"], [543, "call sub_402BA9"], [544, "add [rbp+var_4], 1"], [545, "mov rax, [rbp+var_30]"], [546, "movzx eax, word ptr [rax+0Ch]"], [547, "cwde"], [548, "cmp [rbp+var_4], eax"], [549, "jl short loc_4048CB"], [550, "jmp locret_40498C"], [551, "mov rax, [rbp+var_30]"], [552, "movzx eax, word ptr [rax+0Ch]"], [553, "test ax, ax"], [554, "jns short loc_40492B"], [555, "mov [rbp+var_8], 0"], [556, "jmp short loc_404919"], [557, "mov rax, [rbp+var_18]"], [558, "mov rdi, rax"], [559, "call sub_402B4B"], [560, "add [rbp+var_8], 1"], [561, "mov rax, [rbp+var_30]"], [562, "movzx eax, word ptr [rax+0Ch]"], [563, "cwde"], [564, "neg eax"], [565, "cmp [rbp+var_8], eax"], [566, "jl short loc_404909"], [567, "jmp short locret_40498C"], [568, "mov rax, [rbp+var_30]"], [569, "movzx eax, word ptr [rax+0Ch]"], [570, "test ax, ax"], [571, "jle short locret_40498C"], [572, "mov [rbp+var_8], 0"], [573, "jmp short loc_404951"], [574, "mov rax, [rbp+var_18]"], [575, "mov rdi, rax"], [576, "call sub_402B26"], [577, "add [rbp+var_8], 1"], [578, "mov rax, [rbp+var_30]"], [579, "movzx eax, word ptr [rax+0Ch]"], [580, "cwde"], [581, "cmp [rbp+var_8], eax"], [582, "jl short loc_404941"], [583, "jmp short locret_40498C"], [584, "nop"], [585, "jmp short locret_40498C"], [586, "nop"], [587, "jmp short locret_40498C"], [588, "nop"], [589, "jmp short locret_40498C"], [590, "nop"], [591, "jmp short locret_40498C"], [592, "nop"], [593, "jmp short locret_40498C"], [594, "nop"], [595, "jmp short locret_40498C"], [596, "nop"], [597, "jmp short locret_40498C"], [598, "nop"], [599, "jmp short locret_40498C"], [600, "nop"], [601, "jmp short locret_40498C"], [602, "nop"], [603, "jmp short locret_40498C"], [604, "nop"], [605, "jmp short locret_40498C"], [606, "nop"], [607, "jmp short locret_40498C"], [608, "nop"], [609, "jmp short locret_40498C"], [610, "nop"], [611, "jmp short locret_40498C"], [612, "nop"], [613, "leave"], [614, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 7], [9, 3], [10, 9], [11, 10], [12, 11], [13, 12], [14, 3], [15, 14], [16, 15], [17, 16], [18, 17], [19, 3], [20, 19], [21, 20], [22, 19], [22, 21], [23, 3], [24, 23], [25, 3], [26, 25], [26, 24], [26, 22], [27, 26], [28, 25], [28, 27], [29, 3], [30, 29], [31, 3], [32, 41], [32, 22], [32, 31], [32, 30], [32, 24], [32, 28], [32, 37], [33, 32], [34, 4], [35, 41], [35, 22], [35, 30], [35, 34], [35, 24], [35, 28], [35, 37], [36, 3], [37, 35], [37, 36], [38, 4], [39, 38], [39, 37], [40, 3], [41, 40], [41, 39], [42, 3], [43, 41], [43, 42], [44, 43], [45, 44], [46, 45], [47, 44], [48, 47], [50, 49], [51, 50], [52, 51], [53, 52], [54, 4], [55, 24], [55, 28], [55, 37], [55, 41], [55, 22], [55, 54], [55, 30], [56, 55], [57, 56], [58, 4], [59, 58], [60, 44], [61, 60], [63, 62], [64, 63], [65, 64], [66, 65], [67, 4], [68, 41], [68, 59], [68, 22], [68, 30], [68, 67], [68, 24], [68, 28], [68, 37], [69, 68], [70, 69], [71, 33], [72, 71], [74, 3], [75, 74], [75, 73], [76, 4], [77, 76], [77, 75], [78, 77], [79, 78], [81, 63], [82, 24], [82, 28], [82, 37], [82, 41], [82, 59], [82, 22], [82, 30], [82, 81], [82, 75], [83, 63], [84, 74], [84, 80], [86, 83], [87, 82], [88, 44], [89, 88], [91, 90], [92, 91], [93, 80], [94, 93], [95, 94], [96, 95], [97, 63], [98, 37], [98, 41], [98, 22], [98, 97], [98, 59], [98, 30], [98, 75], [98, 24], [98, 28], [99, 63], [102, 99], [103, 98], [104, 3], [105, 104], [106, 105], [108, 107], [109, 108], [110, 63], [113, 110], [115, 3], [116, 115], [117, 116], [119, 118], [120, 119], [122, 4], [123, 75], [123, 24], [123, 28], [123, 37], [123, 41], [123, 22], [123, 59], [123, 30], [123, 122], [124, 123], [125, 124], [126, 4], [127, 30], [127, 131], [127, 126], [127, 75], [127, 24], [127, 28], [127, 37], [127, 41], [127, 22], [127, 59], [128, 127], [129, 128], [130, 4], [131, 130], [131, 129], [133, 4], [134, 75], [134, 24], [134, 28], [134, 37], [134, 41], [134, 59], [134, 22], [134, 30], [134, 133], [135, 134], [136, 135], [137, 4], [138, 59], [138, 30], [138, 142], [138, 137], [138, 75], [138, 24], [138, 28], [138, 37], [138, 41], [138, 22], [139, 138], [140, 139], [141, 4], [142, 140], [142, 141], [144, 4], [145, 75], [145, 28], [145, 37], [145, 41], [145, 144], [145, 22], [145, 59], [145, 30], [145, 24], [146, 145], [147, 146], [148, 44], [150, 148], [152, 63], [155, 152], [157, 3], [158, 157], [159, 158], [161, 160], [162, 161], [164, 4], [165, 30], [165, 164], [165, 24], [165, 75], [165, 28], [165, 37], [165, 41], [165, 22], [165, 59], [166, 44], [167, 165], [168, 166], [171, 4], [172, 28], [172, 37], [172, 41], [172, 171], [172, 22], [172, 59], [172, 30], [172, 24], [173, 172], [174, 173], [175, 33], [176, 175], [177, 3], [178, 24], [178, 177], [178, 28], [178, 37], [178, 41], [178, 22], [178, 59], [178, 30], [179, 178], [180, 179], [181, 180], [182, 3], [183, 182], [183, 28], [183, 37], [183, 41], [183, 22], [183, 59], [183, 30], [183, 24], [184, 183], [186, 3], [187, 59], [187, 30], [187, 24], [187, 186], [187, 28], [187, 37], [187, 41], [187, 22], [188, 187], [189, 185], [189, 188], [190, 189], [191, 3], [192, 197], [192, 30], [192, 24], [192, 191], [192, 28], [192, 37], [192, 41], [192, 22], [192, 194], [192, 59], [193, 192], [194, 191], [194, 193], [196, 3], [197, 196], [197, 195], [198, 4], [199, 198], [199, 197], [200, 199], [201, 200], [203, 63], [204, 41], [204, 22], [204, 194], [204, 203], [204, 59], [204, 197], [204, 30], [204, 24], [204, 28], [204, 37], [205, 63], [206, 202], [206, 196], [208, 205], [209, 204], [210, 202], [211, 210], [212, 211], [213, 44], [214, 213], [216, 215], [217, 216], [218, 217], [219, 44], [220, 219], [222, 221], [223, 222], [224, 44], [225, 223], [226, 224], [229, 63], [230, 197], [230, 30], [230, 24], [230, 229], [230, 28], [230, 37], [230, 194], [230, 41], [230, 59], [230, 22], [231, 63], [234, 231], [235, 230], [236, 3], [237, 236], [238, 237], [240, 239], [241, 240], [242, 63], [245, 242], [247, 3], [248, 247], [249, 248], [251, 250], [252, 251], [253, 3], [254, 24], [254, 28], [254, 256], [254, 37], [254, 194], [254, 41], [254, 59], [254, 22], [254, 253], [254, 197], [254, 30], [255, 254], [256, 253], [256, 255], [258, 3], [259, 37], [259, 41], [259, 59], [259, 22], [259, 258], [259, 30], [259, 24], [259, 28], [260, 259], [261, 260], [262, 261], [263, 3], [264, 41], [264, 59], [264, 22], [264, 30], [264, 263], [264, 24], [264, 28], [264, 37], [265, 264], [267, 3], [268, 24], [268, 28], [268, 37], [268, 41], [268, 59], [268, 22], [268, 30], [268, 267], [269, 268], [270, 269], [270, 266], [271, 270], [273, 3], [274, 273], [274, 272], [275, 4], [276, 275], [276, 274], [277, 276], [278, 277], [279, 63], [280, 41], [280, 59], [280, 22], [280, 30], [280, 24], [280, 28], [280, 279], [280, 274], [280, 37], [281, 63], [284, 281], [285, 280], [286, 3], [287, 286], [288, 287], [290, 289], [291, 290], [292, 63], [295, 292], [297, 3], [298, 297], [299, 298], [301, 300], [302, 301], [304, 4], [305, 37], [305, 41], [305, 59], [305, 274], [305, 22], [305, 30], [305, 304], [305, 24], [305, 28], [306, 305], [307, 306], [308, 4], [309, 313], [309, 308], [309, 24], [309, 28], [309, 37], [309, 274], [309, 41], [309, 59], [309, 22], [309, 30], [310, 309], [311, 310], [312, 4], [313, 311], [313, 312], [315, 4], [316, 41], [316, 59], [316, 315], [316, 22], [316, 30], [316, 24], [316, 28], [316, 37], [316, 274], [317, 316], [318, 317], [319, 4], [320, 24], [320, 28], [320, 37], [320, 274], [320, 41], [320, 59], [320, 324], [320, 319], [320, 22], [320, 30], [321, 320], [322, 321], [323, 4], [324, 323], [324, 322], [326, 4], [327, 41], [327, 59], [327, 22], [327, 30], [327, 326], [327, 24], [327, 28], [327, 37], [327, 274], [328, 44], [329, 327], [330, 328], [332, 3], [333, 332], [334, 333], [336, 335], [337, 336], [339, 4], [340, 22], [340, 30], [340, 59], [340, 24], [340, 28], [340, 37], [340, 339], [340, 41], [341, 340], [342, 341], [343, 33], [344, 343], [345, 4], [346, 41], [346, 59], [346, 22], [346, 30], [346, 345], [346, 24], [346, 28], [346, 37], [347, 346], [348, 347], [350, 63], [351, 41], [351, 59], [351, 22], [351, 30], [351, 350], [351, 24], [351, 28], [351, 37], [352, 63], [353, 349], [353, 39], [355, 352], [356, 351], [357, 349], [358, 357], [359, 358], [360, 359], [361, 63], [362, 361], [362, 41], [362, 59], [362, 22], [362, 30], [362, 24], [362, 28], [362, 37], [363, 63], [366, 363], [367, 362], [368, 3], [369, 368], [370, 369], [372, 371], [373, 372], [374, 3], [375, 30], [375, 374], [375, 24], [375, 28], [375, 37], [375, 41], [375, 22], [375, 59], [376, 375], [377, 376], [378, 377], [379, 63], [382, 379], [384, 3], [385, 384], [386, 385], [388, 387], [389, 388], [390, 63], [393, 390], [395, 3], [396, 395], [397, 396], [399, 398], [400, 399], [401, 63], [404, 401], [406, 3], [407, 406], [408, 407], [410, 409], [411, 410], [413, 44], [414, 413], [414, 41], [414, 59], [414, 22], [414, 30], [414, 24], [414, 28], [414, 37], [415, 414], [416, 415], [417, 416], [418, 3], [419, 59], [419, 30], [419, 24], [419, 28], [419, 37], [419, 41], [419, 418], [419, 22], [420, 419], [421, 420], [422, 421], [423, 44], [424, 423], [426, 425], [427, 426], [428, 63], [429, 24], [429, 428], [429, 28], [429, 37], [429, 41], [429, 22], [429, 59], [429, 30], [430, 63], [433, 430], [434, 429], [435, 3], [436, 435], [437, 436], [439, 438], [440, 439], [441, 63], [444, 441], [446, 3], [447, 446], [448, 447], [450, 449], [451, 450], [452, 63], [455, 452], [457, 3], [458, 457], [459, 458], [461, 460], [462, 461], [463, 63], [466, 463], [468, 3], [469, 468], [470, 469], [472, 471], [473, 472], [474, 44], [476, 474], [479, 349], [480, 479], [481, 480], [482, 44], [483, 28], [483, 37], [483, 41], [483, 22], [483, 482], [483, 59], [483, 30], [483, 24], [484, 483], [485, 484], [486, 485], [487, 3], [488, 28], [488, 37], [488, 41], [488, 22], [488, 487], [488, 59], [488, 30], [488, 24], [489, 488], [490, 489], [491, 490], [492, 44], [494, 492], [496, 3], [497, 496], [498, 3], [499, 28], [499, 497], [499, 498], [500, 499], [501, 500], [501, 498], [507, 4], [508, 30], [508, 313], [508, 24], [508, 28], [508, 131], [508, 256], [508, 507], [508, 75], [508, 497], [508, 37], [508, 194], [508, 41], [508, 59], [508, 324], [508, 274], [508, 22], [508, 142], [508, 501], [508, 197], [509, 508], [510, 509], [511, 44], [512, 511], [514, 513], [515, 514], [516, 4], [517, 142], [517, 501], [517, 197], [517, 30], [517, 313], [517, 24], [517, 28], [517, 131], [517, 256], [517, 516], [517, 75], [517, 497], [517, 37], [517, 194], [517, 41], [517, 59], [517, 324], [517, 274], [517, 22], [518, 517], [519, 518], [522, 44], [524, 522], [526, 520], [526, 526], [527, 4], [528, 142], [528, 501], [528, 197], [528, 30], [528, 313], [528, 24], [528, 527], [528, 28], [528, 131], [528, 256], [528, 75], [528, 497], [528, 37], [528, 194], [528, 41], [528, 59], [528, 324], [528, 274], [528, 22], [530, 528], [531, 530], [531, 520], [531, 526], [532, 531], [534, 4], [535, 24], [535, 131], [535, 256], [535, 75], [535, 28], [535, 37], [535, 194], [535, 41], [535, 59], [535, 274], [535, 22], [535, 534], [535, 497], [535, 142], [535, 501], [535, 324], [535, 197], [535, 30], [535, 313], [536, 535], [537, 536], [540, 44], [542, 540], [544, 544], [544, 538], [545, 4], [546, 75], [546, 313], [546, 24], [546, 545], [546, 28], [546, 37], [546, 131], [546, 256], [546, 274], [546, 497], [546, 194], [546, 41], [546, 59], [546, 324], [546, 22], [546, 30], [546, 142], [546, 501], [546, 197], [548, 538], [548, 546], [548, 544], [549, 548], [551, 4], [552, 197], [552, 75], [552, 313], [552, 24], [552, 28], [552, 37], [552, 131], [552, 256], [552, 274], [552, 497], [552, 194], [552, 41], [552, 59], [552, 324], [552, 22], [552, 30], [552, 551], [552, 142], [552, 501], [553, 552], [554, 553], [557, 44], [558, 557], [560, 560], [560, 555], [561, 4], [562, 28], [562, 37], [562, 131], [562, 256], [562, 274], [562, 497], [562, 194], [562, 41], [562, 59], [562, 324], [562, 22], [562, 561], [562, 30], [562, 142], [562, 501], [562, 197], [562, 75], [562, 313], [562, 24], [564, 562], [565, 560], [565, 555], [565, 564], [566, 565], [568, 4], [569, 30], [569, 142], [569, 197], [569, 75], [569, 313], [569, 568], [569, 24], [569, 28], [569, 37], [569, 131], [569, 256], [569, 274], [569, 497], [569, 501], [569, 194], [569, 41], [569, 59], [569, 324], [569, 22], [570, 569], [571, 570], [574, 44], [575, 574], [577, 572], [577, 577], [578, 4], [579, 197], [579, 75], [579, 313], [579, 578], [579, 24], [579, 37], [579, 131], [579, 256], [579, 274], [579, 497], [579, 501], [579, 194], [579, 41], [579, 59], [579, 324], [579, 28], [579, 22], [579, 30], [579, 142], [581, 577], [581, 572], [581, 579], [582, 581], [614, 461], [614, 43], [614, 52], [614, 290], [614, 564], [614, 536], [614, 439], [614, 301], [614, 530], [614, 251], [614, 372], [614, 65], [614, 450], [614, 570], [614, 161], [614, 399], [614, 12], [614, 410], [614, 546], [614, 119], [614, 240], [614, 388], [614, 509], [614, 472], [614, 108], [614, 579], [614, 336]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/19729148c2fecc0159cbd120947156a1f58505e3a7e54d3fb0c2e0bd24f28bc1_19729148c2fecc0159cbd120947156a1f58505e3a7e54d3fb0c2e0bd24f28bc1.jsonl.gz", "strip_func_name": "sub_40405A", "query": "\n\n\nint __fastcall sub_40405A(__int64 a1, __int64 a2)\n{\n__int64 v2; // rax\nbool v3; // al\nchar v5; // [rsp+15h] [rbp-1Bh] BYREF\nchar v6; // [rsp+16h] [rbp-1Ah] BYREF\nchar v7; // [rsp+17h] [rbp-19h] BYREF\n__int64 v8; // [rsp+18h] [rbp-18h]\nchar v9; // [rsp+27h] [rbp-9h]\nint j; // [rsp+28h] [rbp-8h]\nint i; // [rsp+2Ch] [rbp-4h]\n\nif ( *(_BYTE *)(a2 + 14) != 1 || (LODWORD(v2) = *(_BYTE *)(a1 + 120) & 8, !(_BYTE)v2) )\n{\nif ( (*(_BYTE *)(a1 + 120) & 8) != 0 )\n{\n*(_BYTE *)(a1 + 120) &= 0xF7u;\n*(_DWORD *)(a1 + 112) = 0;\n*(_BYTE *)(a1 + 120) &= 0xFEu;\n*(_BYTE *)(a1 + 56) = 0;\n}\nv9 = *(_BYTE *)(a1 + 56);\n*(_BYTE *)(a1 + 56) = *(_BYTE *)(a2 + 14);\n*(_DWORD *)(a1 + 60) = *(_DWORD *)(a2 + 4);\nv2 = *(_QWORD *)(a1 + 136);\nv8 = v2;\nif ( v2 )\n{\nqword_4A55F8 = sub_402D98(v8);\nLODWORD(v2) = qword_4A55F8;\nif ( qword_4A55F8 )\n{\nif ( *(_BYTE *)(a2 + 14) )\n*(_WORD *)(a2 + 12) = 0;\nqword_4A55F8 = sub_402D98(v8);\nLODWORD(v2) = qword_4A55F8;\nif ( qword_4A55F8 )\n{\nif ( *(_BYTE *)(a2 + 14) == 1 && !v9 )\n{\n*(_DWORD *)(a1 + 112) = sub_416B72();\nswitch ( *(_DWORD *)(a2 + 4) )\n{\ncase 0xA:\nv7 = 0;\n(*(void (__fastcall **)(__int64, __int64, char *))(qword_4A55F8 + 48))(qword_4A55F8, 25LL, &v7);\nif ( sub_402DEF(v8) || v7 != 1 )\n{\n(*(void (__fastcall **)(__int64, __int64, _QWORD))(qword_4A55F8 + 48))(qword_4A55F8, 11LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\nsub_40C088(qword_4A55F8, 0LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\n}\nbreak;\ncase 0x14:\n--*(_WORD *)(a2 + 12);\nbreak;\ncase 0x13:\n++*(_WORD *)(a2 + 12);\nbreak;\ncase 0x1B:\nsub_402BA9(v8, 27);\nsub_40C088(qword_4A55F8, 20LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\nbreak;\ndefault:\nsub_402BA9(v8, *(_DWORD *)(a2 + 4));\nbreak;\n}\ngoto LABEL_73;\n}\nif ( *(_BYTE *)(a2 + 14) == 1 && v9 == 1 )\n{\nif ( (*(_BYTE *)(a1 + 120) & 1) != 0\n|| (unsigned int)sub_416B96(*(unsigned int *)(a1 + 112)) <= *(unsigned __int16 *)(a1 + 44) )\n{\nif ( (*(_BYTE *)(a1 + 120) & 1) != 0\n&& (unsigned int)sub_416B96(*(unsigned int *)(a1 + 116)) > *(unsigned __int16 *)(a1 + 46) )\n{\n*(_DWORD *)(a1 + 116) = sub_416B72();\nswitch ( *(_DWORD *)(a2 + 4) )\n{\ncase 0xA:\n(*(void (__fastcall **)(__int64, __int64, _QWORD))(qword_4A55F8 + 48))(qword_4A55F8, 16LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\nsub_40C088(qword_4A55F8, 5LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\nbreak;\ncase 0x14:\n--*(_WORD *)(a2 + 12);\nbreak;\ncase 0x13:\n++*(_WORD *)(a2 + 12);\nbreak;\ndefault:\nsub_402BA9(v8, *(_DWORD *)(a2 + 4));\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\nbreak;\n}\n}\n}\nelse\n{\n*(_BYTE *)(a1 + 120) |= 1u;\n*(_DWORD *)(a1 + 116) = sub_416B72();\nif ( *(_DWORD *)(a2 + 4) == 10 )\n{\nv6 = 0;\n(*(void (__fastcall **)(__int64, __int64, char *))(qword_4A55F8 + 48))(qword_4A55F8, 25LL, &v6);\nif ( v6 )\n{\nif ( (unsigned __int8)sub_42AFF7(v8) != 1 )\n{\nv3 = sub_402DEF(v8);\nsub_402C44(v8, !v3);\n}\n}\nelse\n{\n(*(void (__fastcall **)(__int64, __int64, _QWORD))(qword_4A55F8 + 48))(qword_4A55F8, 15LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\nsub_40C088(qword_4A55F8, 4LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\n}\n}\n*(_BYTE *)(a1 + 120) |= 1u;\n}\ngoto LABEL_73;\n}\nif ( !*(_BYTE *)(a2 + 14) && v9 == 1 )\n{\nif ( *(_DWORD *)(a2 + 4) == 10 )\n{\nv5 = 0;\n(*(void (__fastcall **)(__int64, __int64, char *))(qword_4A55F8 + 48))(qword_4A55F8, 25LL, &v5);\nif ( v5 != 1 )\n{\n(*(void (__fastcall **)(__int64, __int64, _QWORD))(qword_4A55F8 + 48))(qword_4A55F8, 14LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\nif ( (*(_BYTE *)(a1 + 120) & 1) == 0 )\nsub_40C088(qword_4A55F8, 3LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\nsub_40C088(qword_4A55F8, 6LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\nsub_40C088(qword_4A55F8, 7LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\n}\nelse if ( (*(_BYTE *)(v8 + 40) & 2) != 0 )\n{\nif ( (*(_BYTE *)(a1 + 120) & 1) == 0 || (unsigned __int8)sub_42AFF7(v8) )\n{\n(*(void (__fastcall **)(__int64, __int64, _QWORD))(qword_4A55F8 + 48))(qword_4A55F8, 14LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\nsub_40C088(qword_4A55F8, 3LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\nsub_40C088(qword_4A55F8, 6LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\nsub_40C088(qword_4A55F8, 7LL, 0LL);\nLODWORD(v2) = sub_4066B5(a1 + 48);\nif ( (_BYTE)v2 )\nreturn v2;\nsub_402BA9(v8, 10);\n}\n}\nelse if ( v5 && (*(_BYTE *)(v8 + 40) & 2) == 0 && (*(_BYTE *)(a1 + 120) & 1) == 0 )\n{\nsub_402C44(v8, 1u);\n}\n}\n*(_DWORD *)(a1 + 112) = 0;\n*(_BYTE *)(a1 + 120) &= 0xFEu;\n}\nLABEL_73:\nqword_4A55F8 = 0LL;\nLODWORD(v2) = *(unsigned __int16 *)(a2 + 12);\nif ( (_WORD)v2 )\n{\nif ( sub_402DEF(v8) )\n{\nif ( *(__int16 *)(a2 + 12) >= 0 )\n{\nLODWORD(v2) = *(unsigned __int16 *)(a2 + 12);\nif ( (__int16)v2 > 0 )\n{\nfor ( i = 0; ; ++i )\n{\nLODWORD(v2) = *(__int16 *)(a2 + 12);\nif ( i >= (__int16)v2 )\nbreak;\nsub_402BA9(v8, 19);\n}\n}\n}\nelse\n{\nfor ( i = 0; ; ++i )\n{\nLODWORD(v2) = -*(__int16 *)(a2 + 12);\nif ( i >= (int)v2 )\nbreak;\nsub_402BA9(v8, 20);\n}\n}\n}\nelse if ( *(__int16 *)(a2 + 12) >= 0 )\n{\nLODWORD(v2) = *(unsigned __int16 *)(a2 + 12);\nif ( (__int16)v2 > 0 )\n{\nfor ( j = 0; ; ++j )\n{\nLODWORD(v2) = *(__int16 *)(a2 + 12);\nif ( j >= (__int16)v2 )\nbreak;\nsub_402B26(v8);\n}\n}\n}\nelse\n{\nfor ( j = 0; ; ++j )\n{\nLODWORD(v2) = -*(__int16 *)(a2 + 12);\nif ( j >= (int)v2 )\nbreak;\nsub_402B4B(v8);\n}\n}\n}\nreturn v2;\n}\n}\n}\n}\nreturn v2;\n}\n\n\n\nQ:[a2,v5,v6,v7,v8,v9,j,i,sub_40405A,sub_402D98,sub_416B72,sub_402DEF,sub_4066B5,sub_40C088,sub_402BA9,sub_416B96,sub_42AFF7,sub_402C44,sub_402B26,sub_402B4B,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'data', 'v5': 'editable_1', 'v6': 'editable_0', 'v7': 'editable', 'v8': 'g', 'v9': 'last_state', 'j': 's_0', 'i': 's', 'sub_40405A': 'indev_encoder_proc', 'sub_402D98': 'lv_group_get_focused', 'sub_416B72': 'lv_tick_get', 'sub_402DEF': 'lv_group_get_editing', 'sub_4066B5': 'indev_reset_check', 'sub_40C088': 'lv_event_send', 'sub_402BA9': 'lv_group_send_data', 'sub_416B96': 'lv_tick_elaps', 'sub_42AFF7': '_lv_ll_is_empty', 'sub_402C44': 'lv_group_set_editing', 'sub_402B26': 'lv_group_focus_next', 'sub_402B4B': 'lv_group_focus_prev'}"}
midi_controller
3bc83c484b09b35b792612de6808530b21a9a113b7e13f49ed42eef1147870ee
alsa-project
alsa-tools
NA
int midi_controller(int c, int v) { int v2; if (! seq) return 0; if(c<0 || c>127) return 0; if(v<0) v=0; else if(v>96) v=96; v2=slider2midi[v]; #if 0 fprintf(stderr, "midi_controller(%i,%i)->%i\n",c,v,v2); #endif do_controller(c,v2); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40F3F5", "function_addr": 4256757, "binary_name": "3bc83c484b09b35b792612de6808530b21a9a113b7e13f49ed42eef1147870ee.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_14], edi"], [4, "mov [rbp+var_18], esi"], [5, "mov rax, cs:qword_422EF0"], [6, "test rax, rax"], [7, "jnz short loc_40F416"], [8, "mov eax, 0"], [9, "jmp short locret_40F471"], [10, "cmp [rbp+var_14], 0"], [11, "js short loc_40F422"], [12, "cmp [rbp+var_14], 7Fh"], [13, "jle short loc_40F429"], [14, "mov eax, 0"], [15, "jmp short locret_40F471"], [16, "cmp [rbp+var_18], 0"], [17, "jns short loc_40F438"], [18, "mov [rbp+var_18], 0"], [19, "jmp short loc_40F445"], [20, "cmp [rbp+var_18], 60h "], [21, "jle short loc_40F445"], [22, "mov [rbp+var_18], 60h "], [23, "mov rdx, cs:qword_422EE8"], [24, "mov eax, [rbp+var_18]"], [25, "cdqe"], [26, "shl rax, 2"], [27, "add rax, rdx"], [28, "mov eax, [rax]"], [29, "mov [rbp+var_4], eax"], [30, "mov edx, [rbp+var_4]"], [31, "mov eax, [rbp+var_14]"], [32, "mov esi, edx"], [33, "mov edi, eax"], [34, "call sub_40F331"], [35, "mov eax, 0"], [36, "leave"], [37, "retn"]], "data_dep": [[6, 5], [7, 6], [10, 3], [11, 10], [12, 3], [13, 12], [16, 4], [17, 16], [20, 4], [21, 20], [24, 4], [24, 22], [24, 18], [26, 24], [27, 23], [27, 26], [28, 27], [29, 28], [30, 29], [31, 3], [32, 30], [33, 31], [37, 8], [37, 14], [37, 35]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3bc83c484b09b35b792612de6808530b21a9a113b7e13f49ed42eef1147870ee_3bc83c484b09b35b792612de6808530b21a9a113b7e13f49ed42eef1147870ee.jsonl.gz", "strip_func_name": "sub_40F3F5", "query": "\n\n\n__int64 __fastcall sub_40F3F5(int a1, int a2)\n{\nint v3; // [rsp+8h] [rbp-18h]\n\nv3 = a2;\nif ( !qword_422EF0 )\nreturn 0LL;\nif ( a1 < 0 || a1 > 127 )\nreturn 0LL;\nif ( a2 >= 0 )\n{\nif ( a2 > 96 )\nv3 = 96;\n}\nelse\n{\nv3 = 0;\n}\nsub_40F331(a1, *(_DWORD *)(qword_422EE8 + 4LL * v3));\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,sub_40F3F5,sub_40F331,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'c', 'a2': 'v', 'v3': 'va', 'sub_40F3F5': 'midi_controller', 'sub_40F331': 'do_controller'}"}
usage
9e85ca7a15f8fb1c7299874b5cee06abafb890194542398a5d8c432876becfba
linux-apfs
apfsprogs
NA
static void usage(void) { fprintf(stderr, "usage: %s [-L label] [-U UUID] [-u UUID] [-sv] " "device [blocks]\n", progname); exit(1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402144", "function_addr": 4202820, "binary_name": "9e85ca7a15f8fb1c7299874b5cee06abafb890194542398a5d8c432876becfba.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rdx, cs:qword_407120"], [3, "mov rax, cs:stderr"], [4, "mov esi, offset format"], [5, "mov rdi, rax"], [6, "mov eax, 0"], [7, "call _fprintf"], [8, "mov edi, 1"], [9, "call _exit"]], "data_dep": [[5, 3]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/9e85ca7a15f8fb1c7299874b5cee06abafb890194542398a5d8c432876becfba_9e85ca7a15f8fb1c7299874b5cee06abafb890194542398a5d8c432876becfba.jsonl.gz", "strip_func_name": "sub_402144", "query": "\n\n\nvoid __noreturn sub_402144()\n{\nfprintf(stderr, \"usage: %s [-L label] [-U UUID] [-u UUID] [-sv] device [blocks]\\n\", qword_407120);\nexit(1);\n}\n\n\n\nQ:[sub_402144,]\nAssistant: ", "hints": "[]", "response": "{'sub_402144': 'usage'}"}
unset_replace_list
3ab645463ad13ea30c238ceac9bf56691ea8cada0b7c92413fecc09c2d081d33
illumos
illumos-gate
NA
static void unset_replace_list(struct symbol_list *list) { struct symbol *sym; FOR_EACH_PTR(list, sym) { unset_replace(sym); } END_FOR_EACH_PTR(sym); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4416C3", "function_addr": 4462275, "binary_name": "3ab645463ad13ea30c238ceac9bf56691ea8cada0b7c92413fecc09c2d081d33.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov rax, [rbp+var_28]"], [5, "mov [rbp+var_18], rax"], [6, "mov rax, [rbp+var_18]"], [7, "mov [rbp+var_8], rax"], [8, "cmp [rbp+var_18], 0"], [9, "jz short loc_441753"], [10, "mov [rbp+var_C], 0"], [11, "jmp short loc_44172C"], [12, "mov rax, [rbp+var_8]"], [13, "mov edx, [rbp+var_C]"], [14, "movsxd rdx, edx"], [15, "add rdx, 2"], [16, "mov rax, [rax+rdx*8+8]"], [17, "mov [rbp+var_20], rax"], [18, "mov rax, [rbp+var_8]"], [19, "movzx eax, byte ptr [rax+1]"], [20, "test al, al"], [21, "jz short loc_441719"], [22, "cmp [rbp+var_20], 0"], [23, "jz short loc_441727"], [24, "mov rax, [rbp+var_20]"], [25, "mov rdi, rax"], [26, "call sub_44165B"], [27, "jmp short loc_441728"], [28, "nop"], [29, "add [rbp+var_C], 1"], [30, "mov rax, [rbp+var_8]"], [31, "movzx eax, byte ptr [rax]"], [32, "movsx eax, al"], [33, "cmp [rbp+var_C], eax"], [34, "jl short loc_4416EF"], [35, "mov rax, [rbp+var_8]"], [36, "mov rax, [rax+10h]"], [37, "mov [rbp+var_8], rax"], [38, "mov rax, [rbp+var_8]"], [39, "cmp rax, [rbp+var_18]"], [40, "jnz short loc_4416E6"], [41, "jmp short loc_441754"], [42, "nop"], [43, "nop"], [44, "leave"], [45, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 5], [9, 8], [12, 7], [12, 37], [13, 29], [13, 10], [14, 13], [15, 14], [16, 12], [17, 16], [18, 7], [18, 37], [19, 18], [20, 19], [21, 20], [22, 17], [23, 22], [24, 17], [25, 24], [29, 29], [29, 10], [30, 7], [30, 37], [31, 30], [32, 31], [33, 29], [33, 32], [33, 10], [34, 33], [35, 7], [35, 37], [36, 35], [37, 36], [38, 37], [39, 5], [39, 38], [40, 39], [45, 6], [45, 38]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3ab645463ad13ea30c238ceac9bf56691ea8cada0b7c92413fecc09c2d081d33_3ab645463ad13ea30c238ceac9bf56691ea8cada0b7c92413fecc09c2d081d33.jsonl.gz", "strip_func_name": "sub_4416C3", "query": "\n\n\nchar *__fastcall sub_4416C3(char *a1)\n{\nchar *result; // rax\n__int64 *v2; // [rsp+10h] [rbp-20h]\nint i; // [rsp+24h] [rbp-Ch]\nchar *v4; // [rsp+28h] [rbp-8h]\n\nresult = a1;\nv4 = a1;\nif ( a1 )\n{\ndo\n{\nfor ( i = 0; i < *v4; ++i )\n{\nv2 = *(__int64 **)&v4[8 * i + 24];\nif ( !v4[1] || v2 )\nsub_44165B(v2);\n}\nv4 = (char *)*((_QWORD *)v4 + 2);\nresult = v4;\n}\nwhile ( v4 != a1 );\n}\nreturn result;\n}\n\n\n\nQ:[a1,v2,i,v4,sub_4416C3,sub_44165B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'list', 'v2': 'sym', 'i': '__nrsym', 'v4': '__listsym', 'sub_4416C3': 'unset_replace_list', 'sub_44165B': 'unset_replace'}"}
showmap_run_target_forkserver
65a45fc956481835c28046f3f3a2d02bdf8447669d332d689259e7633e3a058b
HexHive
Igor
NA
static void showmap_run_target_forkserver(afl_forkserver_t *fsrv, u8 *mem, u32 len) { afl_fsrv_write_to_testcase(fsrv, mem, len); if (!quiet_mode) { SAYF("-- Program output begins --\n" cRST); } if (afl_fsrv_run_target(fsrv, fsrv->exec_tmout, &stop_soon) == FSRV_RUN_ERROR) { FATAL("Error running target"); } classify_counts(fsrv); if (!quiet_mode) { SAYF(cRST "-- Program output ends --\n"); } if (!fsrv->last_run_timed_out && !stop_soon && WIFSIGNALED(fsrv->child_status)) { child_crashed = 1; } else { child_crashed = 0; } if (!quiet_mode) { if (fsrv->last_run_timed_out) { SAYF(cLRD "\n+++ Program timed off +++\n" cRST); } else if (stop_soon) { SAYF(cLRD "\n+++ Program aborted by user +++\n" cRST); } else if (child_crashed) { SAYF(cLRD "\n+++ Program killed by signal %u +++\n" cRST, WTERMSIG(fsrv->child_status)); } } if (stop_soon) { SAYF(cRST cLRD "\n+++ afl-showmap folder mode aborted by user +++\n" cRST); exit(1); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402DEB", "function_addr": 4206059, "binary_name": "65a45fc956481835c28046f3f3a2d02bdf8447669d332d689259e7633e3a058b.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, "mov edx, [rbp+var_14]"], [7, "mov rcx, [rbp+var_10]"], [8, "mov rax, [rbp+var_8]"], [9, "mov rsi, rcx"], [10, "mov rdi, rax"], [11, "call sub_40BA03"], [12, "movzx eax, cs:byte_4167A8"], [13, "test al, al"], [14, "jnz short loc_402E2E"], [15, "mov edi, offset aProgramOutputB"], [16, "mov eax, 0"], [17, "call _printf"], [18, "mov rax, [rbp+var_8]"], [19, "mov ecx, [rax+2Ch]"], [20, "mov rax, [rbp+var_8]"], [21, "mov edx, offset byte_4167AF"], [22, "mov esi, ecx"], [23, "mov rdi, rax"], [24, "call sub_40BD81"], [25, "cmp eax, 3"], [26, "jnz short loc_402E84"], [27, "mov edi, offset byte_40D630"], [28, "mov eax, 0"], [29, "call _printf"], [30, "mov ecx, 139h"], [31, "mov edx, offset aSrcAflShowmapC"], [32, "mov esi, offset aShowmapRunTarg"], [33, "mov edi, offset a191mLocation0m"], [34, "mov eax, 0"], [35, "call _printf"], [36, "mov edi, 1"], [37, "call _exit"], [38, "mov rax, [rbp+var_8]"], [39, "mov rdi, rax"], [40, "call sub_402670"], [41, "movzx eax, cs:byte_4167A8"], [42, "test al, al"], [43, "jnz short loc_402EA5"], [44, "mov edi, offset s"], [45, "call _puts"], [46, "mov rax, [rbp+var_8]"], [47, "mov eax, [rax+68h]"], [48, "test eax, eax"], [49, "jnz short loc_402ED7"], [50, "movzx eax, cs:byte_4167AF"], [51, "test al, al"], [52, "jnz short loc_402ED7"], [53, "mov rax, [rbp+var_8]"], [54, "mov eax, [rax+10h]"], [55, "and eax, 7Fh"], [56, "add eax, 1"], [57, "sar al, 1"], [58, "test al, al"], [59, "jle short loc_402ED7"], [60, "mov cs:byte_4167B0, 1"], [61, "jmp short loc_402EDE"], [62, "mov cs:byte_4167B0, 0"], [63, "movzx eax, cs:byte_4167A8"], [64, "test al, al"], [65, "jnz short loc_402F47"], [66, "mov rax, [rbp+var_8]"], [67, "mov eax, [rax+68h]"], [68, "test eax, eax"], [69, "jz short loc_402F05"], [70, "mov edi, offset a191mProgramTim"], [71, "mov eax, 0"], [72, "call _printf"], [73, "jmp short loc_402F47"], [74, "movzx eax, cs:byte_4167AF"], [75, "test al, al"], [76, "jz short loc_402F21"], [77, "mov edi, offset a191mProgramAbo"], [78, "mov eax, 0"], [79, "call _printf"], [80, "jmp short loc_402F47"], [81, "movzx eax, cs:byte_4167B0"], [82, "test al, al"], [83, "jz short loc_402F47"], [84, "mov rax, [rbp+var_8]"], [85, "mov eax, [rax+10h]"], [86, "and eax, 7Fh"], [87, "mov esi, eax"], [88, "mov edi, offset a191mProgramKil"], [89, "mov eax, 0"], [90, "call _printf"], [91, "movzx eax, cs:byte_4167AF"], [92, "test al, al"], [93, "jz short loc_402F6B"], [94, "mov edi, offset a0m191mAflShowm"], [95, "mov eax, 0"], [96, "call _printf"], [97, "mov edi, 1"], [98, "call _exit"], [99, "nop"], [100, "leave"], [101, "retn"]], "data_dep": [[6, 5], [7, 4], [8, 3], [9, 7], [10, 8], [13, 12], [14, 13], [18, 3], [19, 18], [20, 3], [22, 19], [23, 20], [25, 24], [26, 25], [38, 3], [39, 38], [42, 41], [43, 42], [46, 3], [47, 46], [48, 47], [49, 48], [51, 50], [52, 51], [53, 3], [54, 53], [55, 54], [56, 55], [57, 56], [58, 57], [59, 58], [64, 63], [65, 64], [66, 3], [67, 66], [68, 67], [69, 68], [75, 74], [76, 75], [81, 60], [81, 62], [82, 81], [83, 82], [84, 3], [85, 84], [86, 85], [87, 86], [92, 91], [93, 92], [101, 92]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/65a45fc956481835c28046f3f3a2d02bdf8447669d332d689259e7633e3a058b_65a45fc956481835c28046f3f3a2d02bdf8447669d332d689259e7633e3a058b.jsonl.gz", "strip_func_name": "sub_402DEB", "query": "\n\n\n__int64 __fastcall sub_402DEB(__int64 a1, __int64 a2, unsigned int a3)\n{\n__int64 result; // rax\n\nsub_40BA03(a1, a2, a3);\nif ( !byte_4167A8 )\nprintf(\"-- Program output begins --\\n\\x1B[0m\");\nif ( (unsigned int)sub_40BD81(a1, *(unsigned int *)(a1 + 44), &byte_4167AF) == 3 )\n{\nprintf(&byte_40D630);\nprintf(\n\"\\x1B[1;91m\\n Location : \\x1B[0m%s(), %s:%d\\n\\n\",\n\"showmap_run_target_forkserver\",\n\"src/afl-showmap.c\",\n313LL);\nexit(1);\n}\nsub_402670((_BYTE **)a1);\nif ( !byte_4167A8 )\nputs(\"\\x1B[0m-- Program output ends --\");\nbyte_4167B0 = !*(_DWORD *)(a1 + 104) && !byte_4167AF && (char)((*(_BYTE *)(a1 + 16) & 0x7F) + 1) >> 1 > 0;\nif ( !byte_4167A8 )\n{\nif ( *(_DWORD *)(a1 + 104) )\n{\nprintf(\"\\x1B[1;91m\\n+++ Program timed off +++\\n\\x1B[0m\");\n}\nelse if ( byte_4167AF )\n{\nprintf(\"\\x1B[1;91m\\n+++ Program aborted by user +++\\n\\x1B[0m\");\n}\nelse if ( byte_4167B0 )\n{\nprintf(\"\\x1B[1;91m\\n+++ Program killed by signal %u +++\\n\\x1B[0m\", *(_DWORD *)(a1 + 16) & 0x7F);\n}\n}\nresult = (unsigned __int8)byte_4167AF;\nif ( byte_4167AF )\n{\nprintf(\"\\x1B[0m\\x1B[1;91m\\n+++ afl-showmap folder mode aborted by user +++\\n\\x1B[0m\");\nexit(1);\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_402DEB,sub_40BA03,sub_40BD81,sub_402670,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'len', 'a1': 'fsrv', 'a2': 'mem', 'sub_402DEB': 'showmap_run_target_forkserver', 'sub_40BA03': 'afl_fsrv_write_to_testcase', 'sub_40BD81': 'afl_fsrv_run_target', 'sub_402670': 'classify_counts'}"}
insert_code
66bd019c23f1bce7a7d0f8ef7605d671309339a1bf8ed0fffb93ef73bf0f1f3a
t00sh
elf-poison
NA
void insert_code(Elf32_File *file, uint8_t *code, uint32_t length) { int sh, ph; if((ph = find_last_ptload(file)) < 0) ERROR("Can't find the segment !"); if((sh = get_last_section(file, ph)) < 0) ERROR("Can't find the section !"); sh = insert_section(file, sh, ph, code, length); update_segment_size(file, ph, length); update_segments_perm(file); update_e_entry(file, sh, length); update_sections_offset(file, sh); update_shdr_offset(file); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40259E", "function_addr": 4203934, "binary_name": "66bd019c23f1bce7a7d0f8ef7605d671309339a1bf8ed0fffb93ef73bf0f1f3a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_24], edx"], [6, "mov rax, [rbp+var_18]"], [7, "mov rdi, rax"], [8, "call sub_401F42"], [9, "mov [rbp+var_4], eax"], [10, "cmp [rbp+var_4], 0"], [11, "jns short loc_4025F9"], [12, "mov rax, cs:stderr"], [13, "mov r8d, offset aCanTFindTheSeg"], [14, "mov ecx, 1B8h"], [15, "mov edx, offset aInject2C"], [16, "mov esi, offset format"], [17, "mov rdi, rax"], [18, "mov eax, 0"], [19, "call _fprintf"], [20, "mov edi, 1"], [21, "call _exit"], [22, "mov edx, [rbp+var_4]"], [23, "mov rax, [rbp+var_18]"], [24, "mov esi, edx"], [25, "mov rdi, rax"], [26, "call sub_401FB6"], [27, "mov [rbp+var_8], eax"], [28, "cmp [rbp+var_8], 0"], [29, "jns short loc_402646"], [30, "mov rax, cs:stderr"], [31, "mov r8d, offset aCanTFindTheSec"], [32, "mov ecx, 1BBh"], [33, "mov edx, offset aInject2C"], [34, "mov esi, offset format"], [35, "mov rdi, rax"], [36, "mov eax, 0"], [37, "call _fprintf"], [38, "mov edi, 1"], [39, "call _exit"], [40, "mov edi, [rbp+var_24]"], [41, "mov rcx, [rbp+var_20]"], [42, "mov edx, [rbp+var_4]"], [43, "mov esi, [rbp+var_8]"], [44, "mov rax, [rbp+var_18]"], [45, "mov r8d, edi"], [46, "mov rdi, rax"], [47, "call sub_40206D"], [48, "mov [rbp+var_8], eax"], [49, "mov edx, [rbp+var_24]"], [50, "mov ecx, [rbp+var_4]"], [51, "mov rax, [rbp+var_18]"], [52, "mov esi, ecx"], [53, "mov rdi, rax"], [54, "call sub_4022E9"], [55, "mov rax, [rbp+var_18]"], [56, "mov rdi, rax"], [57, "call sub_40253C"], [58, "mov edx, [rbp+var_24]"], [59, "mov ecx, [rbp+var_8]"], [60, "mov rax, [rbp+var_18]"], [61, "mov esi, ecx"], [62, "mov rdi, rax"], [63, "call sub_40235F"], [64, "mov edx, [rbp+var_8]"], [65, "mov rax, [rbp+var_18]"], [66, "mov esi, edx"], [67, "mov rdi, rax"], [68, "call sub_402408"], [69, "mov rax, [rbp+var_18]"], [70, "mov rdi, rax"], [71, "call sub_4024CA"], [72, "nop"], [73, "leave"], [74, "retn"]], "data_dep": [[6, 3], [7, 6], [9, 8], [10, 9], [11, 10], [17, 12], [22, 9], [23, 3], [24, 22], [25, 23], [27, 26], [28, 27], [29, 28], [35, 30], [40, 5], [41, 4], [42, 9], [43, 27], [44, 3], [45, 40], [46, 44], [48, 47], [49, 5], [50, 9], [51, 3], [52, 50], [53, 51], [55, 3], [56, 55], [58, 5], [59, 48], [60, 3], [61, 59], [62, 60], [64, 48], [65, 3], [66, 64], [67, 65], [69, 3], [70, 69], [74, 71]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/66bd019c23f1bce7a7d0f8ef7605d671309339a1bf8ed0fffb93ef73bf0f1f3a_66bd019c23f1bce7a7d0f8ef7605d671309339a1bf8ed0fffb93ef73bf0f1f3a.jsonl.gz", "strip_func_name": "sub_40259E", "query": "\n\n\n__int64 __fastcall sub_40259E(_QWORD *a1, const void *a2, unsigned int a3)\n{\nint v5; // [rsp+28h] [rbp-8h]\nint v6; // [rsp+28h] [rbp-8h]\nint v7; // [rsp+2Ch] [rbp-4h]\n\nv7 = sub_401F42(a1);\nif ( v7 < 0 )\n{\nfprintf(stderr, \"%s:%d %s\\n\", \"inject-2.c\", 440LL, \"Can't find the segment !\");\nexit(1);\n}\nv5 = sub_401FB6(a1, v7);\nif ( v5 < 0 )\n{\nfprintf(stderr, \"%s:%d %s\\n\", \"inject-2.c\", 443LL, \"Can't find the section !\");\nexit(1);\n}\nv6 = sub_40206D((__int64)a1, v5, v7, a2, a3);\nsub_4022E9((__int64)a1, v7, a3);\nsub_40253C(a1);\nsub_40235F(a1, v6, a3);\nsub_402408(a1, v6);\nreturn sub_4024CA(a1);\n}\n\n\n\nQ:[a3,a1,a2,v6,v7,sub_40259E,sub_401F42,sub_401FB6,sub_40206D,sub_4022E9,sub_40253C,sub_40235F,sub_402408,sub_4024CA,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'length', 'a1': 'file', 'a2': 'code', 'v6': 'sha', 'v7': 'ph', 'sub_40259E': 'insert_code', 'sub_401F42': 'find_last_ptload', 'sub_401FB6': 'get_last_section', 'sub_40206D': 'insert_section', 'sub_4022E9': 'update_segment_size', 'sub_40253C': 'update_segments_perm', 'sub_40235F': 'update_e_entry', 'sub_402408': 'update_sections_offset', 'sub_4024CA': 'update_shdr_offset'}"}
Cmd_Frame
26fcc7733e4182cd7dd55c3d72406c180f70d9ab8f1f03c3852f8b9cfe1416e4
sezero
uhexen2
NA
static void Cmd_Frame (int isgroup) { while (TokenAvailable()) { GetToken (false); GrabFrame (token, isgroup); if (!isgroup) model.numframes++; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40957E", "function_addr": 4232574, "binary_name": "26fcc7733e4182cd7dd55c3d72406c180f70d9ab8f1f03c3852f8b9cfe1416e4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], edi"], [4, "jmp short loc_4095B9"], [5, "mov edi, 0"], [6, "call sub_403043"], [7, "mov eax, [rbp+var_4]"], [8, "mov esi, eax"], [9, "mov edi, offset byte_410980"], [10, "call sub_408785"], [11, "cmp [rbp+var_4], 0"], [12, "jnz short loc_4095B9"], [13, "mov eax, cs:dword_1413464"], [14, "add eax, 1"], [15, "mov cs:dword_1413464, eax"], [16, "call sub_4032A1"], [17, "test eax, eax"], [18, "jnz short loc_40958B"], [19, "nop"], [20, "nop"], [21, "leave"], [22, "retn"]], "data_dep": [[7, 3], [8, 7], [11, 3], [12, 11], [13, 15], [14, 13], [15, 14], [17, 16], [18, 17], [22, 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/26fcc7733e4182cd7dd55c3d72406c180f70d9ab8f1f03c3852f8b9cfe1416e4_26fcc7733e4182cd7dd55c3d72406c180f70d9ab8f1f03c3852f8b9cfe1416e4.jsonl.gz", "strip_func_name": "sub_40957E", "query": "\n\n\n_BOOL8 __fastcall sub_40957E(unsigned int a1, __int64 a2)\n{\n__int64 v2; // rdx\n__int64 v3; // rcx\n__int64 v4; // r8\n__int64 v5; // r9\n_BOOL8 result; // rax\n__int64 v7; // rdx\n__int64 v8; // rcx\n__int64 v9; // r8\n__int64 v10; // r9\n\nwhile ( 1 )\n{\nresult = sub_4032A1();\nif ( !result )\nbreak;\nsub_403043(0, a2, v7, v8, v9, v10);\na2 = a1;\nsub_408785(&byte_410980, a1, v2, v3, v4, v5);\nif ( !a1 )\n++dword_1413464;\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_40957E,sub_4032A1,sub_403043,sub_408785,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'isgroup', 'sub_40957E': 'Cmd_Frame', 'sub_4032A1': 'TokenAvailable', 'sub_403043': 'GetToken', 'sub_408785': 'GrabFrame'}"}
LZ4_isLittleEndian
c2a29fc1b34295a350b85805a78a630c374d8fdc88beebb998ef0d5227bf8140
mupfdev
SNESoIP
NA
static unsigned LZ4_isLittleEndian(void) { const union { U32 u; BYTE c[4]; } one = { 1 }; /* don't use static : performance detrimental */ return one.c[0]; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404F28", "function_addr": 4214568, "binary_name": "c2a29fc1b34295a350b85805a78a630c374d8fdc88beebb998ef0d5227bf8140.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_4], 1"], [3, "movzx eax, byte ptr [rbp+var_4]"], [4, "movzx eax, al"], [5, "pop rbp"], [6, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 0], [6, 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/c2a29fc1b34295a350b85805a78a630c374d8fdc88beebb998ef0d5227bf8140_c2a29fc1b34295a350b85805a78a630c374d8fdc88beebb998ef0d5227bf8140.jsonl.gz", "strip_func_name": "sub_404F28", "query": "\n\n\n__int64 sub_404F28()\n{\nreturn 1LL;\n}\n\n\n\nQ:[sub_404F28,]\nAssistant: ", "hints": "[]", "response": "{'sub_404F28': 'LZ4_isLittleEndian'}"}
alert_vmsg
875d88da9941e2dd454acb27c32772f397e6dd0149b0dce398003551bc21048d
viabtc
viabtc_mining_server
NA
int alert_vmsg(const char *fmt, va_list ap) { if (!init_flag) return -__LINE__; sds msg = sdsempty(); msg = sdscat(msg, magic_head); msg = sdscatprintf(msg, "%s: ", host); msg = sdscatvprintf(msg, fmt, ap); msg = sdscatprintf(msg, "\n"); size_t msg_len = sdslen(msg); if (sdslen(msg) > msg_max_size) msg_len = msg_max_size; if (sendto(sockfd, msg, msg_len, 0, (struct sockaddr *)&addr, sizeof(addr)) < 0) { sdsfree(msg); return -__LINE__; } sdsfree(msg); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "alert_vmsg", "function_addr": 4267748, "binary_name": "875d88da9941e2dd454acb27c32772f397e6dd0149b0dce398003551bc21048d.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 eax, cs:dword_425944"], [6, "test eax, eax"], [7, "jnz short loc_411F08"], [8, "mov eax, 0FFFFFFDEh"], [9, "jmp locret_412004"], [10, "call sdsempty"], [11, "mov [rbp+buf], rax"], [12, "mov rdx, cs:off_4255D0"], [13, "mov rax, [rbp+buf]"], [14, "mov rsi, rdx"], [15, "mov rdi, rax"], [16, "call sdscat"], [17, "mov [rbp+buf], rax"], [18, "mov rdx, cs:qword_425920"], [19, "mov rax, [rbp+buf]"], [20, "mov esi, offset aS_1"], [21, "mov rdi, rax"], [22, "mov eax, 0"], [23, "call sdscatprintf"], [24, "mov [rbp+buf], rax"], [25, "mov rdx, [rbp+var_20]"], [26, "mov rcx, [rbp+var_18]"], [27, "mov rax, [rbp+buf]"], [28, "mov rsi, rcx"], [29, "mov rdi, rax"], [30, "call sdscatvprintf"], [31, "mov [rbp+buf], rax"], [32, "mov rax, [rbp+buf]"], [33, "mov esi, offset asc_41D4CD"], [34, "mov rdi, rax"], [35, "mov eax, 0"], [36, "call sdscatprintf"], [37, "mov [rbp+buf], rax"], [38, "mov rax, [rbp+buf]"], [39, "mov rdi, rax"], [40, "call sub_411E4B"], [41, "mov [rbp+n], rax"], [42, "mov rax, [rbp+buf]"], [43, "mov rdi, rax"], [44, "call sub_411E4B"], [45, "mov edx, 2800h"], [46, "movsxd rdx, edx"], [47, "cmp rax, rdx"], [48, "jbe short loc_411FB5"], [49, "mov eax, 2800h"], [50, "cdqe"], [51, "mov [rbp+n], rax"], [52, "mov eax, cs:fd"], [53, "mov rdx, [rbp+n]"], [54, "mov rsi, [rbp+buf]"], [55, "mov r9d, 10h"], [56, "mov r8d, offset addr"], [57, "mov ecx, 0"], [58, "mov edi, eax"], [59, "call _sendto"], [60, "test rax, rax"], [61, "jns short loc_411FF3"], [62, "mov rax, [rbp+buf]"], [63, "mov rdi, rax"], [64, "call sdsfree"], [65, "mov eax, 0FFFFFFD3h"], [66, "jmp short locret_412004"], [67, "mov rax, [rbp+buf]"], [68, "mov rdi, rax"], [69, "call sdsfree"], [70, "mov eax, 0"], [71, "leave"], [72, "retn"]], "data_dep": [[6, 5], [7, 6], [11, 10], [13, 11], [14, 12], [15, 13], [17, 16], [19, 17], [21, 19], [24, 23], [25, 4], [26, 3], [27, 24], [28, 26], [29, 27], [31, 30], [32, 31], [34, 32], [37, 36], [38, 37], [39, 38], [41, 40], [42, 37], [43, 42], [46, 45], [47, 46], [47, 44], [48, 47], [51, 49], [53, 41], [53, 51], [54, 37], [58, 52], [60, 59], [61, 60], [62, 37], [63, 62], [67, 37], [68, 67], [72, 8], [72, 65], [72, 70]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/875d88da9941e2dd454acb27c32772f397e6dd0149b0dce398003551bc21048d_875d88da9941e2dd454acb27c32772f397e6dd0149b0dce398003551bc21048d.jsonl.gz", "strip_func_name": "alert_vmsg", "query": "\n\n\n__int64 __fastcall alert_vmsg(const char *a1, _QWORD *a2)\n{\n__int64 result; // rax\n_DWORD *v3; // rax\nchar *v4; // rax\n__int64 v5; // rcx\n__int64 v6; // r8\n__int64 v7; // r9\nchar *v8; // rax\nchar *v9; // rax\n__int64 v10; // rdx\n__int64 v11; // rcx\n__int64 v12; // r8\n__int64 v13; // r9\nchar *buf; // [rsp+10h] [rbp-10h]\n__int64 n; // [rsp+18h] [rbp-8h]\n\nif ( !dword_425944 )\nreturn 4294967262LL;\nv3 = sdsempty();\nv4 = sdscat((__int64)v3, off_4255D0);\nv8 = sdscatprintf((__int64)v4, \"%s: \", qword_425920, v5, v6, v7);\nv9 = sdscatvprintf((__int64)v8, a1, a2);\nbuf = sdscatprintf((__int64)v9, \"\\n\", v10, v11, v12, v13);\nn = sub_411E4B((__int64)buf);\nif ( (unsigned __int64)sub_411E4B((__int64)buf) > 0x2800 )\nn = 10240LL;\nif ( sendto(fd, buf, n, 0, &addr, 0x10u) >= 0 )\n{\nsdsfree((__int64)buf);\nresult = 0LL;\n}\nelse\n{\nsdsfree((__int64)buf);\nresult = 4294967251LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,buf,n,sub_411E4B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'fmt', 'a2': 'ap', 'buf': 'msg', 'n': 'msg_len', 'sub_411E4B': 'sdslen_0'}"}
ilog2_32
594b83b23af3712b0a50cf803faf548ee2d881811c70ba9277daabf28866ca9b
yangao07
TideHunter
NA
static inline int ilog2_32(uint32_t v) { uint32_t t, tt; if ((tt = v>>16)) return (t = tt>>8) ? 24 + ab_LogTable256[t] : 16 + ab_LogTable256[tt]; return (t = v>>8) ? 8 + ab_LogTable256[t] : ab_LogTable256[v]; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407B1A", "function_addr": 4225818, "binary_name": "594b83b23af3712b0a50cf803faf548ee2d881811c70ba9277daabf28866ca9b.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, "shr eax, 10h"], [5, "mov [rbp+var_4], eax"], [6, "cmp [rbp+var_4], 0"], [7, "jz short loc_407B63"], [8, "mov eax, [rbp+var_4]"], [9, "shr eax, 8"], [10, "mov [rbp+var_8], eax"], [11, "cmp [rbp+var_8], 0"], [12, "jz short loc_407B51"], [13, "mov eax, [rbp+var_8]"], [14, "movzx eax, ds:byte_457A20[rax]"], [15, "movsx eax, al"], [16, "add eax, 18h"], [17, "jmp short loc_407B91"], [18, "mov eax, [rbp+var_4]"], [19, "movzx eax, ds:byte_457A20[rax]"], [20, "movsx eax, al"], [21, "add eax, 10h"], [22, "jmp short loc_407B91"], [23, "mov eax, [rbp+var_14]"], [24, "shr eax, 8"], [25, "mov [rbp+var_8], eax"], [26, "cmp [rbp+var_8], 0"], [27, "jz short loc_407B84"], [28, "mov eax, [rbp+var_8]"], [29, "movzx eax, ds:byte_457A20[rax]"], [30, "movsx eax, al"], [31, "add eax, 8"], [32, "jmp short loc_407B91"], [33, "mov eax, [rbp+var_14]"], [34, "movzx eax, ds:byte_457A20[rax]"], [35, "movsx eax, al"], [36, "pop rbp"], [37, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 5], [9, 8], [10, 9], [11, 10], [12, 11], [13, 10], [15, 14], [16, 15], [18, 5], [20, 19], [21, 20], [23, 2], [24, 23], [25, 24], [26, 25], [27, 26], [28, 25], [30, 29], [31, 30], [33, 2], [35, 34], [36, 0], [37, 21], [37, 35], [37, 16], [37, 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/594b83b23af3712b0a50cf803faf548ee2d881811c70ba9277daabf28866ca9b_594b83b23af3712b0a50cf803faf548ee2d881811c70ba9277daabf28866ca9b.jsonl.gz", "strip_func_name": "sub_407B1A", "query": "\n\n\n__int64 __fastcall sub_407B1A(unsigned int a1)\n{\n__int64 result; // rax\n\nif ( HIWORD(a1) )\n{\nif ( HIBYTE(a1) )\nresult = (unsigned int)(byte_457A20[HIBYTE(a1)] + 24);\nelse\nresult = (unsigned int)(byte_457A20[HIWORD(a1)] + 16);\n}\nelse if ( a1 >> 8 )\n{\nresult = (unsigned int)(byte_457A20[a1 >> 8] + 8);\n}\nelse\n{\nresult = (unsigned int)byte_457A20[a1];\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_407B1A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'v', 'sub_407B1A': 'ilog2_32'}"}
wavefront_check_alignment
701b6654e64c67cb8338f0fc2d732a77fe8d9ce70cdd955693e8e4a9fbb413e0
smarco
BiWFA-paper
NA
bool wavefront_check_alignment( FILE* const stream, wavefront_aligner_t* const wf_aligner) { // Parameters const char* const pattern = wf_aligner->pattern; const int pattern_length = wf_aligner->pattern_length; const char* const text = wf_aligner->text; const int text_length = wf_aligner->text_length; // Custom function to compare sequences alignment_match_funct_t match_funct = wf_aligner->match_funct; void* match_funct_arguments = wf_aligner->match_funct_arguments; // CIGAR cigar_t* const cigar = wf_aligner->cigar; char* const operations = cigar->operations; const int begin_offset = cigar->begin_offset; const int end_offset = cigar->end_offset; // Traverse CIGAR bool alignment_correct = true; int pattern_pos=0, text_pos=0, i; for (i=begin_offset;i<end_offset;++i) { switch (operations[i]) { case 'M': { // Check match const bool is_match = (match_funct!=NULL) ? match_funct(pattern_pos,text_pos,match_funct_arguments) : pattern[pattern_pos] == text[text_pos]; if (!is_match) { fprintf(stream,"[WFA::Check] Alignment not matching (pattern[%d]=%c != text[%d]=%c)\n", pattern_pos,pattern[pattern_pos],text_pos,text[text_pos]); alignment_correct = false; break; } ++pattern_pos; ++text_pos; break; } case 'X': { // Check mismatch const bool is_match = (match_funct!=NULL) ? match_funct(pattern_pos,text_pos,match_funct_arguments) : pattern[pattern_pos] == text[text_pos]; if (is_match) { fprintf(stream,"[WFA::Check] Alignment not mismatching (pattern[%d]=%c == text[%d]=%c)\n", pattern_pos,pattern[pattern_pos],text_pos,text[text_pos]); alignment_correct = false; break; } ++pattern_pos; ++text_pos; break; } case 'I': ++text_pos; break; case 'D': ++pattern_pos; break; default: fprintf(stream,"[WFA::Check] Unknown edit operation '%c'\n",operations[i]); exit(1); break; } } // Check alignment length if (pattern_pos != pattern_length) { fprintf(stream, "[WFA::Check] Alignment incorrect length (pattern-aligned=%d,pattern-length=%d)\n", pattern_pos,pattern_length); alignment_correct = false; } if (text_pos != text_length) { fprintf(stream, "[WFA::Check] Alignment incorrect length (text-aligned=%d,text-length=%d)\n", text_pos,text_length); alignment_correct = false; } // Return return alignment_correct; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_418634", "function_addr": 4294196, "binary_name": "701b6654e64c67cb8338f0fc2d732a77fe8d9ce70cdd955693e8e4a9fbb413e0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 70h"], [3, "mov [rbp+stream], rdi"], [4, "mov [rbp+var_70], rsi"], [5, "mov rax, [rbp+var_70]"], [6, "mov rax, [rax+40h]"], [7, "mov [rbp+var_18], rax"], [8, "mov rax, [rbp+var_70]"], [9, "mov eax, [rax+48h]"], [10, "mov [rbp+var_1C], eax"], [11, "mov rax, [rbp+var_70]"], [12, "mov rax, [rax+50h]"], [13, "mov [rbp+var_28], rax"], [14, "mov rax, [rbp+var_70]"], [15, "mov eax, [rax+58h]"], [16, "mov [rbp+var_2C], eax"], [17, "mov rax, [rbp+var_70]"], [18, "mov rax, [rax+60h]"], [19, "mov [rbp+var_38], rax"], [20, "mov rax, [rbp+var_70]"], [21, "mov rax, [rax+68h]"], [22, "mov [rbp+var_40], rax"], [23, "mov rax, [rbp+var_70]"], [24, "mov rax, [rax+158h]"], [25, "mov [rbp+var_48], rax"], [26, "mov rax, [rbp+var_48]"], [27, "mov rax, [rax]"], [28, "mov [rbp+var_50], rax"], [29, "mov rax, [rbp+var_48]"], [30, "mov eax, [rax+0Ch]"], [31, "mov [rbp+var_54], eax"], [32, "mov rax, [rbp+var_48]"], [33, "mov eax, [rax+10h]"], [34, "mov [rbp+var_58], eax"], [35, "mov [rbp+var_1], 1"], [36, "mov [rbp+var_8], 0"], [37, "mov [rbp+var_C], 0"], [38, "mov eax, [rbp+var_54]"], [39, "mov [rbp+var_10], eax"], [40, "jmp loc_4188BD"], [41, "mov eax, [rbp+var_10]"], [42, "movsxd rdx, eax"], [43, "mov rax, [rbp+var_50]"], [44, "add rax, rdx"], [45, "movzx eax, byte ptr [rax]"], [46, "movsx eax, al"], [47, "cmp eax, 58h "], [48, "jz loc_4187D1"], [49, "cmp eax, 58h "], [50, "jg loc_418886"], [51, "cmp eax, 4Dh "], [52, "jz short loc_41871D"], [53, "cmp eax, 4Dh "], [54, "jg loc_418886"], [55, "cmp eax, 44h "], [56, "jz loc_418880"], [57, "cmp eax, 49h "], [58, "jz loc_41887A"], [59, "jmp loc_418886"], [60, "cmp [rbp+var_38], 0"], [61, "jz short loc_418740"], [62, "mov rdx, [rbp+var_40]"], [63, "mov ecx, [rbp+var_C]"], [64, "mov eax, [rbp+var_8]"], [65, "mov r8, [rbp+var_38]"], [66, "mov esi, ecx"], [67, "mov edi, eax"], [68, "call r8"], [69, "test eax, eax"], [70, "setnz al"], [71, "jmp short loc_418765"], [72, "mov eax, [rbp+var_8]"], [73, "movsxd rdx, eax"], [74, "mov rax, [rbp+var_18]"], [75, "add rax, rdx"], [76, "movzx edx, byte ptr [rax]"], [77, "mov eax, [rbp+var_C]"], [78, "movsxd rcx, eax"], [79, "mov rax, [rbp+var_28]"], [80, "add rax, rcx"], [81, "movzx eax, byte ptr [rax]"], [82, "cmp dl, al"], [83, "setz al"], [84, "mov [rbp+var_5A], al"], [85, "movzx eax, [rbp+var_5A]"], [86, "xor eax, 1"], [87, "test al, al"], [88, "jz short loc_4187C4"], [89, "mov eax, [rbp+var_C]"], [90, "movsxd rdx, eax"], [91, "mov rax, [rbp+var_28]"], [92, "add rax, rdx"], [93, "movzx eax, byte ptr [rax]"], [94, "movsx edi, al"], [95, "mov eax, [rbp+var_8]"], [96, "movsxd rdx, eax"], [97, "mov rax, [rbp+var_18]"], [98, "add rax, rdx"], [99, "movzx eax, byte ptr [rax]"], [100, "movsx ecx, al"], [101, "mov esi, [rbp+var_C]"], [102, "mov edx, [rbp+var_8]"], [103, "mov rax, [rbp+stream]"], [104, "mov r9d, edi"], [105, "mov r8d, esi"], [106, "mov esi, offset aWfaCheckAlignm"], [107, "mov rdi, rax"], [108, "mov eax, 0"], [109, "call _fprintf"], [110, "mov [rbp+var_1], 0"], [111, "jmp loc_4188B9"], [112, "add [rbp+var_8], 1"], [113, "add [rbp+var_C], 1"], [114, "jmp loc_4188B9"], [115, "cmp [rbp+var_38], 0"], [116, "jz short loc_4187F4"], [117, "mov rdx, [rbp+var_40]"], [118, "mov ecx, [rbp+var_C]"], [119, "mov eax, [rbp+var_8]"], [120, "mov r8, [rbp+var_38]"], [121, "mov esi, ecx"], [122, "mov edi, eax"], [123, "call r8"], [124, "test eax, eax"], [125, "setnz al"], [126, "jmp short loc_418819"], [127, "mov eax, [rbp+var_8]"], [128, "movsxd rdx, eax"], [129, "mov rax, [rbp+var_18]"], [130, "add rax, rdx"], [131, "movzx edx, byte ptr [rax]"], [132, "mov eax, [rbp+var_C]"], [133, "movsxd rcx, eax"], [134, "mov rax, [rbp+var_28]"], [135, "add rax, rcx"], [136, "movzx eax, byte ptr [rax]"], [137, "cmp dl, al"], [138, "setz al"], [139, "mov [rbp+var_59], al"], [140, "cmp [rbp+var_59], 0"], [141, "jz short loc_418870"], [142, "mov eax, [rbp+var_C]"], [143, "movsxd rdx, eax"], [144, "mov rax, [rbp+var_28]"], [145, "add rax, rdx"], [146, "movzx eax, byte ptr [rax]"], [147, "movsx edi, al"], [148, "mov eax, [rbp+var_8]"], [149, "movsxd rdx, eax"], [150, "mov rax, [rbp+var_18]"], [151, "add rax, rdx"], [152, "movzx eax, byte ptr [rax]"], [153, "movsx ecx, al"], [154, "mov esi, [rbp+var_C]"], [155, "mov edx, [rbp+var_8]"], [156, "mov rax, [rbp+stream]"], [157, "mov r9d, edi"], [158, "mov r8d, esi"], [159, "mov esi, offset aWfaCheckAlignm_0"], [160, "mov rdi, rax"], [161, "mov eax, 0"], [162, "call _fprintf"], [163, "mov [rbp+var_1], 0"], [164, "jmp short loc_4188B9"], [165, "add [rbp+var_8], 1"], [166, "add [rbp+var_C], 1"], [167, "jmp short loc_4188B9"], [168, "add [rbp+var_C], 1"], [169, "jmp short loc_4188B9"], [170, "add [rbp+var_8], 1"], [171, "jmp short loc_4188B9"], [172, "mov eax, [rbp+var_10]"], [173, "movsxd rdx, eax"], [174, "mov rax, [rbp+var_50]"], [175, "add rax, rdx"], [176, "movzx eax, byte ptr [rax]"], [177, "movsx edx, al"], [178, "mov rax, [rbp+stream]"], [179, "mov esi, offset aWfaCheckUnknow"], [180, "mov rdi, rax"], [181, "mov eax, 0"], [182, "call _fprintf"], [183, "mov edi, 1"], [184, "call _exit"], [185, "add [rbp+var_10], 1"], [186, "mov eax, [rbp+var_10]"], [187, "cmp eax, [rbp+var_58]"], [188, "jl loc_4186D3"], [189, "mov eax, [rbp+var_8]"], [190, "cmp eax, [rbp+var_1C]"], [191, "jz short loc_4188F1"], [192, "mov ecx, [rbp+var_1C]"], [193, "mov edx, [rbp+var_8]"], [194, "mov rax, [rbp+stream]"], [195, "mov esi, offset aWfaCheckAlignm_1"], [196, "mov rdi, rax"], [197, "mov eax, 0"], [198, "call _fprintf"], [199, "mov [rbp+var_1], 0"], [200, "mov eax, [rbp+var_C]"], [201, "cmp eax, [rbp+var_2C]"], [202, "jz short loc_418919"], [203, "mov ecx, [rbp+var_2C]"], [204, "mov edx, [rbp+var_C]"], [205, "mov rax, [rbp+stream]"], [206, "mov esi, offset aWfaCheckAlignm_2"], [207, "mov rdi, rax"], [208, "mov eax, 0"], [209, "call _fprintf"], [210, "mov [rbp+var_1], 0"], [211, "movzx eax, [rbp+var_1]"], [212, "leave"], [213, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 4], [9, 8], [10, 9], [11, 4], [12, 11], [13, 12], [14, 4], [15, 14], [16, 15], [17, 4], [18, 17], [19, 18], [20, 4], [21, 20], [22, 21], [23, 4], [24, 23], [25, 24], [26, 25], [27, 26], [28, 27], [29, 25], [30, 29], [31, 30], [32, 25], [33, 32], [34, 33], [38, 31], [39, 38], [41, 39], [41, 185], [42, 41], [43, 28], [44, 42], [44, 43], [45, 44], [46, 45], [47, 46], [48, 47], [49, 46], [50, 49], [51, 46], [52, 51], [53, 46], [54, 53], [55, 46], [56, 55], [57, 46], [58, 57], [60, 19], [61, 60], [62, 22], [63, 166], [63, 168], [63, 113], [63, 37], [64, 112], [64, 36], [64, 170], [64, 165], [65, 19], [66, 63], [67, 64], [68, 65], [69, 68], [70, 69], [72, 36], [72, 170], [72, 165], [72, 112], [73, 72], [74, 7], [75, 74], [75, 73], [76, 75], [77, 37], [77, 166], [77, 168], [77, 113], [78, 77], [79, 13], [80, 78], [80, 79], [81, 80], [82, 81], [82, 76], [83, 82], [83, 81], [84, 70], [84, 83], [85, 84], [86, 85], [87, 86], [88, 87], [89, 166], [89, 168], [89, 113], [89, 37], [90, 89], [91, 13], [92, 90], [92, 91], [93, 92], [94, 93], [95, 36], [95, 170], [95, 165], [95, 112], [96, 95], [97, 7], [98, 96], [98, 97], [99, 98], [100, 99], [101, 37], [101, 166], [101, 168], [101, 113], [102, 36], [102, 170], [102, 165], [102, 112], [103, 3], [104, 94], [105, 101], [107, 103], [112, 36], [112, 170], [112, 165], [112, 112], [113, 37], [113, 166], [113, 168], [113, 113], [115, 19], [116, 115], [117, 22], [118, 168], [118, 113], [118, 37], [118, 166], [119, 36], [119, 170], [119, 165], [119, 112], [120, 19], [121, 118], [122, 119], [123, 120], [124, 123], [125, 124], [127, 170], [127, 165], [127, 112], [127, 36], [128, 127], [129, 7], [130, 128], [130, 129], [131, 130], [132, 166], [132, 168], [132, 113], [132, 37], [133, 132], [134, 13], [135, 133], [135, 134], [136, 135], [137, 131], [137, 136], [138, 137], [138, 136], [139, 125], [139, 138], [140, 139], [141, 140], [142, 166], [142, 168], [142, 113], [142, 37], [143, 142], [144, 13], [145, 144], [145, 143], [146, 145], [147, 146], [148, 170], [148, 165], [148, 112], [148, 36], [149, 148], [150, 7], [151, 150], [151, 149], [152, 151], [153, 152], [154, 166], [154, 168], [154, 113], [154, 37], [155, 165], [155, 112], [155, 36], [155, 170], [156, 3], [157, 147], [158, 154], [160, 156], [165, 170], [165, 165], [165, 112], [165, 36], [166, 37], [166, 166], [166, 168], [166, 113], [168, 166], [168, 168], [168, 113], [168, 37], [170, 36], [170, 170], [170, 165], [170, 112], [172, 39], [172, 185], [173, 172], [174, 28], [175, 174], [175, 173], [176, 175], [177, 176], [178, 3], [180, 178], [185, 39], [185, 185], [186, 39], [186, 185], [187, 34], [187, 186], [188, 187], [189, 36], [189, 170], [189, 165], [189, 112], [190, 10], [190, 189], [191, 190], [192, 10], [193, 36], [193, 170], [193, 165], [193, 112], [194, 3], [196, 194], [200, 37], [200, 166], [200, 168], [200, 113], [201, 16], [201, 200], [202, 201], [203, 16], [204, 166], [204, 168], [204, 113], [204, 37], [205, 3], [207, 205], [211, 35], [211, 163], [211, 199], [211, 110], [211, 210], [213, 211]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/701b6654e64c67cb8338f0fc2d732a77fe8d9ce70cdd955693e8e4a9fbb413e0_701b6654e64c67cb8338f0fc2d732a77fe8d9ce70cdd955693e8e4a9fbb413e0.jsonl.gz", "strip_func_name": "sub_418634", "query": "\n\n\n__int64 __fastcall sub_418634(FILE *a1, __int64 a2)\n{\nint v2; // eax\nbool v3; // al\nbool v4; // al\nint v6; // [rsp+18h] [rbp-58h]\n__int64 v7; // [rsp+20h] [rbp-50h]\n__int64 *v8; // [rsp+28h] [rbp-48h]\n__int64 v9; // [rsp+30h] [rbp-40h]\nunsigned int (__fastcall *v10)(_QWORD, _QWORD, __int64); // [rsp+38h] [rbp-38h]\nunsigned int v11; // [rsp+44h] [rbp-2Ch]\n__int64 v12; // [rsp+48h] [rbp-28h]\nunsigned int v13; // [rsp+54h] [rbp-1Ch]\n__int64 v14; // [rsp+58h] [rbp-18h]\nint i; // [rsp+60h] [rbp-10h]\nunsigned int v16; // [rsp+64h] [rbp-Ch]\nunsigned int v17; // [rsp+68h] [rbp-8h]\nunsigned __int8 v18; // [rsp+6Fh] [rbp-1h]\n\nv14 = *(_QWORD *)(a2 + 64);\nv13 = *(_DWORD *)(a2 + 72);\nv12 = *(_QWORD *)(a2 + 80);\nv11 = *(_DWORD *)(a2 + 88);\nv10 = *(unsigned int (__fastcall **)(_QWORD, _QWORD, __int64))(a2 + 96);\nv9 = *(_QWORD *)(a2 + 104);\nv8 = *(__int64 **)(a2 + 344);\nv7 = *v8;\nv6 = *((_DWORD *)v8 + 4);\nv18 = 1;\nv17 = 0;\nv16 = 0;\nfor ( i = *((_DWORD *)v8 + 3); i < v6; ++i )\n{\nv2 = *(char *)(i + v7);\nif ( v2 == 88 )\n{\nif ( v10 )\nv4 = v10(v17, v16, v9) != 0;\nelse\nv4 = *(_BYTE *)((int)v17 + v14) == *(_BYTE *)((int)v16 + v12);\nif ( v4 )\n{\nfprintf(\na1,\n\"[WFA::Check] Alignment not mismatching (pattern[%d]=%c == text[%d]=%c)\\n\",\nv17,\n(unsigned int)*(char *)((int)v17 + v14),\nv16,\n(unsigned int)*(char *)((int)v16 + v12));\nv18 = 0;\n}\nelse\n{\n++v17;\n++v16;\n}\n}\nelse\n{\nif ( v2 > 88 )\ngoto LABEL_23;\nif ( v2 == 77 )\n{\nif ( v10 )\nv3 = v10(v17, v16, v9) != 0;\nelse\nv3 = *(_BYTE *)((int)v17 + v14) == *(_BYTE *)((int)v16 + v12);\nif ( !v3 )\n{\nfprintf(\na1,\n\"[WFA::Check] Alignment not matching (pattern[%d]=%c != text[%d]=%c)\\n\",\nv17,\n(unsigned int)*(char *)((int)v17 + v14),\nv16,\n(unsigned int)*(char *)((int)v16 + v12));\nv18 = 0;\n}\nelse\n{\n++v17;\n++v16;\n}\n}\nelse\n{\nif ( v2 > 77 )\ngoto LABEL_23;\nif ( v2 == 68 )\n{\n++v17;\n}\nelse\n{\nif ( v2 != 73 )\n{\nLABEL_23:\nfprintf(a1, \"[WFA::Check] Unknown edit operation '%c'\\n\", (unsigned int)*(char *)(i + v7));\nexit(1);\n}\n++v16;\n}\n}\n}\n}\nif ( v17 != v13 )\n{\nfprintf(a1, \"[WFA::Check] Alignment incorrect length (pattern-aligned=%d,pattern-length=%d)\\n\", v17, v13);\nv18 = 0;\n}\nif ( v16 != v11 )\n{\nfprintf(a1, \"[WFA::Check] Alignment incorrect length (text-aligned=%d,text-length=%d)\\n\", v16, v11);\nv18 = 0;\n}\nreturn v18;\n}\n\n\n\nQ:[a1,a2,v6,v7,v8,v9,v10,v11,v12,v13,v14,v16,v17,v18,sub_418634,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'stream', 'a2': 'wf_aligner', 'v6': 'end_offset', 'v7': 'operations', 'v8': 'cigar', 'v9': 'match_funct_arguments', 'v10': 'match_funct', 'v11': 'text_length', 'v12': 'text', 'v13': 'pattern_length', 'v14': 'pattern', 'v16': 'text_pos', 'v17': 'pattern_pos', 'v18': 'alignment_correct', 'sub_418634': 'wavefront_check_alignment'}"}
handle_getstat
947eb4eaba93dde3b6be47d536943c47d9e09fc7fb5934c699a53c8156976991
Cpasjuste
usbhostfs
NA
int handle_getstat(struct usb_dev_handle *hDev, struct HostFsGetstatCmd *cmd, int cmdlen) { struct HostFsGetstatResp resp; SceIoStat st; int ret = -1; char path[HOSTFS_PATHMAX]; char fullpath[PATH_MAX]; memset(&resp, 0, sizeof(resp)); resp.cmd.magic = LE32(HOSTFS_MAGIC); resp.cmd.command = LE32(HOSTFS_CMD_GETSTAT); resp.res = LE32(-1); memset(&st, 0, sizeof(st)); do { if (cmdlen != sizeof(struct HostFsGetstatCmd)) { fprintf(stderr, "Error, invalid getstat command size %d\n", cmdlen); break; } if (LE32(cmd->cmd.extralen) == 0) { fprintf(stderr, "Error, no filename passed with getstat command\n"); break; } /* TODO: Should check that length is within a valid range */ ret = euid_usb_bulk_read(hDev, 0x81, path, LE32(cmd->cmd.extralen), 10000); if (ret != LE32(cmd->cmd.extralen)) { fprintf(stderr, "Error reading getstat data cmd->extralen %d, ret %d\n", LE32(cmd->cmd.extralen), ret); break; } V_PRINTF(2, "Getstat command name %s\n", path); if (make_path(LE32(cmd->fsnum), path, fullpath, 0) == 0) { resp.res = LE32(fill_stat(NULL, fullpath, &st)); if (LE32(resp.res) == 0) { resp.cmd.extralen = LE32(sizeof(st)); //printf("Getstat(%s): m=%i a=%i s=%li\n", fullpath, st.mode, st.attr, (long) st.size); } } ret = euid_usb_bulk_write(hDev, 0x2, (char *) &resp, sizeof(resp), 10000); if (ret < 0) { fprintf(stderr, "Error writing getstat response (%d)\n", ret); break; } if (LE32(resp.cmd.extralen) > 0) { ret = euid_usb_bulk_write(hDev, 0x2, (char *) &st, sizeof(st), 10000); } } while (0); return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406F72", "function_addr": 4222834, "binary_name": "947eb4eaba93dde3b6be47d536943c47d9e09fc7fb5934c699a53c8156976991.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20A0h"], [3, "mov [rbp+var_2088], rdi"], [4, "mov [rbp+var_2090], rsi"], [5, "mov [rbp+var_2094], edx"], [6, "mov [rbp+var_4], 0FFFFFFFFh"], [7, "lea rax, [rbp+s]"], [8, "mov edx, 10h"], [9, "mov esi, 0"], [10, "mov rdi, rax"], [11, "call _memset"], [12, "mov [rbp+s], 782F0812h"], [13, "mov [rbp+var_1C], 8FFC000Dh"], [14, "mov [rbp+var_14], 0FFFFFFFFh"], [15, "lea rax, [rbp+var_80]"], [16, "mov edx, 58h "], [17, "mov esi, 0"], [18, "mov rdi, rax"], [19, "call _memset"], [20, "cmp [rbp+var_2094], 10h"], [21, "jz short loc_407006"], [22, "mov rax, cs:stderr"], [23, "mov edx, [rbp+var_2094]"], [24, "mov esi, offset aErrorInvalidGe"], [25, "mov rdi, rax"], [26, "mov eax, 0"], [27, "call _fprintf"], [28, "jmp loc_407196"], [29, "mov rax, [rbp+var_2090]"], [30, "mov eax, [rax+8]"], [31, "test eax, eax"], [32, "jnz short loc_407037"], [33, "mov rax, cs:stderr"], [34, "mov rcx, rax"], [35, "mov edx, 2Fh "], [36, "mov esi, 1"], [37, "mov edi, offset aErrorNoFilenam_3"], [38, "call _fwrite"], [39, "jmp loc_407196"], [40, "mov rax, [rbp+var_2090]"], [41, "mov eax, [rax+8]"], [42, "mov ecx, eax"], [43, "lea rdx, [rbp+var_1080]"], [44, "mov rax, [rbp+var_2088]"], [45, "mov r8d, 2710h"], [46, "mov esi, 81h"], [47, "mov rdi, rax"], [48, "call sub_4026C8"], [49, "mov [rbp+var_4], eax"], [50, "mov rax, [rbp+var_2090]"], [51, "mov edx, [rax+8]"], [52, "mov eax, [rbp+var_4]"], [53, "cmp edx, eax"], [54, "jz short loc_4070A3"], [55, "mov rax, [rbp+var_2090]"], [56, "mov edx, [rax+8]"], [57, "mov rax, cs:stderr"], [58, "mov ecx, [rbp+var_4]"], [59, "mov esi, offset aErrorReadingGe"], [60, "mov rdi, rax"], [61, "mov eax, 0"], [62, "call _fprintf"], [63, "jmp loc_407196"], [64, "mov eax, cs:dword_40D448"], [65, "cmp eax, 1"], [66, "jle short loc_4070CE"], [67, "mov rax, cs:stderr"], [68, "lea rdx, [rbp+var_1080]"], [69, "mov esi, offset aGetstatCommand"], [70, "mov rdi, rax"], [71, "mov eax, 0"], [72, "call _fprintf"], [73, "mov rax, [rbp+var_2090]"], [74, "mov eax, [rax+0Ch]"], [75, "lea rdx, [rbp+var_2080]"], [76, "lea rsi, [rbp+var_1080]"], [77, "mov ecx, 0"], [78, "mov edi, eax"], [79, "call sub_404ACD"], [80, "test eax, eax"], [81, "jnz short loc_40711F"], [82, "lea rdx, [rbp+var_80]"], [83, "lea rax, [rbp+var_2080]"], [84, "mov rsi, rax"], [85, "mov edi, 0"], [86, "call sub_405150"], [87, "mov [rbp+var_14], eax"], [88, "mov eax, [rbp+var_14]"], [89, "test eax, eax"], [90, "jnz short loc_40711F"], [91, "mov [rbp+var_18], 58h "], [92, "lea rdx, [rbp+s]"], [93, "mov rax, [rbp+var_2088]"], [94, "mov r8d, 2710h"], [95, "mov ecx, 10h"], [96, "mov esi, 2"], [97, "mov rdi, rax"], [98, "call sub_4025F2"], [99, "mov [rbp+var_4], eax"], [100, "cmp [rbp+var_4], 0"], [101, "jns short loc_407169"], [102, "mov rax, cs:stderr"], [103, "mov edx, [rbp+var_4]"], [104, "mov esi, offset aErrorWritingGe"], [105, "mov rdi, rax"], [106, "mov eax, 0"], [107, "call _fprintf"], [108, "jmp short loc_407196"], [109, "mov eax, [rbp+var_18]"], [110, "test eax, eax"], [111, "jz short loc_407196"], [112, "lea rdx, [rbp+var_80]"], [113, "mov rax, [rbp+var_2088]"], [114, "mov r8d, 2710h"], [115, "mov ecx, 58h "], [116, "mov esi, 2"], [117, "mov rdi, rax"], [118, "call sub_4025F2"], [119, "mov [rbp+var_4], eax"], [120, "mov eax, [rbp+var_4]"], [121, "leave"], [122, "retn"]], "data_dep": [[10, 7], [15, 11], [18, 15], [20, 5], [21, 20], [23, 5], [25, 22], [29, 4], [30, 29], [31, 30], [32, 31], [34, 33], [40, 4], [41, 40], [42, 41], [43, 16], [44, 3], [47, 44], [49, 48], [50, 4], [51, 50], [52, 49], [53, 52], [53, 51], [54, 53], [55, 4], [56, 55], [58, 49], [60, 57], [65, 64], [66, 65], [68, 51], [70, 67], [73, 4], [74, 73], [75, 51], [75, 68], [76, 46], [76, 69], [78, 74], [80, 79], [81, 80], [82, 75], [83, 80], [84, 83], [87, 86], [88, 87], [89, 88], [90, 89], [92, 12], [92, 82], [92, 75], [93, 3], [97, 93], [99, 98], [100, 99], [101, 100], [103, 99], [105, 102], [109, 91], [110, 109], [111, 110], [112, 92], [113, 3], [117, 113], [119, 118], [120, 49], [120, 6], [120, 119], [120, 99], [122, 120]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/947eb4eaba93dde3b6be47d536943c47d9e09fc7fb5934c699a53c8156976991_947eb4eaba93dde3b6be47d536943c47d9e09fc7fb5934c699a53c8156976991.jsonl.gz", "strip_func_name": "sub_406F72", "query": "\n\n\n__int64 __fastcall sub_406F72(const void *a1, __int64 a2, unsigned int a3)\n{\nchar v5[4096]; // [rsp+20h] [rbp-2080h] BYREF\nchar v6[4096]; // [rsp+1020h] [rbp-1080h] BYREF\nchar v7[96]; // [rsp+2020h] [rbp-80h] BYREF\nint s[2]; // [rsp+2080h] [rbp-20h] BYREF\nint v9; // [rsp+2088h] [rbp-18h]\nint v10; // [rsp+208Ch] [rbp-14h]\nunsigned int v11; // [rsp+209Ch] [rbp-4h]\n\nv11 = -1;\nmemset(s, 0, 0x10uLL);\ns[0] = 2016348178;\ns[1] = -1879310323;\nv10 = -1;\nmemset(v7, 0, 0x58uLL);\nif ( a3 == 16 )\n{\nif ( *(_DWORD *)(a2 + 8) )\n{\nv11 = sub_4026C8(a1, 0x81u, v6, *(_DWORD *)(a2 + 8), 0x2710u);\nif ( *(_DWORD *)(a2 + 8) == v11 )\n{\nif ( dword_40D448 > 1 )\nfprintf(stderr, \"Getstat command name %s\\n\", v6);\nif ( !(unsigned int)sub_404ACD(*(_DWORD *)(a2 + 12), v6, v5, 0) )\n{\nv10 = sub_405150(0LL, v5, (__int64)v7);\nif ( !v10 )\nv9 = 88;\n}\nv11 = sub_4025F2(a1, 2u, s, 0x10u, 0x2710u);\nif ( (v11 & 0x80000000) == 0 )\n{\nif ( v9 )\nv11 = sub_4025F2(a1, 2u, v7, 0x58u, 0x2710u);\n}\nelse\n{\nfprintf(stderr, \"Error writing getstat response (%d)\\n\", v11);\n}\n}\nelse\n{\nfprintf(stderr, \"Error reading getstat data cmd->extralen %d, ret %d\\n\", *(unsigned int *)(a2 + 8), v11);\n}\n}\nelse\n{\nfwrite(\"Error, no filename passed with getstat command\\n\", 1uLL, 0x2FuLL, stderr);\n}\n}\nelse\n{\nfprintf(stderr, \"Error, invalid getstat command size %d\\n\", a3);\n}\nreturn v11;\n}\n\n\n\nQ:[a3,a1,a2,v5,v6,v7,s,sub_406F72,sub_4026C8,sub_404ACD,sub_405150,sub_4025F2,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'cmdlen', 'a1': 'hDev', 'a2': 'cmd', 'v5': 'fullpath', 'v6': 'path', 'v7': 'st', 's': 'resp', 'sub_406F72': 'handle_getstat', 'sub_4026C8': 'euid_usb_bulk_read', 'sub_404ACD': 'make_path', 'sub_405150': 'fill_stat', 'sub_4025F2': 'euid_usb_bulk_write'}"}
dict_add_op
caf0e9094c1c7d88d962d9401d9619ae0fc801c9959c3f1966d2975abcc2738d
zevv
zForth
NA
static void dict_add_op(zf_addr op) { dict_add_cell(op); trace("+%s ", op_name(op)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404F72", "function_addr": 4214642, "binary_name": "caf0e9094c1c7d88d962d9401d9619ae0fc801c9959c3f1966d2975abcc2738d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_4], edi"], [4, "mov eax, [rbp+var_4]"], [5, "test rax, rax"], [6, "js short loc_404F94"], [7, "pxor xmm1, xmm1"], [8, "cvtsi2ss xmm1, rax"], [9, "movd eax, xmm1"], [10, "jmp short loc_404FB1"], [11, "mov rdx, rax"], [12, "shr rdx, 1"], [13, "and eax, 1"], [14, "or rdx, rax"], [15, "pxor xmm0, xmm0"], [16, "cvtsi2ss xmm0, rdx"], [17, "addss xmm0, xmm0"], [18, "movd eax, xmm0"], [19, "movd xmm0, eax"], [20, "call sub_404F51"], [21, "mov rax, cs:off_40D8E0"], [22, "lea rcx, [rax+8]"], [23, "mov rax, rcx"], [24, "mov rdx, rax"], [25, "shr rdx, 3"], [26, "add rdx, 7FFF8000h"], [27, "movzx edx, byte ptr [rdx]"], [28, "test dl, dl"], [29, "setnz dil"], [30, "mov rsi, rax"], [31, "and esi, 7"], [32, "add esi, 3"], [33, "cmp sil, dl"], [34, "setnl dl"], [35, "and edx, edi"], [36, "test dl, dl"], [37, "jz short loc_404FFC"], [38, "mov rdi, rax"], [39, "call ___asan_report_load4"], [40, "mov eax, [rcx]"], [41, "test eax, eax"], [42, "jz short loc_40501E"], [43, "mov eax, [rbp+var_4]"], [44, "mov edi, eax"], [45, "call sub_403365"], [46, "mov rsi, rax"], [47, "mov edi, offset aS"], [48, "mov eax, 0"], [49, "call sub_4031BC"], [50, "nop"], [51, "leave"], [52, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [8, 5], [8, 7], [9, 8], [11, 5], [12, 11], [13, 5], [14, 13], [14, 12], [16, 15], [16, 14], [17, 16], [18, 17], [19, 9], [19, 18], [22, 21], [23, 22], [24, 23], [25, 24], [26, 25], [27, 26], [28, 27], [29, 28], [30, 23], [31, 30], [32, 31], [33, 32], [33, 28], [34, 28], [34, 33], [35, 29], [35, 34], [36, 35], [37, 36], [38, 23], [40, 22], [41, 40], [42, 41], [43, 3], [44, 43], [46, 45], [52, 49], [52, 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/caf0e9094c1c7d88d962d9401d9619ae0fc801c9959c3f1966d2975abcc2738d_caf0e9094c1c7d88d962d9401d9619ae0fc801c9959c3f1966d2975abcc2738d.jsonl.gz", "strip_func_name": "sub_404F72", "query": "\n\n\n_BYTE *__fastcall sub_404F72(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, double a7, double a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14)\n{\n__m128 v14; // xmm1\n__m128 v15; // xmm0\nchar *v16; // rcx\n_BYTE *result; // rax\nchar *v18; // rax\n__int64 v19; // rdx\n__int64 v20; // rcx\n__int64 v21; // r8\n__int64 v22; // r9\n__m128 v23; // xmm4\n__m128 v24; // xmm5\nchar v25; // [rsp+0h] [rbp-10h]\n\nv14 = 0LL;\nv14.m128_f32[0] = (float)(int)a1;\nv15 = (__m128)_mm_cvtsi32_si128(_mm_cvtsi128_si32((__m128i)v14));\nsub_404F51(v15.m128_f32[0], v14, a9, a10, a11, a12, a13, a14, a1, a2, a3, a4, a5, a6);\nv16 = off_40D8E0 + 8;\nif ( *(_BYTE *)(((unsigned __int64)(off_40D8E0 + 8) >> 3) + 0x7FFF8000) != 0\n&& (char)((((_BYTE)off_40D8E0 + 8) & 7) + 3) >= *(_BYTE *)(((unsigned __int64)(off_40D8E0 + 8) >> 3) + 0x7FFF8000) )\n{\n__asan_report_load4();\n}\nresult = (_BYTE *)*(unsigned int *)v16;\nif ( (_DWORD)result )\n{\nv18 = sub_403365(a1);\nresult = sub_4031BC(\"+%s \", (__int64)v18, v19, v20, v21, v22, v15, v14, a9, a10, v23, v24, a13, a14, v25);\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_404F72,sub_404F51,sub_403365,sub_4031BC,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'op', 'sub_404F72': 'dict_add_op', 'sub_404F51': 'dict_add_cell', 'sub_403365': 'op_name', 'sub_4031BC': 'do_trace'}"}
is_ntfs_reserved
fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc
msysgit
msysgit
NA
int is_ntfs_reserved(const char *path, size_t len) { if (conflicts_with_ntfs_short_name(path, len)) return 1; switch (path[len - 1]) { case '.': case ' ': case ':': return 1; } if (only_spaces_and_periods(path, len, 3)) { if (!strncasecmp(path, "CON", 3) || !strncasecmp(path, "PRN", 3) || !strncasecmp(path, "AUX", 3) || !strncasecmp(path, "NUL", 3)) return 1; } else if (only_spaces_and_periods(path, len, 4) && isdigit(path[3])) if (!strncasecmp(path, "COM", 3) || !strncasecmp(path, "LPT", 3)) return 1; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40CAD8", "function_addr": 4246232, "binary_name": "fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+s1], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rdx, [rbp+var_10]"], [6, "mov rax, [rbp+s1]"], [7, "mov rsi, rdx"], [8, "mov rdi, rax"], [9, "call sub_40C995"], [10, "test eax, eax"], [11, "jz short loc_40CB09"], [12, "mov eax, 1"], [13, "jmp locret_40CC5B"], [14, "mov rax, [rbp+var_10]"], [15, "lea rdx, [rax-1]"], [16, "mov rax, [rbp+s1]"], [17, "add rax, rdx"], [18, "movzx eax, byte ptr [rax]"], [19, "movsx eax, al"], [20, "cmp eax, 3Ah "], [21, "setnbe dl"], [22, "test dl, dl"], [23, "jnz short loc_40CB53"], [24, "mov edx, 1"], [25, "mov ecx, eax"], [26, "shl rdx, cl"], [27, "mov rax, 400400100000000h"], [28, "and rax, rdx"], [29, "test rax, rax"], [30, "setnz al"], [31, "test al, al"], [32, "jz short loc_40CB53"], [33, "mov eax, 1"], [34, "jmp locret_40CC5B"], [35, "mov rcx, [rbp+var_10]"], [36, "mov rax, [rbp+s1]"], [37, "mov edx, 3"], [38, "mov rsi, rcx"], [39, "mov rdi, rax"], [40, "call sub_40C7BF"], [41, "test eax, eax"], [42, "jz short loc_40CBDE"], [43, "mov rax, [rbp+s1]"], [44, "mov edx, 3"], [45, "mov esi, offset off_4C7F78"], [46, "mov rdi, rax"], [47, "call _strncasecmp"], [48, "test eax, eax"], [49, "jz short loc_40CBD7"], [50, "mov rax, [rbp+s1]"], [51, "mov edx, 3"], [52, "mov esi, (offset off_4C7F78+4)"], [53, "mov rdi, rax"], [54, "call _strncasecmp"], [55, "test eax, eax"], [56, "jz short loc_40CBD7"], [57, "mov rax, [rbp+s1]"], [58, "mov edx, 3"], [59, "mov esi, offset aAux"], [60, "mov rdi, rax"], [61, "call _strncasecmp"], [62, "test eax, eax"], [63, "jz short loc_40CBD7"], [64, "mov rax, [rbp+s1]"], [65, "mov edx, 3"], [66, "mov esi, offset aNul"], [67, "mov rdi, rax"], [68, "call _strncasecmp"], [69, "test eax, eax"], [70, "jnz short loc_40CC56"], [71, "mov eax, 1"], [72, "jmp short locret_40CC5B"], [73, "mov rcx, [rbp+var_10]"], [74, "mov rax, [rbp+s1]"], [75, "mov edx, 4"], [76, "mov rsi, rcx"], [77, "mov rdi, rax"], [78, "call sub_40C7BF"], [79, "test eax, eax"], [80, "jz short loc_40CC56"], [81, "mov rax, [rbp+s1]"], [82, "add rax, 3"], [83, "movzx eax, byte ptr [rax]"], [84, "movzx eax, al"], [85, "cdqe"], [86, "movzx eax, ds:byte_4C7860[rax]"], [87, "movzx eax, al"], [88, "and eax, 2"], [89, "test eax, eax"], [90, "jz short loc_40CC56"], [91, "mov rax, [rbp+s1]"], [92, "mov edx, 3"], [93, "mov esi, offset off_4C7F88"], [94, "mov rdi, rax"], [95, "call _strncasecmp"], [96, "test eax, eax"], [97, "jz short loc_40CC4F"], [98, "mov rax, [rbp+s1]"], [99, "mov edx, 3"], [100, "mov esi, (offset off_4C7F88+4)"], [101, "mov rdi, rax"], [102, "call _strncasecmp"], [103, "test eax, eax"], [104, "jnz short loc_40CC56"], [105, "mov eax, 1"], [106, "jmp short locret_40CC5B"], [107, "mov eax, 0"], [108, "leave"], [109, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 5], [8, 6], [10, 9], [11, 10], [14, 4], [15, 5], [15, 14], [16, 3], [17, 16], [17, 15], [18, 17], [19, 18], [20, 19], [21, 20], [21, 15], [22, 21], [23, 22], [25, 19], [26, 25], [26, 24], [28, 27], [28, 26], [29, 28], [30, 29], [31, 30], [32, 31], [35, 4], [36, 3], [38, 35], [39, 36], [41, 40], [42, 41], [43, 3], [46, 43], [48, 47], [49, 48], [50, 3], [53, 50], [55, 54], [56, 55], [57, 3], [60, 57], [62, 61], [63, 62], [64, 3], [67, 64], [69, 68], [70, 69], [73, 4], [74, 3], [76, 73], [77, 74], [79, 78], [80, 79], [81, 3], [82, 81], [83, 82], [84, 83], [87, 86], [88, 87], [89, 88], [90, 89], [91, 3], [94, 91], [96, 95], [97, 96], [98, 3], [101, 98], [103, 102], [104, 103], [109, 33], [109, 12], [109, 71], [109, 105], [109, 107]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc_fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc.jsonl.gz", "strip_func_name": "sub_40CAD8", "query": "\n\n\n__int64 __fastcall sub_40CAD8(__int64 a1, unsigned __int64 a2)\n{\nunsigned int v3; // eax\n\nif ( sub_40C995(a1, a2) )\nreturn 1LL;\nv3 = *(char *)(a2 - 1 + a1);\nif ( v3 <= 0x3A && ((1LL << v3) & 0x400400100000000LL) != 0 )\nreturn 1LL;\nif ( (unsigned int)sub_40C7BF(a1, a2, 3uLL) )\n{\nif ( !strncasecmp((const char *)a1, off_4C7F78, 3uLL)\n|| !strncasecmp((const char *)a1, &off_4C7F78[4], 3uLL)\n|| !strncasecmp((const char *)a1, \"AUX\", 3uLL)\n|| !strncasecmp((const char *)a1, \"NUL\", 3uLL) )\n{\nreturn 1LL;\n}\n}\nelse if ( (unsigned int)sub_40C7BF(a1, a2, 4uLL)\n&& (byte_4C7860[*(unsigned __int8 *)(a1 + 3)] & 2) != 0\n&& (!strncasecmp((const char *)a1, off_4C7F88, 3uLL) || !strncasecmp((const char *)a1, &off_4C7F88[4], 3uLL)) )\n{\nreturn 1LL;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,sub_40CAD8,sub_40C995,sub_40C7BF,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'path', 'a2': 'len', 'sub_40CAD8': 'is_ntfs_reserved', 'sub_40C995': 'conflicts_with_ntfs_short_name', 'sub_40C7BF': 'only_spaces_and_periods'}"}
Tcl_ScanmatchCmd
33451d7c33c0116afa41ae1cb50c24d3d22c0a09c648359d4c9d7653db3908e4
interkosmos
micropolis
NA
static int Tcl_ScanmatchCmd (clientData, interp, argc, argv) char *clientData; Tcl_Interp *interp; int argc; char **argv; { scanGlob_pt scanGlobPtr = (scanGlob_pt) clientData; scanContext_pt contextPtr; char *result; matchDef_pt newmatch; int compFlags = REXP_BOTH_ALGORITHMS; int firstArg = 1; if (argc < 3) goto argError; if (STREQU (argv[1], "-nocase")) { compFlags |= REXP_NO_CASE; firstArg = 2; } /* * If firstArg == 2 (-nocase), the both a regular expression and a command * string must be specified, otherwise the regular expression is optional. */ if (((firstArg == 2) && (argc != 5)) || ((firstArg == 1) && (argc > 4))) goto argError; if ((contextPtr = Tcl_HandleXlate (interp, scanGlobPtr->tblHdrPtr, argv [firstArg])) == NULL) return TCL_ERROR; /* * Handle the default case (no regular expression). */ if (argc == 3) { if (contextPtr->defaultAction) { Tcl_AppendResult (interp, argv [0], ": default match already ", "specified in this scan context", (char *) NULL); return TCL_ERROR; } contextPtr->defaultAction = ckalloc (strlen (argv [2]) + 1); strcpy (contextPtr->defaultAction, argv [2]); return TCL_OK; } /* * Add a regular expression to the context. */ newmatch = (matchDef_pt) ckalloc(sizeof (matchDef_t)); newmatch->matchflags = 0; if (compFlags & REXP_NO_CASE) { newmatch->matchflags |= MATCH_CASE_INSENSITIVE_FLAG; contextPtr->flags |= CONTEXT_A_CASE_INSENSITIVE_FLAG; } if (Tcl_RegExpCompile (interp, &newmatch->regExpInfo, argv [firstArg + 1], compFlags) != TCL_OK) { ckfree ((char *) newmatch); return (TCL_ERROR); } newmatch->command = ckalloc (strlen (argv[firstArg + 2]) + 1); strcpy(newmatch->command, argv [firstArg + 2]); /* * Link in the new match. */ newmatch->nextMatchDefPtr = NULL; if (contextPtr->matchListHead == NULL) contextPtr->matchListHead = newmatch; else contextPtr->matchListTail->nextMatchDefPtr = newmatch; contextPtr->matchListTail = newmatch; return TCL_OK; argError: Tcl_AppendResult (interp, tclXWrongArgs, argv [0], " [-nocase] contexthandle [regexp] command", (char *) NULL); return TCL_ERROR; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4108CC", "function_addr": 4262092, "binary_name": "33451d7c33c0116afa41ae1cb50c24d3d22c0a09c648359d4c9d7653db3908e4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_34], edx"], [6, "mov [rbp+var_40], rcx"], [7, "mov rax, [rbp+var_28]"], [8, "mov [rbp+var_10], rax"], [9, "mov [rbp+var_4], 2"], [10, "mov [rbp+var_8], 1"], [11, "cmp [rbp+var_34], 2"], [12, "jle loc_410B83"], [13, "mov rax, [rbp+var_40]"], [14, "add rax, 8"], [15, "mov rax, [rax]"], [16, "movzx eax, byte ptr [rax]"], [17, "mov edx, 2Dh "], [18, "cmp al, dl"], [19, "jnz short loc_410941"], [20, "mov rax, [rbp+var_40]"], [21, "add rax, 8"], [22, "mov rax, [rax]"], [23, "mov esi, offset aNocase"], [24, "mov rdi, rax"], [25, "call _strcmp"], [26, "test eax, eax"], [27, "jnz short loc_410941"], [28, "or [rbp+var_4], 1"], [29, "mov [rbp+var_8], 2"], [30, "cmp [rbp+var_8], 2"], [31, "jnz short loc_410951"], [32, "cmp [rbp+var_34], 5"], [33, "jnz loc_410B86"], [34, "cmp [rbp+var_8], 1"], [35, "jnz short loc_410961"], [36, "cmp [rbp+var_34], 4"], [37, "jg loc_410B86"], [38, "mov eax, [rbp+var_8]"], [39, "cdqe"], [40, "lea rdx, ds:0[rax*8]"], [41, "mov rax, [rbp+var_40]"], [42, "add rax, rdx"], [43, "mov rdx, [rax]"], [44, "mov rax, [rbp+var_10]"], [45, "mov rcx, [rax+8]"], [46, "mov rax, [rbp+var_30]"], [47, "mov rsi, rcx"], [48, "mov rdi, rax"], [49, "call sub_411BD3"], [50, "mov [rbp+var_18], rax"], [51, "cmp [rbp+var_18], 0"], [52, "jnz short loc_4109A4"], [53, "mov eax, 1"], [54, "jmp locret_410BB6"], [55, "cmp [rbp+var_34], 3"], [56, "jnz loc_410A3F"], [57, "mov rax, [rbp+var_18]"], [58, "mov rax, [rax+10h]"], [59, "test rax, rax"], [60, "jz short loc_4109ED"], [61, "mov rax, [rbp+var_40]"], [62, "mov rsi, [rax]"], [63, "mov rax, [rbp+var_30]"], [64, "mov r8d, 0"], [65, "mov ecx, offset aSpecifiedInThi"], [66, "mov edx, offset aDefaultMatchAl"], [67, "mov rdi, rax"], [68, "mov eax, 0"], [69, "call sub_407584"], [70, "mov eax, 1"], [71, "jmp locret_410BB6"], [72, "mov rax, [rbp+var_40]"], [73, "add rax, 10h"], [74, "mov rax, [rax]"], [75, "mov rdi, rax"], [76, "call _strlen"], [77, "add rax, 1"], [78, "mov rdi, rax"], [79, "call _malloc"], [80, "mov rdx, rax"], [81, "mov rax, [rbp+var_18]"], [82, "mov [rax+10h], rdx"], [83, "mov rax, [rbp+var_40]"], [84, "add rax, 10h"], [85, "mov rdx, [rax]"], [86, "mov rax, [rbp+var_18]"], [87, "mov rax, [rax+10h]"], [88, "mov rsi, rdx"], [89, "mov rdi, rax"], [90, "call _strcpy"], [91, "mov eax, 0"], [92, "jmp locret_410BB6"], [93, "mov edi, 30h "], [94, "call _malloc"], [95, "mov [rbp+ptr], rax"], [96, "mov rax, [rbp+ptr]"], [97, "mov word ptr [rax+28h], 0"], [98, "mov eax, [rbp+var_4]"], [99, "and eax, 1"], [100, "test eax, eax"], [101, "jz short loc_410A8B"], [102, "mov rax, [rbp+ptr]"], [103, "movzx eax, word ptr [rax+28h]"], [104, "or eax, 4"], [105, "mov edx, eax"], [106, "mov rax, [rbp+ptr]"], [107, "mov [rax+28h], dx"], [108, "mov rax, [rbp+var_18]"], [109, "movzx eax, word ptr [rax+18h]"], [110, "or eax, 2"], [111, "mov edx, eax"], [112, "mov rax, [rbp+var_18]"], [113, "mov [rax+18h], dx"], [114, "mov eax, [rbp+var_8]"], [115, "cdqe"], [116, "add rax, 1"], [117, "lea rdx, ds:0[rax*8]"], [118, "mov rax, [rbp+var_40]"], [119, "add rax, rdx"], [120, "mov rdx, [rax]"], [121, "mov rsi, [rbp+ptr]"], [122, "mov ecx, [rbp+var_4]"], [123, "mov rax, [rbp+var_30]"], [124, "mov rdi, rax"], [125, "call sub_417F75"], [126, "test eax, eax"], [127, "jz short loc_410AD3"], [128, "mov rax, [rbp+ptr]"], [129, "mov rdi, rax"], [130, "call _free"], [131, "mov eax, 1"], [132, "jmp locret_410BB6"], [133, "mov eax, [rbp+var_8]"], [134, "cdqe"], [135, "add rax, 2"], [136, "lea rdx, ds:0[rax*8]"], [137, "mov rax, [rbp+var_40]"], [138, "add rax, rdx"], [139, "mov rax, [rax]"], [140, "mov rdi, rax"], [141, "call _strlen"], [142, "add rax, 1"], [143, "mov rdi, rax"], [144, "call _malloc"], [145, "mov rdx, rax"], [146, "mov rax, [rbp+ptr]"], [147, "mov [rax+18h], rdx"], [148, "mov eax, [rbp+var_8]"], [149, "cdqe"], [150, "add rax, 2"], [151, "lea rdx, ds:0[rax*8]"], [152, "mov rax, [rbp+var_40]"], [153, "add rax, rdx"], [154, "mov rdx, [rax]"], [155, "mov rax, [rbp+ptr]"], [156, "mov rax, [rax+18h]"], [157, "mov rsi, rdx"], [158, "mov rdi, rax"], [159, "call _strcpy"], [160, "mov rax, [rbp+ptr]"], [161, "mov qword ptr [rax+20h], 0"], [162, "mov rax, [rbp+var_18]"], [163, "mov rax, [rax]"], [164, "test rax, rax"], [165, "jnz short loc_410B60"], [166, "mov rax, [rbp+var_18]"], [167, "mov rdx, [rbp+ptr]"], [168, "mov [rax], rdx"], [169, "jmp short loc_410B70"], [170, "mov rax, [rbp+var_18]"], [171, "mov rax, [rax+8]"], [172, "mov rdx, [rbp+ptr]"], [173, "mov [rax+20h], rdx"], [174, "mov rax, [rbp+var_18]"], [175, "mov rdx, [rbp+ptr]"], [176, "mov [rax+8], rdx"], [177, "mov eax, 0"], [178, "jmp short locret_410BB6"], [179, "nop"], [180, "jmp short loc_410B87"], [181, "nop"], [182, "mov rax, [rbp+var_40]"], [183, "mov rdx, [rax]"], [184, "mov rsi, cs:off_440E58"], [185, "mov rax, [rbp+var_30]"], [186, "mov r8d, 0"], [187, "mov ecx, offset aNocaseContexth"], [188, "mov rdi, rax"], [189, "mov eax, 0"], [190, "call sub_407584"], [191, "mov eax, 1"], [192, "leave"], [193, "retn"]], "data_dep": [[7, 3], [8, 7], [11, 5], [12, 11], [13, 6], [14, 13], [15, 14], [16, 15], [18, 17], [18, 16], [19, 18], [20, 6], [21, 20], [22, 21], [24, 22], [26, 25], [27, 26], [28, 9], [30, 29], [30, 10], [31, 30], [32, 5], [33, 32], [34, 10], [34, 29], [35, 34], [36, 5], [37, 36], [38, 29], [38, 10], [40, 17], [41, 6], [42, 41], [42, 40], [43, 42], [44, 8], [45, 44], [46, 4], [47, 45], [48, 46], [50, 49], [51, 50], [52, 51], [55, 5], [56, 55], [57, 50], [58, 57], [59, 58], [60, 59], [61, 6], [62, 61], [63, 4], [67, 63], [72, 6], [73, 72], [74, 73], [75, 74], [77, 76], [78, 77], [80, 79], [81, 50], [82, 81], [82, 80], [83, 6], [84, 83], [85, 82], [85, 84], [86, 50], [87, 82], [87, 86], [88, 85], [89, 87], [95, 94], [96, 95], [97, 96], [98, 9], [98, 28], [99, 98], [100, 99], [101, 100], [102, 95], [103, 102], [103, 113], [103, 97], [103, 107], [104, 103], [105, 104], [106, 95], [107, 106], [107, 105], [108, 50], [109, 108], [109, 107], [110, 109], [111, 110], [112, 50], [113, 112], [113, 111], [114, 10], [114, 29], [116, 114], [117, 43], [117, 111], [118, 6], [119, 118], [119, 117], [120, 113], [120, 97], [120, 119], [120, 107], [121, 95], [122, 28], [122, 9], [123, 4], [124, 123], [126, 125], [127, 126], [128, 95], [129, 128], [133, 10], [133, 29], [135, 133], [136, 120], [137, 6], [138, 137], [138, 136], [139, 147], [139, 107], [139, 138], [139, 113], [139, 97], [139, 161], [140, 139], [142, 141], [143, 142], [145, 144], [146, 95], [147, 146], [147, 145], [148, 10], [148, 29], [150, 148], [151, 145], [152, 6], [153, 152], [153, 151], [154, 147], [154, 153], [155, 95], [156, 155], [156, 147], [157, 154], [158, 156], [160, 95], [161, 160], [162, 50], [163, 161], [163, 162], [164, 163], [165, 164], [166, 50], [167, 95], [168, 166], [168, 167], [170, 50], [171, 147], [171, 113], [171, 97], [171, 161], [171, 170], [171, 107], [171, 173], [172, 95], [173, 172], [173, 171], [174, 50], [175, 95], [176, 175], [176, 174], [182, 6], [183, 182], [185, 4], [188, 185], [193, 91], [193, 177], [193, 70], [193, 191], [193, 131], [193, 53]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/33451d7c33c0116afa41ae1cb50c24d3d22c0a09c648359d4c9d7653db3908e4_33451d7c33c0116afa41ae1cb50c24d3d22c0a09c648359d4c9d7653db3908e4.jsonl.gz", "strip_func_name": "sub_4108CC", "query": "\n\n\n__int64 __fastcall sub_4108CC(__int64 a1, __int64 a2, int a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 v6; // r9\n__int64 result; // rax\nsize_t v8; // rax\nsize_t v9; // rax\nvoid *ptr; // [rsp+20h] [rbp-20h]\n__int64 v13; // [rsp+28h] [rbp-18h]\nint v14; // [rsp+38h] [rbp-8h]\nunsigned int v15; // [rsp+3Ch] [rbp-4h]\n\nv15 = 2;\nv14 = 1;\nif ( a3 <= 2 )\ngoto LABEL_23;\nif ( **(_BYTE **)(a4 + 8) == 45 && !strcmp(*(const char **)(a4 + 8), \"-nocase\") )\n{\nv15 = 3;\nv14 = 2;\n}\nif ( v14 == 2 && a3 != 5 || v14 == 1 && a3 > 4 )\n{\nLABEL_23:\nsub_407584(\na2,\n(__int64)off_440E58,\n*(_QWORD *)a4,\n(__int64)\" [-nocase] contexthandle [regexp] command\",\n0LL,\na6,\na4);\nresult = 1LL;\n}\nelse\n{\nv13 = sub_411BD3(a2, *(_QWORD *)(a1 + 8), *(_QWORD *)(8LL * v14 + a4));\nif ( v13 )\n{\nif ( a3 == 3 )\n{\nif ( *(_QWORD *)(v13 + 16) )\n{\nsub_407584(\na2,\n*(_QWORD *)a4,\n(__int64)\": default match already \",\n(__int64)\"specified in this scan context\",\n0LL,\nv6);\nresult = 1LL;\n}\nelse\n{\nv8 = strlen(*(const char **)(a4 + 16));\n*(_QWORD *)(v13 + 16) = malloc(v8 + 1);\nstrcpy(*(char **)(v13 + 16), *(const char **)(a4 + 16));\nresult = 0LL;\n}\n}\nelse\n{\nptr = malloc(0x30uLL);\n*((_WORD *)ptr + 20) = 0;\nif ( (v15 & 1) != 0 )\n{\n*((_WORD *)ptr + 20) |= 4u;\n*(_WORD *)(v13 + 24) |= 2u;\n}\nif ( (unsigned int)sub_417F75(a2, ptr, *(_QWORD *)(8 * (v14 + 1LL) + a4), v15) )\n{\nfree(ptr);\nresult = 1LL;\n}\nelse\n{\nv9 = strlen(*(const char **)(8 * (v14 + 2LL) + a4));\n*((_QWORD *)ptr + 3) = malloc(v9 + 1);\nstrcpy(*((char **)ptr + 3), *(const char **)(8 * (v14 + 2LL) + a4));\n*((_QWORD *)ptr + 4) = 0LL;\nif ( *(_QWORD *)v13 )\n*(_QWORD *)(*(_QWORD *)(v13 + 8) + 32LL) = ptr;\nelse\n*(_QWORD *)v13 = ptr;\n*(_QWORD *)(v13 + 8) = ptr;\nresult = 0LL;\n}\n}\n}\nelse\n{\nresult = 1LL;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,ptr,v13,v14,v15,sub_4108CC,sub_407584,sub_411BD3,sub_417F75,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'argc', 'a4': 'argv', 'a1': 'clientData', 'a2': 'interp', 'ptr': 'newmatch', 'v13': 'contextPtr', 'v14': 'firstArg', 'v15': 'compFlags', 'sub_4108CC': 'Tcl_ScanmatchCmd', 'sub_407584': 'Tcl_AppendResult', 'sub_411BD3': 'Tcl_HandleXlate', 'sub_417F75': 'Tcl_RegExpCompile'}"}
map_elf_header
593278ea0c0c471b450a9af463e188d4e5765efefa8e7b916b23f864bd3054d2
sebastiencs
Packer_ELF
NA
static int32_t map_elf_header(t_elf *elf, void *data, size_t size) { if (size < sizeof(Elf64_Ehdr)) { printf("Wrong file\n"); return (-1); } if (!(elf->elf_header = malloc(sizeof(Elf64_Ehdr)))) { return (-1); } memcpy(elf->elf_header, data, sizeof(Elf64_Ehdr)); if (strncmp((char *)elf->elf_header->e_ident, ELFMAG, SELFMAG)) { printf("Wrong file\n"); return (-1); } if (elf->elf_header->e_machine != EM_X86_64) { printf("File architecture not supported. x86_64 only\n"); return (-1); } return (0); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401FB3", "function_addr": 4202419, "binary_name": "593278ea0c0c471b450a9af463e188d4e5765efefa8e7b916b23f864bd3054d2.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+src], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "cmp [rbp+var_18], 3Fh "], [7, "ja short loc_401FE2"], [8, "mov edi, offset aWrongFile"], [9, "call _puts"], [10, "mov eax, 0FFFFFFFFh"], [11, "jmp locret_402079"], [12, "mov edi, 40h "], [13, "call _malloc"], [14, "mov rdx, rax"], [15, "mov rax, [rbp+var_8]"], [16, "mov [rax], rdx"], [17, "mov rax, [rbp+var_8]"], [18, "mov rax, [rax]"], [19, "test rax, rax"], [20, "jnz short loc_402009"], [21, "mov eax, 0FFFFFFFFh"], [22, "jmp short locret_402079"], [23, "mov rax, [rbp+var_8]"], [24, "mov rax, [rax]"], [25, "mov rcx, [rbp+src]"], [26, "mov edx, 40h "], [27, "mov rsi, rcx"], [28, "mov rdi, rax"], [29, "call _memcpy"], [30, "mov rax, [rbp+var_8]"], [31, "mov rax, [rax]"], [32, "mov edx, 4"], [33, "mov esi, offset s2"], [34, "mov rdi, rax"], [35, "call _strncmp"], [36, "test eax, eax"], [37, "jz short loc_402052"], [38, "mov edi, offset aWrongFile"], [39, "call _puts"], [40, "mov eax, 0FFFFFFFFh"], [41, "jmp short locret_402079"], [42, "mov rax, [rbp+var_8]"], [43, "mov rax, [rax]"], [44, "movzx eax, word ptr [rax+12h]"], [45, "cmp ax, 3Eh "], [46, "jz short loc_402074"], [47, "mov edi, offset aFileArchitectu"], [48, "call _puts"], [49, "mov eax, 0FFFFFFFFh"], [50, "jmp short locret_402079"], [51, "mov eax, 0"], [52, "leave"], [53, "retn"]], "data_dep": [[6, 5], [7, 6], [14, 13], [15, 3], [16, 15], [16, 14], [17, 3], [18, 17], [18, 16], [19, 18], [20, 19], [23, 3], [24, 23], [24, 16], [25, 4], [27, 25], [28, 24], [30, 3], [31, 16], [31, 30], [34, 31], [36, 35], [37, 36], [42, 3], [43, 42], [43, 16], [44, 16], [44, 43], [45, 44], [46, 45], [53, 10], [53, 40], [53, 49], [53, 21], [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/593278ea0c0c471b450a9af463e188d4e5765efefa8e7b916b23f864bd3054d2_593278ea0c0c471b450a9af463e188d4e5765efefa8e7b916b23f864bd3054d2.jsonl.gz", "strip_func_name": "sub_401FB3", "query": "\n\n\n__int64 __fastcall sub_401FB3(void **a1, const void *a2, unsigned __int64 a3)\n{\nif ( a3 <= 0x3F )\ngoto LABEL_2;\n*a1 = malloc(0x40uLL);\nif ( !*a1 )\nreturn 0xFFFFFFFFLL;\nmemcpy(*a1, a2, 0x40uLL);\nif ( strncmp((const char *)*a1, &s2, 4uLL) )\n{\nLABEL_2:\nputs(\"Wrong file\");\nreturn 0xFFFFFFFFLL;\n}\nif ( *((_WORD *)*a1 + 9) == 62 )\nreturn 0LL;\nputs(\"File architecture not supported. x86_64 only\");\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[a3,a1,a2,sub_401FB3,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'size', 'a1': 'elf', 'a2': 'data', 'sub_401FB3': 'map_elf_header'}"}
gt_output_sam_gprint_map_block_cigar_forward
507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69
smarco
gem3-mapper
NA
GT_INLINE gt_status gt_output_sam_gprint_map_block_cigar_forward(gt_generic_printer* const gprinter,gt_map* const map,gt_output_sam_attributes* const attributes) { GT_GENERIC_PRINTER_CHECK(gprinter); GT_MAP_CHECK(map); const uint64_t map_length = gt_map_get_base_length(map); uint64_t centinel = 0; GT_MISMS_ITERATE(map,misms) { const uint64_t misms_pos = gt_misms_get_position(misms); switch (misms->misms_type) { case MISMS: if (attributes->print_mismatches) { GT_OUTPUT_SAM_CIGAR_FORWARD_MATCH(); gt_gprintf(gprinter,"1X"); ++centinel; } break; case INS: // SAM Deletion GT_OUTPUT_SAM_CIGAR_FORWARD_MATCH(); gt_gprintf(gprinter,"%"PRIu64"D",gt_misms_get_size(misms)); break; case DEL: // SAM Insertion GT_OUTPUT_SAM_CIGAR_FORWARD_MATCH(); gt_gprintf(gprinter,"%"PRIu64"I",gt_misms_get_size(misms)); centinel+=gt_misms_get_size(misms); break; default: gt_error(SELECTION_NOT_VALID); return GT_SOE_PRINTING_MISM_STRING; break; } } if (centinel < map_length) gt_gprintf(gprinter,"%"PRIu64"M",map_length-centinel); return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_438196", "function_addr": 4424086, "binary_name": "507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69.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 rax, [rbp+var_48]"], [7, "mov eax, [rax]"], [8, "cmp eax, 4"], [9, "ja short def_4381D5"], [10, "mov eax, eax"], [11, "lea rdx, ds:0[rax*4]"], [12, "lea rax, jpt_4381D5"], [13, "mov eax, ds:(jpt_4381D5 - 4521D0h)[rdx+rax]"], [14, "cdqe"], [15, "lea rdx, jpt_4381D5"], [16, "add rax, rdx"], [17, "jmp rax"], [18, "nop"], [19, "mov rax, [rbp+var_50]"], [20, "mov rdi, rax"], [21, "call sub_423D86"], [22, "mov [rbp+var_20], rax"], [23, "mov [rbp+var_8], 0"], [24, "mov rax, [rbp+var_50]"], [25, "mov rax, [rax+30h]"], [26, "mov rax, [rax]"], [27, "mov [rbp+var_18], rax"], [28, "mov [rbp+var_10], 0"], [29, "jmp loc_438445"], [30, "mov rax, [rbp+var_18]"], [31, "mov rdi, rax"], [32, "call sub_42D63A"], [33, "mov [rbp+var_28], rax"], [34, "mov rax, [rbp+var_18]"], [35, "mov eax, [rax]"], [36, "cmp eax, 2"], [37, "jz loc_43833E"], [38, "cmp eax, 2"], [39, "ja loc_4383C4"], [40, "test eax, eax"], [41, "jz short loc_438246"], [42, "cmp eax, 1"], [43, "jz loc_4382C5"], [44, "jmp loc_4383C4"], [45, "mov rax, [rbp+var_58]"], [46, "movzx eax, byte ptr [rax+19h]"], [47, "test al, al"], [48, "jz loc_43843A"], [49, "mov rax, [rbp+var_28]"], [50, "cmp rax, [rbp+var_8]"], [51, "jz short loc_4382A3"], [52, "mov rax, [rbp+var_58]"], [53, "movzx eax, byte ptr [rax+19h]"], [54, "test al, al"], [55, "jz short loc_438273"], [56, "mov ecx, 3Dh "], [57, "jmp short loc_438278"], [58, "mov ecx, 4Dh "], [59, "mov rax, [rbp+var_28]"], [60, "sub rax, [rbp+var_8]"], [61, "mov rdx, rax"], [62, "mov rax, [rbp+var_48]"], [63, "lea rsi, aLuC"], [64, "mov rdi, rax"], [65, "mov eax, 0"], [66, "call sub_44B6DA"], [67, "mov rax, [rbp+var_28]"], [68, "mov [rbp+var_8], rax"], [69, "mov rax, [rbp+var_48]"], [70, "lea rsi, a1x"], [71, "mov rdi, rax"], [72, "mov eax, 0"], [73, "call sub_44B6DA"], [74, "add [rbp+var_8], 1"], [75, "jmp loc_43843A"], [76, "mov rax, [rbp+var_28]"], [77, "cmp rax, [rbp+var_8]"], [78, "jz short loc_438312"], [79, "mov rax, [rbp+var_58]"], [80, "movzx eax, byte ptr [rax+19h]"], [81, "test al, al"], [82, "jz short loc_4382E2"], [83, "mov ecx, 3Dh "], [84, "jmp short loc_4382E7"], [85, "mov ecx, 4Dh "], [86, "mov rax, [rbp+var_28]"], [87, "sub rax, [rbp+var_8]"], [88, "mov rdx, rax"], [89, "mov rax, [rbp+var_48]"], [90, "lea rsi, aLuC"], [91, "mov rdi, rax"], [92, "mov eax, 0"], [93, "call sub_44B6DA"], [94, "mov rax, [rbp+var_28]"], [95, "mov [rbp+var_8], rax"], [96, "mov rax, [rbp+var_18]"], [97, "mov rdi, rax"], [98, "call sub_42D65E"], [99, "mov rdx, rax"], [100, "mov rax, [rbp+var_48]"], [101, "lea rsi, aLud"], [102, "mov rdi, rax"], [103, "mov eax, 0"], [104, "call sub_44B6DA"], [105, "jmp loc_43843B"], [106, "mov rax, [rbp+var_28]"], [107, "cmp rax, [rbp+var_8]"], [108, "jz short loc_43838B"], [109, "mov rax, [rbp+var_58]"], [110, "movzx eax, byte ptr [rax+19h]"], [111, "test al, al"], [112, "jz short loc_43835B"], [113, "mov ecx, 3Dh "], [114, "jmp short loc_438360"], [115, "mov ecx, 4Dh "], [116, "mov rax, [rbp+var_28]"], [117, "sub rax, [rbp+var_8]"], [118, "mov rdx, rax"], [119, "mov rax, [rbp+var_48]"], [120, "lea rsi, aLuC"], [121, "mov rdi, rax"], [122, "mov eax, 0"], [123, "call sub_44B6DA"], [124, "mov rax, [rbp+var_28]"], [125, "mov [rbp+var_8], rax"], [126, "mov rax, [rbp+var_18]"], [127, "mov rdi, rax"], [128, "call sub_42D65E"], [129, "mov rdx, rax"], [130, "mov rax, [rbp+var_48]"], [131, "lea rsi, aLui"], [132, "mov rdi, rax"], [133, "mov eax, 0"], [134, "call sub_44B6DA"], [135, "mov rax, [rbp+var_18]"], [136, "mov rdi, rax"], [137, "call sub_42D65E"], [138, "add [rbp+var_8], rax"], [139, "jmp short loc_43843B"], [140, "mov rax, offset unk_464240"], [141, "movzx eax, byte ptr [rax]"], [142, "xor eax, 1"], [143, "test al, al"], [144, "jz short loc_438433"], [145, "mov eax, 0"], [146, "call sub_40DC6E"], [147, "mov [rbp+stream], rax"], [148, "mov [rbp+var_38], 0"], [149, "cmp [rbp+var_38], 0"], [150, "jz short loc_4383FC"], [151, "mov rax, [rbp+var_38]"], [152, "add rax, 1"], [153, "jmp short loc_438403"], [154, "lea rax, aGtOutputSamC"], [155, "mov rdi, [rbp+stream]"], [156, "lea r8, aGtOutputSamGpr_0"], [157, "mov ecx, 193h"], [158, "mov rdx, rax"], [159, "lea rsi, aErrorSDSLibrar_0"], [160, "mov eax, 0"], [161, "call _fprintf"], [162, "mov rax, [rbp+stream]"], [163, "mov rdi, rax"], [164, "call _fflush"], [165, "mov eax, 0Ah"], [166, "jmp short locret_43848D"], [167, "nop"], [168, "add [rbp+var_18], 18h"], [169, "add [rbp+var_10], 1"], [170, "mov rax, [rbp+var_50]"], [171, "mov rax, [rax+30h]"], [172, "mov rax, [rax+8]"], [173, "cmp [rbp+var_10], rax"], [174, "jb loc_43820C"], [175, "mov rax, [rbp+var_8]"], [176, "cmp rax, [rbp+var_20]"], [177, "jnb short loc_438488"], [178, "mov rax, [rbp+var_20]"], [179, "sub rax, [rbp+var_8]"], [180, "mov rdx, rax"], [181, "mov rax, [rbp+var_48]"], [182, "lea rsi, aLum"], [183, "mov rdi, rax"], [184, "mov eax, 0"], [185, "call sub_44B6DA"], [186, "mov eax, 0"], [187, "leave"], [188, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 8], [10, 7], [12, 10], [15, 11], [16, 13], [16, 15], [17, 16], [19, 4], [20, 19], [22, 21], [24, 4], [25, 24], [26, 25], [27, 26], [30, 27], [30, 168], [31, 30], [33, 32], [34, 27], [34, 168], [35, 34], [36, 35], [37, 36], [38, 35], [39, 38], [40, 35], [41, 40], [42, 40], [43, 42], [45, 5], [46, 45], [47, 46], [48, 47], [49, 33], [50, 95], [50, 49], [50, 74], [50, 138], [50, 23], [51, 50], [52, 5], [53, 52], [54, 53], [55, 54], [59, 33], [60, 74], [60, 23], [60, 59], [60, 138], [60, 95], [61, 60], [62, 3], [63, 70], [63, 101], [63, 131], [64, 62], [67, 33], [68, 67], [69, 3], [70, 70], [70, 63], [70, 101], [70, 131], [71, 69], [74, 68], [74, 95], [74, 74], [74, 138], [74, 23], [76, 33], [77, 76], [77, 23], [77, 74], [77, 138], [77, 95], [78, 77], [79, 5], [80, 79], [81, 80], [82, 81], [86, 33], [87, 86], [87, 95], [87, 74], [87, 138], [87, 23], [88, 87], [89, 3], [90, 101], [90, 70], [90, 131], [91, 89], [94, 33], [95, 94], [96, 168], [96, 27], [97, 96], [99, 98], [100, 3], [101, 90], [101, 101], [101, 70], [101, 131], [102, 100], [106, 33], [107, 95], [107, 106], [107, 23], [107, 74], [107, 138], [108, 107], [109, 5], [110, 109], [111, 110], [112, 111], [116, 33], [117, 23], [117, 116], [117, 74], [117, 138], [117, 95], [118, 117], [119, 3], [120, 131], [120, 101], [120, 70], [121, 119], [124, 33], [125, 124], [126, 27], [126, 168], [127, 126], [129, 128], [130, 3], [131, 70], [131, 120], [131, 131], [131, 101], [132, 130], [135, 168], [135, 27], [136, 135], [138, 23], [138, 137], [138, 125], [138, 74], [138, 138], [138, 95], [141, 140], [142, 141], [143, 142], [144, 143], [147, 146], [149, 148], [150, 149], [151, 148], [152, 151], [154, 146], [155, 147], [158, 154], [158, 152], [159, 70], [159, 131], [159, 101], [162, 147], [163, 162], [168, 27], [168, 168], [169, 28], [169, 169], [170, 4], [171, 170], [172, 171], [173, 172], [173, 28], [173, 169], [174, 173], [175, 74], [175, 138], [175, 23], [175, 95], [176, 22], [176, 175], [177, 176], [178, 22], [179, 23], [179, 178], [179, 74], [179, 138], [179, 95], [180, 179], [181, 3], [182, 70], [182, 131], [182, 101], [183, 181], [188, 186], [188, 165]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69_507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69.jsonl.gz", "strip_func_name": "sub_438196", "query": "\n\n\n__int64 __fastcall sub_438196(int a1, __int64 a2, __int64 a3)\n{\nint v3; // ecx\nint v4; // er8\nint v5; // er9\nint v6; // edx\nunsigned int v7; // eax\nint v8; // ecx\nint v9; // ecx\nint v10; // eax\nint v11; // ecx\nint v12; // er8\nint v13; // er9\nint v14; // ecx\nint v15; // eax\nint v16; // ecx\nint v17; // er8\nint v18; // er9\nstruct _IO_FILE *stream; // [rsp+30h] [rbp-30h]\n__int64 v22; // [rsp+38h] [rbp-28h]\nunsigned __int64 v23; // [rsp+40h] [rbp-20h]\nunsigned int *v24; // [rsp+48h] [rbp-18h]\nunsigned __int64 i; // [rsp+50h] [rbp-10h]\nunsigned __int64 v26; // [rsp+58h] [rbp-8h]\n\nv23 = sub_423D86(a2);\nv26 = 0LL;\nv24 = **(unsigned int ***)(a2 + 48);\nfor ( i = 0LL; ; ++i )\n{\nif ( i >= *(_QWORD *)(*(_QWORD *)(a2 + 48) + 8LL) )\n{\nif ( v26 < v23 )\nsub_44B6DA(a1, (unsigned int)\"%luM\", v23 - v26, v3, v4, v5);\nreturn 0LL;\n}\nv22 = sub_42D63A((__int64)v24);\nv7 = *v24;\nif ( *v24 != 2 )\nbreak;\nif ( v22 != v26 )\n{\nif ( *(_BYTE *)(a3 + 25) )\nv14 = 61;\nelse\nv14 = 77;\nsub_44B6DA(a1, (unsigned int)\"%lu%c\", v22 - v26, v14, v4, v5);\nv26 = v22;\n}\nv15 = sub_42D65E((__int64)v24);\nsub_44B6DA(a1, (unsigned int)\"%luI\", v15, v16, v17, v18);\nv26 += sub_42D65E((__int64)v24);\nLABEL_29:\nv24 += 6;\n}\nif ( v7 > 2 )\ngoto LABEL_26;\nif ( !v7 )\n{\nif ( *(_BYTE *)(a3 + 25) )\n{\nif ( v22 != v26 )\n{\nif ( *(_BYTE *)(a3 + 25) )\nv8 = 61;\nelse\nv8 = 77;\nsub_44B6DA(a1, (unsigned int)\"%lu%c\", v22 - v26, v8, v4, v5);\nv26 = v22;\n}\nsub_44B6DA(a1, (unsigned int)\"1X\", v6, v3, v4, v5);\n++v26;\n}\ngoto LABEL_29;\n}\nif ( v7 == 1 )\n{\nif ( v22 != v26 )\n{\nif ( *(_BYTE *)(a3 + 25) )\nv9 = 61;\nelse\nv9 = 77;\nsub_44B6DA(a1, (unsigned int)\"%lu%c\", v22 - v26, v9, v4, v5);\nv26 = v22;\n}\nv10 = sub_42D65E((__int64)v24);\nsub_44B6DA(a1, (unsigned int)\"%luD\", v10, v11, v12, v13);\ngoto LABEL_29;\n}\nLABEL_26:\nif ( unk_464240 != 1 )\n{\nstream = sub_40DC6E();\nfprintf(\nstream,\n\"Error (%s:%d,%s)\\n Library error. Selection not valid\\n\",\n\"gt_output_sam.c\",\n403LL,\n\"gt_output_sam_gprint_map_block_cigar_forward\");\nfflush(stream);\n}\nreturn 10LL;\n}\n\n\n\nQ:[a3,a1,a2,v6,stream,v22,v23,v24,i,v26,sub_438196,sub_423D86,sub_44B6DA,sub_42D63A,sub_42D65E,sub_40DC6E,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'attributes', 'a1': 'gprinter', 'a2': 'map', 'v6': 'attributes', 'stream': 'error_stream', 'v22': 'misms_pos', 'v23': 'map_length', 'v24': 'misms', 'i': 'misms_vector_position', 'v26': 'centinel', 'sub_438196': 'gt_output_sam_gprint_map_block_cigar_forward', 'sub_423D86': 'gt_map_get_base_length', 'sub_44B6DA': 'gt_gprintf', 'sub_42D63A': 'gt_misms_get_position', 'sub_42D65E': 'gt_misms_get_size', 'sub_40DC6E': 'gt_error_get_stream'}"}
read_with_nil_returns_nil
d69c84f7c0642e584aadc8969c263015ca08f14872619aeb9cd241b3589e04ff
tekknolagi
ghuloum
NA
TEST read_with_nil_returns_nil(void) { char *input = "()"; ASTNode *node = Reader_read(input); ASSERT(AST_is_nil(node)); AST_heap_free(node); PASS(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407E45", "function_addr": 4226629, "binary_name": "d69c84f7c0642e584aadc8969c263015ca08f14872619aeb9cd241b3589e04ff.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], offset asc_415B78"], [4, "mov rax, [rbp+var_8]"], [5, "mov rdi, rax"], [6, "call sub_403393"], [7, "mov [rbp+var_10], rax"], [8, "mov eax, cs:dword_41C1A4"], [9, "add eax, 1"], [10, "mov cs:dword_41C1A4, eax"], [11, "mov rax, [rbp+var_10]"], [12, "mov rdi, rax"], [13, "call sub_402513"], [14, "xor eax, 1"], [15, "test al, al"], [16, "jz short loc_407EC4"], [17, "mov cs:qword_41C1B0, offset file"], [18, "mov cs:dword_41C1A8, 68Fh"], [19, "mov cs:qword_41C1B8, offset aAstIsNilNode"], [20, "movzx eax, cs:byte_41C160"], [21, "movzx eax, al"], [22, "and eax, 4"], [23, "test eax, eax"], [24, "jz short loc_407EBD"], [25, "call _abort"], [26, "mov eax, 0FFFFFFFFh"], [27, "jmp short locret_407EE0"], [28, "mov rax, [rbp+var_10]"], [29, "mov rdi, rax"], [30, "call sub_402713"], [31, "mov cs:qword_41C1B8, 0"], [32, "mov eax, 0"], [33, "leave"], [34, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [9, 8], [10, 9], [11, 7], [12, 11], [14, 13], [15, 14], [16, 15], [21, 20], [22, 21], [23, 22], [24, 23], [28, 7], [29, 28], [34, 26], [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/d69c84f7c0642e584aadc8969c263015ca08f14872619aeb9cd241b3589e04ff_d69c84f7c0642e584aadc8969c263015ca08f14872619aeb9cd241b3589e04ff.jsonl.gz", "strip_func_name": "sub_407E45", "query": "\n\n\n__int64 sub_407E45()\n{\n__int64 result; // rax\n__int64 v1; // [rsp+0h] [rbp-10h]\n\nv1 = sub_403393((__int64)\"()\");\n++dword_41C1A4;\nif ( !sub_402513(v1) )\n{\nqword_41C1B0 = (__int64)\"compiling-elf.c\";\ndword_41C1A8 = 1679;\nqword_41C1B8 = (__int64)\"AST_is_nil(node)\";\nif ( (byte_41C160 & 4) != 0 )\nabort();\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\nsub_402713(v1);\nqword_41C1B8 = 0LL;\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[v1,sub_407E45,sub_403393,sub_402513,sub_402713,]\nAssistant: ", "hints": "[]", "response": "{'v1': 'node', 'sub_407E45': 'read_with_nil_returns_nil', 'sub_403393': 'Reader_read', 'sub_402513': 'AST_is_nil', 'sub_402713': 'AST_heap_free'}"}
p2p_buf_add_p2p_interface
8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f
sonic-net
sonic-buildimage
NA
void p2p_buf_add_p2p_interface(struct wpabuf *buf, struct p2p_data *p2p) { /* P2P Interface */ wpabuf_put_u8(buf, P2P_ATTR_INTERFACE); wpabuf_put_le16(buf, ETH_ALEN + 1 + ETH_ALEN); /* P2P Device address */ wpabuf_put_data(buf, p2p->cfg->dev_addr, ETH_ALEN); /* * FIX: Fetch interface address list from driver. Do not include * the P2P Device address if it is never used as interface address. */ /* P2P Interface Address Count */ wpabuf_put_u8(buf, 1); wpabuf_put_data(buf, p2p->cfg->dev_addr, ETH_ALEN); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42EC0F", "function_addr": 4385807, "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_10], rsi"], [5, "mov rax, [rbp+var_8]"], [6, "mov esi, 10h"], [7, "mov rdi, rax"], [8, "call sub_42DB05"], [9, "mov rax, [rbp+var_8]"], [10, "mov esi, 0Dh"], [11, "mov rdi, rax"], [12, "call sub_42DB38"], [13, "mov rax, [rbp+var_10]"], [14, "mov rax, [rax]"], [15, "lea rcx, [rax+8D8h]"], [16, "mov rax, [rbp+var_8]"], [17, "mov edx, 6"], [18, "mov rsi, rcx"], [19, "mov rdi, rax"], [20, "call sub_42DC58"], [21, "mov rax, [rbp+var_8]"], [22, "mov esi, 1"], [23, "mov rdi, rax"], [24, "call sub_42DB05"], [25, "mov rax, [rbp+var_10]"], [26, "mov rax, [rax]"], [27, "lea rcx, [rax+8D8h]"], [28, "mov rax, [rbp+var_8]"], [29, "mov edx, 6"], [30, "mov rsi, rcx"], [31, "mov rdi, rax"], [32, "call sub_42DC58"], [33, "nop"], [34, "leave"], [35, "retn"]], "data_dep": [[5, 3], [7, 5], [9, 3], [11, 9], [13, 4], [14, 13], [15, 14], [16, 3], [18, 15], [19, 16], [21, 3], [23, 21], [25, 4], [26, 25], [27, 15], [27, 26], [28, 3], [30, 27], [31, 28], [35, 32]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f_8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f.jsonl.gz", "strip_func_name": "sub_42EC0F", "query": "\n\n\nvoid __fastcall sub_42EC0F(__int64 a1, __int64 a2)\n{\nsub_42DB05(a1, 16);\nsub_42DB38(a1, 13);\nsub_42DC58(a1, (const void *)(*(_QWORD *)a2 + 2264LL), 6uLL);\nsub_42DB05(a1, 1);\nsub_42DC58(a1, (const void *)(*(_QWORD *)a2 + 2264LL), 6uLL);\n}\n\n\n\nQ:[a1,a2,sub_42EC0F,sub_42DB05,sub_42DB38,sub_42DC58,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'buf', 'a2': 'p2p', 'sub_42EC0F': 'p2p_buf_add_p2p_interface', 'sub_42DB05': 'wpabuf_put_u8_2', 'sub_42DB38': 'wpabuf_put_le16_2', 'sub_42DC58': 'wpabuf_put_data_5'}"}
sim_gtime
c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7
open-simh
simh
NA
double sim_gtime (void) { if (AIO_MAIN_THREAD) { UPDATE_SIM_TIME; } return sim_time; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43675D", "function_addr": 4417373, "binary_name": "c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 18h"], [4, "mov rbx, cs:thread2"], [5, "call _pthread_self"], [6, "mov rsi, rbx"], [7, "mov rdi, rax"], [8, "call _pthread_equal"], [9, "test eax, eax"], [10, "jz loc_43682B"], [11, "mov edi, offset mutex"], [12, "call _pthread_mutex_lock"], [13, "mov rax, cs:qword_4EF5F0"], [14, "cmp rax, 1"], [15, "jnz short loc_4367A7"], [16, "mov eax, cs:dword_71238C"], [17, "mov [rbp+var_14], eax"], [18, "jmp short loc_4367B4"], [19, "mov rax, cs:qword_4EF5F0"], [20, "mov eax, [rax+34h]"], [21, "mov [rbp+var_14], eax"], [22, "mov edx, cs:dword_711B70"], [23, "mov eax, [rbp+var_14]"], [24, "sub eax, edx"], [25, "pxor xmm1, xmm1"], [26, "cvtsi2sd xmm1, eax"], [27, "movsd xmm0, cs:qword_712380"], [28, "addsd xmm0, xmm1"], [29, "movsd cs:qword_712380, xmm0"], [30, "mov edx, cs:dword_711B70"], [31, "mov eax, [rbp+var_14]"], [32, "sub eax, edx"], [33, "mov edx, eax"], [34, "mov eax, cs:dword_712388"], [35, "add eax, edx"], [36, "mov cs:dword_712388, eax"], [37, "mov rax, cs:qword_4EF5F0"], [38, "cmp rax, 1"], [39, "jnz short loc_436811"], [40, "mov eax, cs:dword_711B70"], [41, "mov cs:dword_71238C, eax"], [42, "jmp short loc_436821"], [43, "mov rax, cs:qword_4EF5F0"], [44, "mov edx, cs:dword_711B70"], [45, "mov [rax+34h], edx"], [46, "mov edi, offset mutex"], [47, "call _pthread_mutex_unlock"], [48, "movsd xmm0, cs:qword_712380"], [49, "movq rax, xmm0"], [50, "movq xmm0, rax"], [51, "mov rbx, [rbp+var_8]"], [52, "leave"], [53, "retn"]], "data_dep": [[6, 4], [7, 5], [9, 8], [10, 9], [14, 13], [15, 14], [17, 16], [20, 19], [21, 20], [23, 21], [23, 17], [24, 23], [24, 22], [26, 24], [26, 25], [28, 27], [28, 26], [29, 28], [31, 17], [31, 21], [32, 31], [32, 30], [33, 32], [35, 33], [35, 34], [36, 35], [38, 37], [39, 38], [41, 40], [45, 43], [45, 44], [48, 29], [49, 48], [50, 49], [53, 49]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7_c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7.jsonl.gz", "strip_func_name": "sub_43675D", "query": "\n\n\ndouble sub_43675D()\n{\npthread_t v0; // rbx\npthread_t v1; // rax\nint v3; // [rsp+Ch] [rbp-14h]\n\nv0 = thread2;\nv1 = pthread_self();\nif ( pthread_equal(v1, v0) )\n{\npthread_mutex_lock(&mutex);\nif ( qword_4EF5F0 == 1 )\nv3 = dword_71238C;\nelse\nv3 = *(_DWORD *)(qword_4EF5F0 + 52);\n*(double *)&qword_712380 = *(double *)&qword_712380 + (double)(v3 - dword_711B70);\ndword_712388 += v3 - dword_711B70;\nif ( qword_4EF5F0 == 1 )\ndword_71238C = dword_711B70;\nelse\n*(_DWORD *)(qword_4EF5F0 + 52) = dword_711B70;\npthread_mutex_unlock(&mutex);\n}\nreturn *(double *)&qword_712380;\n}\n\n\n\nQ:[v3,sub_43675D,]\nAssistant: ", "hints": "[]", "response": "{'v3': '_x', 'sub_43675D': 'sim_gtime'}"}
readData
30042d0636e36027baa9db0cdbf54ff599a2381f1005244bea196476e5689289
cnlohr
rawdrawandroid
NA
int readData(FILE *file, WaveHeaderChunk *hdr, void* buff, int buff_len){ uint32_t br; int bytes_to_read = hdr->fmt.bytes_per_sample*buff_len; if(!hdr) { printf("Error: No valid header\n"); return -1; } fseek(file, hdr->data.current_offset, SEEK_SET); br = fread(buff, hdr->fmt.bytes_per_sample, buff_len, file); int bytes_read = hdr->fmt.bytes_per_sample*br; //printf("samples read: %u\n", br); hdr->data.samples_left -= br; hdr->data.current_offset += bytes_read; if(feof(file)){ br = -1; } return br; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4042CC", "function_addr": 4211404, "binary_name": "30042d0636e36027baa9db0cdbf54ff599a2381f1005244bea196476e5689289.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+stream], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+ptr], rdx"], [6, "mov [rbp+var_2C], ecx"], [7, "mov rax, [rbp+var_20]"], [8, "movzx eax, byte ptr [rax+14h]"], [9, "movzx eax, al"], [10, "mov edx, [rbp+var_2C]"], [11, "imul eax, edx"], [12, "mov [rbp+var_8], eax"], [13, "cmp [rbp+var_20], 0"], [14, "jnz short loc_404312"], [15, "mov edi, offset aErrorNoValidHe"], [16, "call _puts"], [17, "mov eax, 0FFFFFFFFh"], [18, "jmp locret_4043AB"], [19, "mov rax, [rbp+var_20]"], [20, "mov eax, [rax+50h]"], [21, "mov ecx, eax"], [22, "mov rax, [rbp+stream]"], [23, "mov edx, 0"], [24, "mov rsi, rcx"], [25, "mov rdi, rax"], [26, "call _fseek"], [27, "mov eax, [rbp+var_2C]"], [28, "movsxd rdx, eax"], [29, "mov rax, [rbp+var_20]"], [30, "movzx eax, byte ptr [rax+14h]"], [31, "movzx esi, al"], [32, "mov rcx, [rbp+stream]"], [33, "mov rax, [rbp+ptr]"], [34, "mov rdi, rax"], [35, "call _fread"], [36, "mov [rbp+var_4], eax"], [37, "mov rax, [rbp+var_20]"], [38, "movzx eax, byte ptr [rax+14h]"], [39, "movzx eax, al"], [40, "imul eax, [rbp+var_4]"], [41, "mov [rbp+var_C], eax"], [42, "mov rax, [rbp+var_20]"], [43, "movzx eax, word ptr [rax+56h]"], [44, "mov edx, [rbp+var_4]"], [45, "mov ecx, edx"], [46, "sub eax, ecx"], [47, "mov edx, eax"], [48, "mov rax, [rbp+var_20]"], [49, "mov [rax+56h], dx"], [50, "mov rax, [rbp+var_20]"], [51, "mov edx, [rax+50h]"], [52, "mov eax, [rbp+var_C]"], [53, "add edx, eax"], [54, "mov rax, [rbp+var_20]"], [55, "mov [rax+50h], edx"], [56, "mov rax, [rbp+stream]"], [57, "mov rdi, rax"], [58, "call _feof"], [59, "test eax, eax"], [60, "jz short loc_4043A8"], [61, "mov [rbp+var_4], 0FFFFFFFFh"], [62, "mov eax, [rbp+var_4]"], [63, "leave"], [64, "retn"]], "data_dep": [[7, 4], [8, 7], [9, 8], [10, 6], [11, 10], [11, 9], [12, 11], [13, 4], [14, 13], [19, 4], [20, 19], [21, 20], [22, 3], [24, 21], [25, 22], [27, 6], [28, 27], [29, 4], [30, 29], [31, 30], [32, 3], [33, 5], [34, 33], [36, 35], [37, 4], [38, 37], [39, 38], [40, 36], [40, 39], [41, 40], [42, 4], [43, 42], [44, 36], [45, 44], [46, 45], [46, 43], [47, 46], [48, 4], [49, 47], [49, 48], [50, 4], [51, 50], [51, 49], [52, 41], [53, 52], [53, 51], [54, 4], [55, 53], [55, 54], [56, 3], [57, 56], [59, 58], [60, 59], [62, 61], [62, 36], [64, 17], [64, 62]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/30042d0636e36027baa9db0cdbf54ff599a2381f1005244bea196476e5689289_30042d0636e36027baa9db0cdbf54ff599a2381f1005244bea196476e5689289.jsonl.gz", "strip_func_name": "sub_4042CC", "query": "\n\n\n__int64 __fastcall sub_4042CC(FILE *a1, __int64 a2, void *a3, int a4)\n{\n__int64 result; // rax\nint v7; // [rsp+24h] [rbp-Ch]\nunsigned int v8; // [rsp+2Ch] [rbp-4h]\n\nif ( a2 )\n{\nfseek(a1, *(unsigned int *)(a2 + 80), 0);\nv8 = fread(a3, *(unsigned __int8 *)(a2 + 20), a4, a1);\nv7 = v8 * *(unsigned __int8 *)(a2 + 20);\n*(_WORD *)(a2 + 86) -= v8;\n*(_DWORD *)(a2 + 80) += v7;\nif ( feof(a1) )\nv8 = -1;\nresult = v8;\n}\nelse\n{\nputs(\"Error: No valid header\");\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v7,v8,sub_4042CC,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'buff', 'a4': 'buff_len', 'a1': 'file', 'a2': 'hdr', 'v7': 'bytes_read', 'v8': 'br', 'sub_4042CC': 'readData'}"}
calculate_update_time
208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2
vanhoefm
fragattacks
NA
void calculate_update_time(const struct os_reltime *fetch_time, unsigned int age_ms, struct os_reltime *update_time) { os_time_t usec; update_time->sec = fetch_time->sec; update_time->usec = fetch_time->usec; update_time->sec -= age_ms / 1000; usec = (age_ms % 1000) * 1000; if (update_time->usec < usec) { update_time->sec--; update_time->usec += 1000000; } update_time->usec -= usec; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403C97", "function_addr": 4209815, "binary_name": "208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2.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 rdx, [rax]"], [7, "mov rax, [rbp+var_28]"], [8, "mov [rax], rdx"], [9, "mov rax, [rbp+var_18]"], [10, "mov rdx, [rax+8]"], [11, "mov rax, [rbp+var_28]"], [12, "mov [rax+8], rdx"], [13, "mov rax, [rbp+var_28]"], [14, "mov rax, [rax]"], [15, "mov edx, [rbp+var_1C]"], [16, "mov edx, edx"], [17, "imul rdx, 10624DD3h"], [18, "shr rdx, 20h"], [19, "shr edx, 6"], [20, "mov ecx, edx"], [21, "sub rax, rcx"], [22, "mov rdx, rax"], [23, "mov rax, [rbp+var_28]"], [24, "mov [rax], rdx"], [25, "mov edx, [rbp+var_1C]"], [26, "mov eax, edx"], [27, "imul rax, 10624DD3h"], [28, "shr rax, 20h"], [29, "shr eax, 6"], [30, "imul ecx, eax, 3E8h"], [31, "mov eax, edx"], [32, "sub eax, ecx"], [33, "imul eax, 3E8h"], [34, "mov eax, eax"], [35, "mov [rbp+var_8], rax"], [36, "mov rax, [rbp+var_28]"], [37, "mov rax, [rax+8]"], [38, "cmp [rbp+var_8], rax"], [39, "jle short loc_403D4D"], [40, "mov rax, [rbp+var_28]"], [41, "mov rax, [rax]"], [42, "lea rdx, [rax-1]"], [43, "mov rax, [rbp+var_28]"], [44, "mov [rax], rdx"], [45, "mov rax, [rbp+var_28]"], [46, "mov rax, [rax+8]"], [47, "lea rdx, [rax+0F4240h]"], [48, "mov rax, [rbp+var_28]"], [49, "mov [rax+8], rdx"], [50, "mov rax, [rbp+var_28]"], [51, "mov rax, [rax+8]"], [52, "sub rax, [rbp+var_8]"], [53, "mov rdx, rax"], [54, "mov rax, [rbp+var_28]"], [55, "mov [rax+8], rdx"], [56, "nop"], [57, "pop rbp"], [58, "retn"]], "data_dep": [[5, 2], [6, 5], [7, 4], [8, 6], [8, 7], [9, 2], [10, 8], [10, 9], [11, 4], [12, 10], [12, 11], [13, 4], [14, 13], [14, 8], [14, 12], [15, 3], [16, 15], [17, 16], [18, 17], [19, 18], [20, 19], [21, 20], [21, 14], [22, 21], [23, 4], [24, 23], [24, 22], [25, 3], [26, 25], [27, 26], [28, 27], [29, 28], [30, 20], [30, 29], [31, 25], [32, 30], [32, 31], [33, 32], [34, 33], [35, 34], [36, 4], [37, 24], [37, 12], [37, 36], [38, 35], [38, 37], [39, 38], [40, 4], [41, 40], [41, 49], [41, 24], [41, 8], [41, 44], [41, 12], [42, 41], [42, 25], [42, 49], [42, 24], [42, 8], [42, 12], [42, 44], [43, 4], [44, 42], [44, 43], [45, 4], [46, 45], [46, 44], [46, 12], [47, 42], [47, 44], [47, 46], [48, 4], [49, 48], [49, 47], [50, 4], [51, 50], [51, 8], [51, 49], [51, 24], [51, 44], [51, 55], [51, 12], [52, 51], [52, 35], [53, 52], [54, 4], [55, 54], [55, 53], [57, 0], [58, 54]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2_208d6f5c4c47e61fc5612dba9824bbb292bc6b59ec61b6b27384dbfe4df358f2.jsonl.gz", "strip_func_name": "sub_403C97", "query": "\n\n\n_QWORD *__fastcall sub_403C97(_QWORD *a1, unsigned int a2, _QWORD *a3)\n{\n_QWORD *result; // rax\n__int64 v4; // [rsp+20h] [rbp-8h]\n\n*a3 = *a1;\na3[1] = a1[1];\n*a3 -= a2 / 0x3E8;\nv4 = 1000 * (a2 % 0x3E8);\nif ( v4 > a3[1] )\n{\n--*a3;\na3[1] += 1000000LL;\n}\nresult = a3;\na3[1] -= v4;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v4,sub_403C97,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'update_time', 'a1': 'fetch_time', 'a2': 'age_ms', 'v4': 'usec', 'sub_403C97': 'calculate_update_time'}"}
expr3
43c73e5640b3729e7b9715e2718a282d1c6f9a648f9acf68d6a945819ddc96a2
EtchedPixels
CC6303
NA
void expr3(ADDR *ap, int c) { char *np1; char *np2; int radix; VALUE value; char num[40]; np1 = &num[0]; do { if (isupper(c)) c = tolower(c); *np1++ = c; c = *ip++; } while (isalnum(c)); --ip; /* The grammar here is ambiguous in the case of $11b which should be 11B hex, but 11b is 11 boolean. We must therefore handle the $ case first */ if (num[0] == '$') { np2 = &num[1]; radix = 16; } else if (num[0] == '0' && num[1] == 'x') { np2 = &num[2]; radix = 16; } else { /* Look for trailing information on the radix */ switch (*--np1) { case 'h': radix = 16; break; case 'o': case 'q': radix = 8; break; case 'b': radix = 2; break; default: radix = 10; ++np1; } np2 = &num[0]; /* No trailing tag, so look for 0octab, 0xhex */ if (radix == 10) { if (*np2 == '0') { radix = 8; np2++; if (*np2 == 'x') { radix = 16; np2++; } } } } value = 0; while (np2 < np1) { if ((c = *np2++)>='0' && c<='9') c -= '0'; else if (c>='a' && c<='f') c -= 'a'-10; else err('n', INVALID_CONST); if (c >= radix) err('n', INVALID_CONST); value = radix*value + c; } ap->a_type = TUSER; ap->a_value = value; ap->a_segment = ABSOLUTE; ap->a_sym = NULL; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403845", "function_addr": 4208709, "binary_name": "43c73e5640b3729e7b9715e2718a282d1c6f9a648f9acf68d6a945819ddc96a2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_48], rdi"], [4, "mov [rbp+c], esi"], [5, "lea rax, [rbp+var_40]"], [6, "mov [rbp+var_8], rax"], [7, "call ___ctype_b_loc"], [8, "mov rdx, [rax]"], [9, "mov eax, [rbp+c]"], [10, "cdqe"], [11, "add rax, rax"], [12, "add rax, rdx"], [13, "movzx eax, word ptr [rax]"], [14, "movzx eax, ax"], [15, "and eax, 100h"], [16, "test eax, eax"], [17, "jz short loc_40388B"], [18, "mov eax, [rbp+c]"], [19, "mov edi, eax"], [20, "call _tolower"], [21, "mov [rbp+c], eax"], [22, "mov rax, [rbp+var_8]"], [23, "lea rdx, [rax+1]"], [24, "mov [rbp+var_8], rdx"], [25, "mov edx, [rbp+c]"], [26, "mov [rax], dl"], [27, "mov rax, cs:qword_409C30"], [28, "lea rdx, [rax+1]"], [29, "mov cs:qword_409C30, rdx"], [30, "movzx eax, byte ptr [rax]"], [31, "movsx eax, al"], [32, "mov [rbp+c], eax"], [33, "call ___ctype_b_loc"], [34, "mov rdx, [rax]"], [35, "mov eax, [rbp+c]"], [36, "cdqe"], [37, "add rax, rax"], [38, "add rax, rdx"], [39, "movzx eax, word ptr [rax]"], [40, "movzx eax, ax"], [41, "and eax, 8"], [42, "test eax, eax"], [43, "jnz short loc_40385C"], [44, "mov rax, cs:qword_409C30"], [45, "sub rax, 1"], [46, "mov cs:qword_409C30, rax"], [47, "movzx eax, [rbp+var_40]"], [48, "cmp al, 24h "], [49, "jnz short loc_403909"], [50, "lea rax, [rbp+var_40]"], [51, "add rax, 1"], [52, "mov [rbp+var_10], rax"], [53, "mov [rbp+var_14], 10h"], [54, "jmp loc_4039C1"], [55, "movzx eax, [rbp+var_40]"], [56, "cmp al, 30h "], [57, "jnz short loc_403931"], [58, "movzx eax, [rbp+var_3F]"], [59, "cmp al, 78h "], [60, "jnz short loc_403931"], [61, "lea rax, [rbp+var_40]"], [62, "add rax, 2"], [63, "mov [rbp+var_10], rax"], [64, "mov [rbp+var_14], 10h"], [65, "jmp loc_4039C1"], [66, "sub [rbp+var_8], 1"], [67, "mov rax, [rbp+var_8]"], [68, "movzx eax, byte ptr [rax]"], [69, "movsx eax, al"], [70, "cmp eax, 71h "], [71, "jz short loc_403967"], [72, "cmp eax, 71h "], [73, "jg short loc_403979"], [74, "cmp eax, 6Fh "], [75, "jz short loc_403967"], [76, "cmp eax, 6Fh "], [77, "jg short loc_403979"], [78, "cmp eax, 62h "], [79, "jz short loc_403970"], [80, "cmp eax, 68h "], [81, "jnz short loc_403979"], [82, "mov [rbp+var_14], 10h"], [83, "jmp short loc_403985"], [84, "mov [rbp+var_14], 8"], [85, "jmp short loc_403985"], [86, "mov [rbp+var_14], 2"], [87, "jmp short loc_403985"], [88, "mov [rbp+var_14], 0Ah"], [89, "add [rbp+var_8], 1"], [90, "lea rax, [rbp+var_40]"], [91, "mov [rbp+var_10], rax"], [92, "cmp [rbp+var_14], 0Ah"], [93, "jnz short loc_4039C1"], [94, "mov rax, [rbp+var_10]"], [95, "movzx eax, byte ptr [rax]"], [96, "cmp al, 30h "], [97, "jnz short loc_4039C1"], [98, "mov [rbp+var_14], 8"], [99, "add [rbp+var_10], 1"], [100, "mov rax, [rbp+var_10]"], [101, "movzx eax, byte ptr [rax]"], [102, "cmp al, 78h "], [103, "jnz short loc_4039C1"], [104, "mov [rbp+var_14], 10h"], [105, "add [rbp+var_10], 1"], [106, "mov [rbp+var_16], 0"], [107, "jmp short loc_403A3B"], [108, "mov rax, [rbp+var_10]"], [109, "lea rdx, [rax+1]"], [110, "mov [rbp+var_10], rdx"], [111, "movzx eax, byte ptr [rax]"], [112, "movsx eax, al"], [113, "mov [rbp+c], eax"], [114, "cmp [rbp+c], 2Fh "], [115, "jle short loc_4039F0"], [116, "cmp [rbp+c], 39h "], [117, "jg short loc_4039F0"], [118, "sub [rbp+c], 30h "], [119, "jmp short loc_403A11"], [120, "cmp [rbp+c], 60h "], [121, "jle short loc_403A02"], [122, "cmp [rbp+c], 66h "], [123, "jg short loc_403A02"], [124, "sub [rbp+c], 57h "], [125, "jmp short loc_403A11"], [126, "mov esi, 10h"], [127, "mov edi, 6Eh "], [128, "call err"], [129, "mov eax, [rbp+c]"], [130, "cmp eax, [rbp+var_14]"], [131, "jl short loc_403A28"], [132, "mov esi, 10h"], [133, "mov edi, 6Eh "], [134, "call err"], [135, "mov eax, [rbp+var_14]"], [136, "imul ax, [rbp+var_16]"], [137, "mov edx, eax"], [138, "mov eax, [rbp+c]"], [139, "add eax, edx"], [140, "mov [rbp+var_16], ax"], [141, "mov rax, [rbp+var_10]"], [142, "cmp rax, [rbp+var_8]"], [143, "jb short loc_4039C9"], [144, "mov rax, [rbp+var_48]"], [145, "mov word ptr [rax], 100h"], [146, "mov rax, [rbp+var_48]"], [147, "movzx edx, [rbp+var_16]"], [148, "mov [rax+2], dx"], [149, "mov rax, [rbp+var_48]"], [150, "mov byte ptr [rax+4], 0"], [151, "mov rax, [rbp+var_48]"], [152, "mov qword ptr [rax+8], 0"], [153, "nop"], [154, "leave"], [155, "retn"]], "data_dep": [[6, 5], [8, 26], [8, 7], [9, 32], [9, 4], [11, 9], [12, 8], [12, 11], [13, 26], [13, 12], [14, 13], [15, 14], [16, 15], [17, 16], [18, 32], [18, 4], [19, 18], [21, 20], [22, 6], [22, 24], [23, 22], [23, 8], [23, 26], [24, 23], [25, 32], [25, 4], [25, 21], [26, 25], [26, 22], [27, 29], [28, 25], [28, 27], [28, 26], [29, 28], [30, 27], [30, 26], [31, 30], [32, 31], [34, 33], [34, 26], [35, 32], [37, 35], [38, 34], [38, 37], [39, 26], [39, 38], [40, 39], [41, 40], [42, 41], [43, 42], [44, 29], [45, 44], [46, 45], [48, 47], [49, 48], [50, 47], [51, 50], [52, 51], [56, 55], [57, 56], [59, 58], [60, 59], [61, 58], [62, 61], [63, 62], [66, 24], [67, 66], [68, 26], [68, 67], [69, 68], [70, 69], [71, 70], [72, 69], [73, 72], [74, 69], [75, 74], [76, 69], [77, 76], [78, 69], [79, 78], [80, 69], [81, 80], [89, 66], [90, 69], [91, 90], [92, 88], [92, 82], [92, 84], [92, 86], [93, 92], [94, 91], [95, 26], [95, 94], [96, 95], [97, 96], [99, 91], [100, 99], [101, 26], [101, 100], [102, 101], [103, 102], [105, 99], [108, 105], [108, 52], [108, 63], [108, 99], [108, 110], [108, 91], [109, 26], [109, 108], [109, 34], [109, 137], [110, 109], [111, 108], [111, 26], [112, 111], [113, 112], [114, 113], [115, 114], [116, 113], [117, 116], [118, 113], [120, 113], [121, 120], [122, 113], [123, 122], [124, 113], [129, 118], [129, 124], [130, 53], [130, 98], [130, 64], [130, 82], [130, 84], [130, 86], [130, 129], [130, 104], [130, 88], [131, 130], [135, 104], [135, 53], [135, 98], [135, 64], [135, 82], [135, 84], [135, 86], [135, 88], [136, 135], [136, 140], [136, 106], [137, 136], [138, 118], [138, 124], [139, 137], [139, 138], [140, 139], [141, 99], [141, 110], [141, 105], [141, 91], [141, 52], [141, 63], [142, 89], [142, 66], [142, 141], [142, 24], [143, 142], [144, 3], [145, 144], [146, 3], [147, 140], [147, 106], [148, 147], [148, 146], [149, 3], [150, 149], [151, 3], [152, 151], [155, 151]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/43c73e5640b3729e7b9715e2718a282d1c6f9a648f9acf68d6a945819ddc96a2_43c73e5640b3729e7b9715e2718a282d1c6f9a648f9acf68d6a945819ddc96a2.jsonl.gz", "strip_func_name": "sub_403845", "query": "\n\n\n__int64 __fastcall sub_403845(__int64 a1, int a2)\n{\nchar *v2; // rax\nchar *v3; // rax\nint v4; // eax\nchar *v5; // rax\n__int64 result; // rax\nint ca; // [rsp+4h] [rbp-4Ch]\nint cb; // [rsp+4h] [rbp-4Ch]\nchar v10; // [rsp+10h] [rbp-40h] BYREF\nchar v11; // [rsp+11h] [rbp-3Fh] BYREF\n_BYTE v12[6]; // [rsp+12h] [rbp-3Eh] BYREF\n__int16 v13; // [rsp+3Ah] [rbp-16h]\nint v14; // [rsp+3Ch] [rbp-14h]\nchar *v15; // [rsp+40h] [rbp-10h]\nchar *v16; // [rsp+48h] [rbp-8h]\n\nv16 = &v10;\ndo\n{\nif ( ((*__ctype_b_loc())[a2] & 0x100) != 0 )\nLOBYTE(a2) = tolower(a2);\nv2 = v16++;\n*v2 = a2;\nv3 = (char *)qword_409C30++;\na2 = *v3;\n}\nwhile ( ((*__ctype_b_loc())[a2] & 8) != 0 );\n--qword_409C30;\nif ( v10 == 36 )\n{\nv15 = &v11;\nv14 = 16;\ngoto LABEL_24;\n}\nif ( v10 == 48 && v11 == 120 )\n{\nv15 = v12;\nv14 = 16;\ngoto LABEL_24;\n}\nv4 = *--v16;\nif ( v4 == 113 )\ngoto LABEL_17;\nif ( v4 > 113 )\ngoto LABEL_19;\nif ( v4 == 111 )\n{\nLABEL_17:\nv14 = 8;\ngoto LABEL_20;\n}\nif ( v4 > 111 )\ngoto LABEL_19;\nif ( v4 == 98 )\n{\nv14 = 2;\ngoto LABEL_20;\n}\nif ( v4 != 104 )\n{\nLABEL_19:\nv14 = 10;\n++v16;\ngoto LABEL_20;\n}\nv14 = 16;\nLABEL_20:\nv15 = &v10;\nif ( v14 == 10 && *v15 == 48 )\n{\nv14 = 8;\nif ( *++v15 == 120 )\n{\nv14 = 16;\n++v15;\n}\n}\nLABEL_24:\nv13 = 0;\nwhile ( v15 < v16 )\n{\nv5 = v15++;\nca = *v5;\nif ( ca <= 47 || ca > 57 )\n{\nif ( ca <= 96 || ca > 102 )\nerr(110, 0x10u);\ncb = ca - 87;\n}\nelse\n{\ncb = ca - 48;\n}\nif ( cb >= v14 )\nerr(110, 0x10u);\nv13 = v13 * v14 + cb;\n}\n*(_WORD *)a1 = 256;\n*(_WORD *)(a1 + 2) = v13;\n*(_BYTE *)(a1 + 4) = 0;\nresult = a1;\n*(_QWORD *)(a1 + 8) = 0LL;\nreturn result;\n}\n\n\n\nQ:[a1,a2,v10,v13,v14,v15,v16,sub_403845,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ap', 'a2': 'c', 'v10': 'num', 'v13': 'value', 'v14': 'radix', 'v15': 'np2', 'v16': 'np1', 'sub_403845': 'expr3'}"}
hk_map_phase_male_XY
e98cba598ff0ec26aa3eef1f6ecef49a1bc5eee5459f366ec217815767d8d184
lh3
hickit
NA
void hk_map_phase_male_XY(struct hk_map *m) { int32_t i, sex_flag, *ploidy_XY; ploidy_XY = hk_sd_ploidy_XY(m->d, &sex_flag); if (sex_flag & 2) { // chrY present, a male if (m->pairs) { for (i = 0; i < m->n_pairs; ++i) { struct hk_pair *p = &m->pairs[i]; int32_t chr[2]; chr[0] = p->chr >> 32; chr[1] = (int32_t)p->chr; if (ploidy_XY[chr[0]]&1) p->phase[0] = 1; else if (ploidy_XY[chr[0]]&2) p->phase[0] = 0; if (ploidy_XY[chr[1]]&1) p->phase[1] = 1; else if (ploidy_XY[chr[1]]&2) p->phase[1] = 0; } } if (m->segs) { for (i = 0; i < m->n_segs; ++i) { struct hk_seg *p = &m->segs[i]; if (ploidy_XY[p->chr]&1) p->phase = 1; else if (ploidy_XY[p->chr]&2) p->phase = 0; } } } free(ploidy_XY); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4079C4", "function_addr": 4225476, "binary_name": "e98cba598ff0ec26aa3eef1f6ecef49a1bc5eee5459f366ec217815767d8d184.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov rax, [rbp+var_38]"], [5, "mov rax, [rax+8]"], [6, "lea rdx, [rbp+var_24]"], [7, "mov rsi, rdx"], [8, "mov rdi, rax"], [9, "call sub_403319"], [10, "mov [rbp+ptr], rax"], [11, "mov eax, [rbp+var_24]"], [12, "and eax, 2"], [13, "test eax, eax"], [14, "jz loc_407BA1"], [15, "mov rax, [rbp+var_38]"], [16, "mov rax, [rax+28h]"], [17, "test rax, rax"], [18, "jz loc_407AFC"], [19, "mov [rbp+var_4], 0"], [20, "jmp loc_407AEC"], [21, "mov rax, [rbp+var_38]"], [22, "mov rcx, [rax+28h]"], [23, "mov eax, [rbp+var_4]"], [24, "movsxd rdx, eax"], [25, "mov rax, rdx"], [26, "add rax, rax"], [27, "add rax, rdx"], [28, "shl rax, 4"], [29, "add rax, rcx"], [30, "mov [rbp+var_18], rax"], [31, "mov rax, [rbp+var_18]"], [32, "mov rax, [rax]"], [33, "shr rax, 20h"], [34, "mov [rbp+var_2C], eax"], [35, "mov rax, [rbp+var_18]"], [36, "mov rax, [rax]"], [37, "mov [rbp+var_28], eax"], [38, "mov eax, [rbp+var_2C]"], [39, "cdqe"], [40, "lea rdx, ds:0[rax*4]"], [41, "mov rax, [rbp+ptr]"], [42, "add rax, rdx"], [43, "mov eax, [rax]"], [44, "and eax, 1"], [45, "test eax, eax"], [46, "jz short loc_407A77"], [47, "mov rax, [rbp+var_18]"], [48, "mov byte ptr [rax+12h], 1"], [49, "jmp short loc_407A9C"], [50, "mov eax, [rbp+var_2C]"], [51, "cdqe"], [52, "lea rdx, ds:0[rax*4]"], [53, "mov rax, [rbp+ptr]"], [54, "add rax, rdx"], [55, "mov eax, [rax]"], [56, "and eax, 2"], [57, "test eax, eax"], [58, "jz short loc_407A9C"], [59, "mov rax, [rbp+var_18]"], [60, "mov byte ptr [rax+12h], 0"], [61, "mov eax, [rbp+var_28]"], [62, "cdqe"], [63, "lea rdx, ds:0[rax*4]"], [64, "mov rax, [rbp+ptr]"], [65, "add rax, rdx"], [66, "mov eax, [rax]"], [67, "and eax, 1"], [68, "test eax, eax"], [69, "jz short loc_407AC3"], [70, "mov rax, [rbp+var_18]"], [71, "mov byte ptr [rax+13h], 1"], [72, "jmp short loc_407AE8"], [73, "mov eax, [rbp+var_28]"], [74, "cdqe"], [75, "lea rdx, ds:0[rax*4]"], [76, "mov rax, [rbp+ptr]"], [77, "add rax, rdx"], [78, "mov eax, [rax]"], [79, "and eax, 2"], [80, "test eax, eax"], [81, "jz short loc_407AE8"], [82, "mov rax, [rbp+var_18]"], [83, "mov byte ptr [rax+13h], 0"], [84, "add [rbp+var_4], 1"], [85, "mov rax, [rbp+var_38]"], [86, "mov eax, [rax+18h]"], [87, "cmp [rbp+var_4], eax"], [88, "jl loc_407A16"], [89, "mov rax, [rbp+var_38]"], [90, "mov rax, [rax+20h]"], [91, "test rax, rax"], [92, "jz loc_407BA1"], [93, "mov [rbp+var_4], 0"], [94, "jmp short loc_407B91"], [95, "mov rax, [rbp+var_38]"], [96, "mov rcx, [rax+20h]"], [97, "mov eax, [rbp+var_4]"], [98, "movsxd rdx, eax"], [99, "mov rax, rdx"], [100, "shl rax, 2"], [101, "add rax, rdx"], [102, "shl rax, 2"], [103, "add rax, rcx"], [104, "mov [rbp+var_20], rax"], [105, "mov rax, [rbp+var_20]"], [106, "mov eax, [rax+4]"], [107, "cdqe"], [108, "lea rdx, ds:0[rax*4]"], [109, "mov rax, [rbp+ptr]"], [110, "add rax, rdx"], [111, "mov eax, [rax]"], [112, "and eax, 1"], [113, "test eax, eax"], [114, "jz short loc_407B64"], [115, "mov rax, [rbp+var_20]"], [116, "mov byte ptr [rax+11h], 1"], [117, "jmp short loc_407B8D"], [118, "mov rax, [rbp+var_20]"], [119, "mov eax, [rax+4]"], [120, "cdqe"], [121, "lea rdx, ds:0[rax*4]"], [122, "mov rax, [rbp+ptr]"], [123, "add rax, rdx"], [124, "mov eax, [rax]"], [125, "and eax, 2"], [126, "test eax, eax"], [127, "jz short loc_407B8D"], [128, "mov rax, [rbp+var_20]"], [129, "mov byte ptr [rax+11h], 0"], [130, "add [rbp+var_4], 1"], [131, "mov rax, [rbp+var_38]"], [132, "mov eax, [rax+14h]"], [133, "cmp [rbp+var_4], eax"], [134, "jl loc_407B16"], [135, "mov rax, [rbp+ptr]"], [136, "mov rdi, rax"], [137, "call _free"], [138, "nop"], [139, "leave"], [140, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 5], [10, 9], [12, 11], [13, 12], [14, 13], [15, 3], [16, 15], [17, 16], [18, 17], [21, 3], [22, 83], [22, 21], [22, 60], [22, 71], [22, 48], [23, 84], [23, 19], [24, 23], [25, 24], [26, 25], [27, 24], [27, 26], [28, 27], [29, 22], [29, 28], [30, 29], [31, 30], [32, 60], [32, 83], [32, 71], [32, 48], [32, 31], [33, 32], [34, 33], [35, 30], [36, 71], [36, 48], [36, 35], [36, 83], [36, 60], [37, 36], [38, 34], [40, 24], [41, 10], [42, 41], [42, 40], [43, 60], [43, 71], [43, 48], [43, 42], [43, 83], [44, 43], [45, 44], [46, 45], [47, 30], [48, 47], [50, 34], [52, 40], [53, 10], [54, 53], [54, 52], [55, 54], [55, 60], [55, 83], [55, 48], [55, 71], [56, 55], [57, 56], [58, 57], [59, 30], [60, 59], [61, 37], [63, 52], [63, 40], [64, 10], [65, 63], [65, 64], [66, 60], [66, 71], [66, 48], [66, 65], [66, 83], [67, 66], [68, 67], [69, 68], [70, 30], [71, 70], [73, 37], [75, 63], [76, 10], [77, 76], [77, 75], [78, 77], [78, 83], [78, 60], [78, 71], [78, 48], [79, 78], [80, 79], [81, 80], [82, 30], [83, 82], [84, 84], [84, 19], [85, 3], [86, 60], [86, 83], [86, 85], [86, 48], [86, 71], [87, 84], [87, 86], [87, 19], [88, 87], [89, 3], [90, 60], [90, 83], [90, 71], [90, 89], [90, 48], [91, 90], [92, 91], [95, 3], [96, 95], [96, 60], [96, 83], [96, 48], [96, 71], [96, 116], [96, 129], [97, 130], [97, 93], [98, 97], [99, 98], [100, 99], [101, 98], [101, 100], [102, 101], [103, 102], [103, 96], [104, 103], [105, 104], [106, 116], [106, 129], [106, 60], [106, 83], [106, 48], [106, 105], [106, 71], [108, 98], [109, 10], [110, 109], [110, 108], [111, 83], [111, 110], [111, 48], [111, 71], [111, 116], [111, 129], [111, 60], [112, 111], [113, 112], [114, 113], [115, 104], [116, 115], [118, 104], [119, 71], [119, 116], [119, 118], [119, 129], [119, 60], [119, 83], [119, 48], [121, 108], [122, 10], [123, 121], [123, 122], [124, 129], [124, 60], [124, 83], [124, 48], [124, 71], [124, 123], [124, 116], [125, 124], [126, 125], [127, 126], [128, 104], [129, 128], [130, 130], [130, 93], [131, 3], [132, 48], [132, 71], [132, 116], [132, 129], [132, 131], [132, 60], [132, 83], [133, 132], [133, 130], [133, 93], [134, 133], [135, 10], [136, 135], [140, 137]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/e98cba598ff0ec26aa3eef1f6ecef49a1bc5eee5459f366ec217815767d8d184_e98cba598ff0ec26aa3eef1f6ecef49a1bc5eee5459f366ec217815767d8d184.jsonl.gz", "strip_func_name": "sub_4079C4", "query": "\n\n\nvoid __fastcall sub_4079C4(__int64 a1)\n{\nint v1; // [rsp+14h] [rbp-2Ch]\nint v2; // [rsp+18h] [rbp-28h]\nint v3; // [rsp+1Ch] [rbp-24h] BYREF\n__int64 v4; // [rsp+20h] [rbp-20h]\n__int64 v5; // [rsp+28h] [rbp-18h]\nvoid *ptr; // [rsp+30h] [rbp-10h]\nint i; // [rsp+3Ch] [rbp-4h]\n\nptr = sub_403319(*(int **)(a1 + 8), &v3);\nif ( (v3 & 2) != 0 )\n{\nif ( *(_QWORD *)(a1 + 40) )\n{\nfor ( i = 0; i < *(_DWORD *)(a1 + 24); ++i )\n{\nv5 = *(_QWORD *)(a1 + 40) + 48LL * i;\nv1 = HIDWORD(*(_QWORD *)v5);\nv2 = *(_QWORD *)v5;\nif ( (*((_DWORD *)ptr + v1) & 1) != 0 )\n{\n*(_BYTE *)(v5 + 18) = 1;\n}\nelse if ( (*((_DWORD *)ptr + v1) & 2) != 0 )\n{\n*(_BYTE *)(v5 + 18) = 0;\n}\nif ( (*((_DWORD *)ptr + v2) & 1) != 0 )\n{\n*(_BYTE *)(v5 + 19) = 1;\n}\nelse if ( (*((_DWORD *)ptr + v2) & 2) != 0 )\n{\n*(_BYTE *)(v5 + 19) = 0;\n}\n}\n}\nif ( *(_QWORD *)(a1 + 32) )\n{\nfor ( i = 0; i < *(_DWORD *)(a1 + 20); ++i )\n{\nv4 = *(_QWORD *)(a1 + 32) + 20LL * i;\nif ( (*((_DWORD *)ptr + *(int *)(v4 + 4)) & 1) != 0 )\n{\n*(_BYTE *)(v4 + 17) = 1;\n}\nelse if ( (*((_DWORD *)ptr + *(int *)(v4 + 4)) & 2) != 0 )\n{\n*(_BYTE *)(v4 + 17) = 0;\n}\n}\n}\n}\nfree(ptr);\n}\n\n\n\nQ:[a1,v1,v2,v3,v4,v5,ptr,sub_4079C4,sub_403319,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'm', 'v1': 'chr', 'v2': 'chr_4', 'v3': 'sex_flag', 'v4': 'p_0', 'v5': 'p', 'ptr': 'ploidy_XY', 'sub_4079C4': 'hk_map_phase_male_XY', 'sub_403319': 'hk_sd_ploidy_XY'}"}
sntl_Translate_SCSI_Send_Diagnostic_Command
892fedff583f6ea4b46c284d049dc9df01238d46df2521e95544083c2b7f831f
Seagate
openSeaChest
NA
static int sntl_Translate_SCSI_Send_Diagnostic_Command(tDevice *device, ScsiIoCtx *scsiIoCtx) { int ret = SUCCESS; uint8_t selfTestCode = (scsiIoCtx->cdb[1] >> 5) & 0x07; bool selfTest = false; uint16_t parameterListLength = M_BytesTo2ByteValue(scsiIoCtx->cdb[3], scsiIoCtx->cdb[4]); uint8_t senseKeySpecificDescriptor[SNTL_SENSE_KEY_SPECIFIC_DESCRIPTOR_LENGTH] = { 0 }; uint8_t bitPointer = 0; uint16_t fieldPointer = 0; if (((fieldPointer = 1) != 0 && (bitPointer = 3) != 0 && scsiIoCtx->cdb[1] & BIT3)//reserved || ((fieldPointer = 1) != 0 && (bitPointer = 1) != 0 && scsiIoCtx->cdb[1] & BIT1)//devoffline || ((fieldPointer = 1) != 0 && (bitPointer = 0) == 0 && scsiIoCtx->cdb[1] & BIT0)//unitoffline || ((fieldPointer = 2) != 0 && (bitPointer = 0) == 0 && scsiIoCtx->cdb[2] != 0)//reserved ) { if (bitPointer == 0) { uint8_t reservedByteVal = scsiIoCtx->cdb[fieldPointer]; uint8_t counter = 0; while (reservedByteVal > 0 && counter < 8) { reservedByteVal >>= 1; ++counter; } bitPointer = counter - 1;//because we should always get a count of at least 1 if here and bits are zero indexed } sntl_Set_Sense_Key_Specific_Descriptor_Invalid_Field(senseKeySpecificDescriptor, true, true, bitPointer, fieldPointer); //invalid field in CDB ret = NOT_SUPPORTED; sntl_Set_Sense_Data_For_Translation(scsiIoCtx->psense, scsiIoCtx->senseDataSize, SENSE_KEY_ILLEGAL_REQUEST, 0x24, 0, device->drive_info.softSATFlags.senseDataDescriptorFormat, senseKeySpecificDescriptor, 1); return ret; } if (scsiIoCtx->cdb[1] & BIT2) { selfTest = true; } if (parameterListLength == 0) { //bool nvmeSelfTestSupported = false; if (selfTest) { ret = SUCCESS;//nothing to do! We may be able to take hints from SAT to implement some kind of similar extension in the future. } else { #if defined (SNTL_EXT) if (device->drive_info.IdentifyData.nvme.ctrl.oacs & BIT4)//DST supported { //NOTE: doing all namespaces for now...not sure if this should be changed in the future. switch (selfTestCode) { case 0://default self test ret = SUCCESS; break; case 1://background self test ret = nvme_Device_Self_Test(device, UINT32_MAX, 1); if (ret != SUCCESS) { set_Sense_Data_By_NVMe_Status(device, device->drive_info.lastNVMeResult.lastNVMeStatus, scsiIoCtx->psense, scsiIoCtx->senseDataSize); } break; case 2://background extended self test ret = nvme_Device_Self_Test(device, UINT32_MAX, 2); if (ret != SUCCESS) { set_Sense_Data_By_NVMe_Status(device, device->drive_info.lastNVMeResult.lastNVMeStatus, scsiIoCtx->psense, scsiIoCtx->senseDataSize); } break; case 4://abort background self test ret = nvme_Device_Self_Test(device, UINT32_MAX, 0xF); if (ret != SUCCESS) { set_Sense_Data_By_NVMe_Status(device, device->drive_info.lastNVMeResult.lastNVMeStatus, scsiIoCtx->psense, scsiIoCtx->senseDataSize); } break; default: ret = NOT_SUPPORTED; bitPointer = 7; fieldPointer = 1; sntl_Set_Sense_Key_Specific_Descriptor_Invalid_Field(senseKeySpecificDescriptor, true, true, bitPointer, fieldPointer); sntl_Set_Sense_Data_For_Translation(scsiIoCtx->psense, scsiIoCtx->senseDataSize, SENSE_KEY_ILLEGAL_REQUEST, 0x24, 0, device->drive_info.softSATFlags.senseDataDescriptorFormat, senseKeySpecificDescriptor, 1); break; } } else { #endif if (selfTestCode == 0) { ret = SUCCESS;//nothing to do! Take hints from SAT to translate the self test code to a DST if DST is supported. } else { ret = NOT_SUPPORTED; bitPointer = 7; fieldPointer = 1; sntl_Set_Sense_Key_Specific_Descriptor_Invalid_Field(senseKeySpecificDescriptor, true, true, bitPointer, fieldPointer); sntl_Set_Sense_Data_For_Translation(scsiIoCtx->psense, scsiIoCtx->senseDataSize, SENSE_KEY_ILLEGAL_REQUEST, 0x24, 0, device->drive_info.softSATFlags.senseDataDescriptorFormat, senseKeySpecificDescriptor, 1); } #if defined (SNTL_EXT) } #endif } } else { fieldPointer = 3; bitPointer = 7; ret = NOT_SUPPORTED; sntl_Set_Sense_Key_Specific_Descriptor_Invalid_Field(senseKeySpecificDescriptor, true, true, bitPointer, fieldPointer); sntl_Set_Sense_Data_For_Translation(scsiIoCtx->psense, scsiIoCtx->senseDataSize, SENSE_KEY_ILLEGAL_REQUEST, 0x24, 0, device->drive_info.softSATFlags.senseDataDescriptorFormat, senseKeySpecificDescriptor, 1); } return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4AC40E", "function_addr": 4899854, "binary_name": "892fedff583f6ea4b46c284d049dc9df01238d46df2521e95544083c2b7f831f.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_30]"], [7, "movzx eax, byte ptr [rax+9]"], [8, "shr al, 5"], [9, "mov [rbp+var_B], al"], [10, "mov [rbp+var_5], 0"], [11, "mov rax, [rbp+var_30]"], [12, "movzx eax, byte ptr [rax+0Bh]"], [13, "movzx eax, al"], [14, "shl eax, 8"], [15, "mov edx, eax"], [16, "mov rax, [rbp+var_30]"], [17, "movzx eax, byte ptr [rax+0Ch]"], [18, "movzx eax, al"], [19, "or eax, edx"], [20, "mov [rbp+var_E], ax"], [21, "mov [rbp+src], 0"], [22, "mov [rbp+var_6], 0"], [23, "mov [rbp+var_8], 0"], [24, "mov [rbp+var_8], 1"], [25, "mov [rbp+var_6], 3"], [26, "mov rax, [rbp+var_30]"], [27, "movzx eax, byte ptr [rax+9]"], [28, "movzx eax, al"], [29, "and eax, 8"], [30, "test rax, rax"], [31, "jnz short loc_4AC4DB"], [32, "mov [rbp+var_8], 1"], [33, "mov [rbp+var_6], 1"], [34, "mov rax, [rbp+var_30]"], [35, "movzx eax, byte ptr [rax+9]"], [36, "movzx eax, al"], [37, "and eax, 2"], [38, "test rax, rax"], [39, "jnz short loc_4AC4DB"], [40, "mov [rbp+var_8], 1"], [41, "mov [rbp+var_6], 0"], [42, "mov rax, [rbp+var_30]"], [43, "movzx eax, byte ptr [rax+9]"], [44, "movzx eax, al"], [45, "and eax, 1"], [46, "test rax, rax"], [47, "jnz short loc_4AC4DB"], [48, "mov [rbp+var_8], 2"], [49, "mov [rbp+var_6], 0"], [50, "mov rax, [rbp+var_30]"], [51, "movzx eax, byte ptr [rax+0Ah]"], [52, "test al, al"], [53, "jz loc_4AC58B"], [54, "cmp [rbp+var_6], 0"], [55, "jnz short loc_4AC516"], [56, "movzx eax, [rbp+var_8]"], [57, "mov rdx, [rbp+var_30]"], [58, "cdqe"], [59, "movzx eax, byte ptr [rdx+rax+8]"], [60, "mov [rbp+var_9], al"], [61, "mov [rbp+var_A], 0"], [62, "jmp short loc_4AC500"], [63, "shr [rbp+var_9], 1"], [64, "add [rbp+var_A], 1"], [65, "cmp [rbp+var_9], 0"], [66, "jz short loc_4AC50C"], [67, "cmp [rbp+var_A], 7"], [68, "jbe short loc_4AC4F9"], [69, "movzx eax, [rbp+var_A]"], [70, "sub eax, 1"], [71, "mov [rbp+var_6], al"], [72, "movzx ecx, [rbp+var_8]"], [73, "movzx edx, [rbp+var_6]"], [74, "lea rax, [rbp+src]"], [75, "mov r8d, ecx"], [76, "mov ecx, edx"], [77, "mov edx, 1"], [78, "mov esi, 1"], [79, "mov rdi, rax"], [80, "call sub_49EA3B"], [81, "mov [rbp+var_4], 2"], [82, "mov rax, [rbp+var_28]"], [83, "movzx eax, byte ptr [rax+2574h]"], [84, "movzx ecx, al"], [85, "mov rax, [rbp+var_30]"], [86, "mov esi, [rax+68h]"], [87, "mov rax, [rbp+var_30]"], [88, "mov rax, [rax+60h]"], [89, "push 1"], [90, "lea rdx, [rbp+src]"], [91, "push rdx"], [92, "mov r9d, ecx"], [93, "mov r8d, 0"], [94, "mov ecx, 24h "], [95, "mov edx, 5"], [96, "mov rdi, rax"], [97, "call sub_49EBB5"], [98, "add rsp, 10h"], [99, "mov eax, [rbp+var_4]"], [100, "jmp locret_4AC88B"], [101, "mov rax, [rbp+var_30]"], [102, "movzx eax, byte ptr [rax+9]"], [103, "movzx eax, al"], [104, "and eax, 4"], [105, "test rax, rax"], [106, "jz short loc_4AC5A2"], [107, "mov [rbp+var_5], 1"], [108, "cmp [rbp+var_E], 0"], [109, "jnz loc_4AC808"], [110, "cmp [rbp+var_5], 0"], [111, "jz short loc_4AC5BF"], [112, "mov [rbp+var_4], 0"], [113, "jmp loc_4AC888"], [114, "mov rax, [rbp+var_28]"], [115, "movzx eax, word ptr [rax+358h]"], [116, "movzx eax, ax"], [117, "and eax, 10h"], [118, "test rax, rax"], [119, "jz loc_4AC77A"], [120, "movzx eax, [rbp+var_B]"], [121, "cmp eax, 4"], [122, "jz loc_4AC6B1"], [123, "cmp eax, 4"], [124, "jg loc_4AC6FE"], [125, "cmp eax, 2"], [126, "jz short loc_4AC664"], [127, "cmp eax, 2"], [128, "jg loc_4AC6FE"], [129, "test eax, eax"], [130, "jz short loc_4AC60B"], [131, "cmp eax, 1"], [132, "jz short loc_4AC617"], [133, "jmp loc_4AC6FE"], [134, "mov [rbp+var_4], 0"], [135, "jmp loc_4AC888"], [136, "mov rax, [rbp+var_28]"], [137, "mov edx, 1"], [138, "mov esi, 0FFFFFFFFh"], [139, "mov rdi, rax"], [140, "call sub_491086"], [141, "mov [rbp+var_4], eax"], [142, "cmp [rbp+var_4], 0"], [143, "jz loc_4AC881"], [144, "mov rax, [rbp+var_30]"], [145, "mov ecx, [rax+68h]"], [146, "mov rax, [rbp+var_30]"], [147, "mov rdx, [rax+60h]"], [148, "mov rax, [rbp+var_28]"], [149, "mov esi, [rax+2414h]"], [150, "mov rax, [rbp+var_28]"], [151, "mov rdi, rax"], [152, "call sub_49FB52"], [153, "jmp loc_4AC881"], [154, "mov rax, [rbp+var_28]"], [155, "mov edx, 2"], [156, "mov esi, 0FFFFFFFFh"], [157, "mov rdi, rax"], [158, "call sub_491086"], [159, "mov [rbp+var_4], eax"], [160, "cmp [rbp+var_4], 0"], [161, "jz loc_4AC884"], [162, "mov rax, [rbp+var_30]"], [163, "mov ecx, [rax+68h]"], [164, "mov rax, [rbp+var_30]"], [165, "mov rdx, [rax+60h]"], [166, "mov rax, [rbp+var_28]"], [167, "mov esi, [rax+2414h]"], [168, "mov rax, [rbp+var_28]"], [169, "mov rdi, rax"], [170, "call sub_49FB52"], [171, "jmp loc_4AC884"], [172, "mov rax, [rbp+var_28]"], [173, "mov edx, 0Fh"], [174, "mov esi, 0FFFFFFFFh"], [175, "mov rdi, rax"], [176, "call sub_491086"], [177, "mov [rbp+var_4], eax"], [178, "cmp [rbp+var_4], 0"], [179, "jz loc_4AC887"], [180, "mov rax, [rbp+var_30]"], [181, "mov ecx, [rax+68h]"], [182, "mov rax, [rbp+var_30]"], [183, "mov rdx, [rax+60h]"], [184, "mov rax, [rbp+var_28]"], [185, "mov esi, [rax+2414h]"], [186, "mov rax, [rbp+var_28]"], [187, "mov rdi, rax"], [188, "call sub_49FB52"], [189, "jmp loc_4AC887"], [190, "mov [rbp+var_4], 2"], [191, "mov [rbp+var_6], 7"], [192, "mov [rbp+var_8], 1"], [193, "movzx ecx, [rbp+var_8]"], [194, "movzx edx, [rbp+var_6]"], [195, "lea rax, [rbp+src]"], [196, "mov r8d, ecx"], [197, "mov ecx, edx"], [198, "mov edx, 1"], [199, "mov esi, 1"], [200, "mov rdi, rax"], [201, "call sub_49EA3B"], [202, "mov rax, [rbp+var_28]"], [203, "movzx eax, byte ptr [rax+2574h]"], [204, "movzx ecx, al"], [205, "mov rax, [rbp+var_30]"], [206, "mov esi, [rax+68h]"], [207, "mov rax, [rbp+var_30]"], [208, "mov rax, [rax+60h]"], [209, "push 1"], [210, "lea rdx, [rbp+src]"], [211, "push rdx"], [212, "mov r9d, ecx"], [213, "mov r8d, 0"], [214, "mov ecx, 24h "], [215, "mov edx, 5"], [216, "mov rdi, rax"], [217, "call sub_49EBB5"], [218, "add rsp, 10h"], [219, "jmp loc_4AC888"], [220, "cmp [rbp+var_B], 0"], [221, "jnz short loc_4AC78C"], [222, "mov [rbp+var_4], 0"], [223, "jmp loc_4AC888"], [224, "mov [rbp+var_4], 2"], [225, "mov [rbp+var_6], 7"], [226, "mov [rbp+var_8], 1"], [227, "movzx ecx, [rbp+var_8]"], [228, "movzx edx, [rbp+var_6]"], [229, "lea rax, [rbp+src]"], [230, "mov r8d, ecx"], [231, "mov ecx, edx"], [232, "mov edx, 1"], [233, "mov esi, 1"], [234, "mov rdi, rax"], [235, "call sub_49EA3B"], [236, "mov rax, [rbp+var_28]"], [237, "movzx eax, byte ptr [rax+2574h]"], [238, "movzx ecx, al"], [239, "mov rax, [rbp+var_30]"], [240, "mov esi, [rax+68h]"], [241, "mov rax, [rbp+var_30]"], [242, "mov rax, [rax+60h]"], [243, "push 1"], [244, "lea rdx, [rbp+src]"], [245, "push rdx"], [246, "mov r9d, ecx"], [247, "mov r8d, 0"], [248, "mov ecx, 24h "], [249, "mov edx, 5"], [250, "mov rdi, rax"], [251, "call sub_49EBB5"], [252, "add rsp, 10h"], [253, "jmp loc_4AC888"], [254, "mov [rbp+var_8], 3"], [255, "mov [rbp+var_6], 7"], [256, "mov [rbp+var_4], 2"], [257, "movzx ecx, [rbp+var_8]"], [258, "movzx edx, [rbp+var_6]"], [259, "lea rax, [rbp+src]"], [260, "mov r8d, ecx"], [261, "mov ecx, edx"], [262, "mov edx, 1"], [263, "mov esi, 1"], [264, "mov rdi, rax"], [265, "call sub_49EA3B"], [266, "mov rax, [rbp+var_28]"], [267, "movzx eax, byte ptr [rax+2574h]"], [268, "movzx ecx, al"], [269, "mov rax, [rbp+var_30]"], [270, "mov esi, [rax+68h]"], [271, "mov rax, [rbp+var_30]"], [272, "mov rax, [rax+60h]"], [273, "push 1"], [274, "lea rdx, [rbp+src]"], [275, "push rdx"], [276, "mov r9d, ecx"], [277, "mov r8d, 0"], [278, "mov ecx, 24h "], [279, "mov edx, 5"], [280, "mov rdi, rax"], [281, "call sub_49EBB5"], [282, "add rsp, 10h"], [283, "jmp short loc_4AC888"], [284, "nop"], [285, "jmp short loc_4AC888"], [286, "nop"], [287, "jmp short loc_4AC888"], [288, "nop"], [289, "mov eax, [rbp+var_4]"], [290, "leave"], [291, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 7], [9, 8], [11, 4], [12, 11], [13, 12], [14, 13], [15, 14], [16, 4], [17, 16], [18, 17], [19, 18], [19, 15], [20, 19], [26, 4], [27, 26], [28, 27], [29, 28], [30, 29], [31, 30], [34, 4], [35, 34], [36, 35], [37, 36], [38, 37], [39, 38], [42, 4], [43, 42], [44, 43], [45, 44], [46, 45], [47, 46], [50, 4], [51, 50], [52, 51], [53, 52], [54, 49], [54, 33], [54, 25], [54, 41], [55, 54], [56, 32], [56, 48], [56, 40], [56, 24], [57, 4], [59, 56], [60, 59], [63, 63], [63, 60], [64, 64], [64, 61], [65, 63], [65, 60], [66, 65], [67, 61], [67, 64], [68, 67], [69, 64], [69, 61], [70, 69], [71, 70], [72, 40], [72, 24], [72, 48], [72, 32], [73, 71], [73, 25], [73, 41], [73, 49], [73, 33], [74, 52], [74, 70], [74, 38], [74, 46], [74, 21], [74, 30], [75, 72], [76, 73], [79, 74], [82, 3], [83, 82], [84, 83], [85, 4], [86, 85], [87, 4], [88, 87], [90, 21], [90, 77], [91, 90], [92, 84], [96, 88], [98, 2], [99, 81], [101, 4], [102, 101], [103, 102], [104, 103], [105, 104], [106, 105], [108, 20], [109, 108], [110, 10], [110, 107], [111, 110], [114, 3], [115, 114], [116, 115], [117, 116], [118, 117], [119, 118], [120, 9], [121, 120], [122, 121], [123, 120], [124, 123], [125, 120], [126, 125], [127, 120], [128, 127], [129, 120], [130, 129], [131, 129], [132, 131], [136, 3], [139, 136], [141, 140], [142, 141], [143, 142], [144, 4], [145, 144], [146, 4], [147, 146], [148, 3], [149, 148], [150, 3], [151, 150], [154, 3], [157, 154], [159, 158], [160, 159], [161, 160], [162, 4], [163, 162], [164, 4], [165, 164], [166, 3], [167, 166], [168, 3], [169, 168], [172, 3], [175, 172], [177, 176], [178, 177], [179, 178], [180, 4], [181, 180], [182, 4], [183, 182], [184, 3], [185, 184], [186, 3], [187, 186], [193, 192], [194, 191], [195, 120], [195, 129], [195, 21], [196, 193], [197, 194], [200, 195], [202, 3], [203, 202], [204, 203], [205, 4], [206, 205], [207, 4], [208, 207], [210, 198], [210, 21], [211, 210], [212, 204], [216, 208], [218, 2], [220, 9], [221, 220], [227, 226], [228, 225], [229, 118], [229, 21], [230, 227], [231, 228], [234, 229], [236, 3], [237, 236], [238, 237], [239, 4], [240, 239], [241, 4], [242, 241], [244, 232], [244, 21], [245, 244], [246, 238], [250, 242], [252, 2], [257, 254], [258, 255], [259, 105], [259, 21], [260, 257], [261, 258], [264, 259], [266, 3], [267, 266], [268, 267], [269, 4], [270, 269], [271, 4], [272, 271], [274, 262], [274, 21], [275, 274], [276, 268], [280, 272], [282, 2], [289, 141], [289, 134], [289, 159], [289, 177], [289, 222], [289, 224], [289, 190], [289, 256], [289, 112], [291, 289], [291, 99]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/892fedff583f6ea4b46c284d049dc9df01238d46df2521e95544083c2b7f831f_892fedff583f6ea4b46c284d049dc9df01238d46df2521e95544083c2b7f831f.jsonl.gz", "strip_func_name": "sub_4AC40E", "query": "\n\n\n__int64 __fastcall sub_4AC40E(__int64 a1, __int64 a2)\n{\n__int64 src; // [rsp+1Ah] [rbp-16h] BYREF\nunsigned __int16 v4; // [rsp+22h] [rbp-Eh]\nunsigned __int8 v5; // [rsp+25h] [rbp-Bh]\nunsigned __int8 i; // [rsp+26h] [rbp-Ah]\nunsigned __int8 v7; // [rsp+27h] [rbp-9h]\nunsigned __int16 v8; // [rsp+28h] [rbp-8h]\nchar v9; // [rsp+2Ah] [rbp-6h]\nchar v10; // [rsp+2Bh] [rbp-5h]\nunsigned int v11; // [rsp+2Ch] [rbp-4h]\n\nv11 = 0;\nv5 = *(_BYTE *)(a2 + 9) >> 5;\nv10 = 0;\nv4 = _byteswap_ushort(*(_WORD *)(a2 + 11));\nsrc = 0LL;\nv8 = 1;\nv9 = 3;\nif ( (*(_BYTE *)(a2 + 9) & 8) == 0 )\n{\nv8 = 1;\nv9 = 1;\nif ( (*(_BYTE *)(a2 + 9) & 2) == 0 )\n{\nv8 = 1;\nv9 = 0;\nif ( (*(_BYTE *)(a2 + 9) & 1) == 0 )\n{\nv8 = 2;\nv9 = 0;\nif ( !*(_BYTE *)(a2 + 10) )\n{\nif ( (*(_BYTE *)(a2 + 9) & 4) != 0 )\nv10 = 1;\nif ( v4 )\n{\nv8 = 3;\nv9 = 7;\nv11 = 2;\nsub_49EA3B(&src, 1, 1, 7, 3u);\nsub_49EBB5(*(void **)(a2 + 96), *(_DWORD *)(a2 + 104), 5, 36, 0, *(_BYTE *)(a1 + 9588), &src, 1);\nreturn v11;\n}\nif ( v10 )\nreturn 0;\nif ( (*(_WORD *)(a1 + 856) & 0x10) != 0 )\n{\nif ( v5 == 4 )\n{\nv11 = sub_491086(a1, -1, 0xFu);\nif ( !v11 )\nreturn v11;\ngoto LABEL_29;\n}\nif ( v5 <= 4u )\n{\nif ( v5 == 2 )\n{\nv11 = sub_491086(a1, -1, 2u);\nif ( !v11 )\nreturn v11;\ngoto LABEL_29;\n}\nif ( v5 <= 2u )\n{\nif ( !v5 )\nreturn 0;\nv11 = sub_491086(a1, -1, 1u);\nif ( !v11 )\nreturn v11;\nLABEL_29:\nsub_49FB52(a1, *(_DWORD *)(a1 + 9236), *(void **)(a2 + 96), *(_DWORD *)(a2 + 104));\nreturn v11;\n}\n}\n}\nelse if ( !v5 )\n{\nreturn 0;\n}\nv11 = 2;\nv9 = 7;\nv8 = 1;\nsub_49EA3B(&src, 1, 1, 7, 1u);\nsub_49EBB5(*(void **)(a2 + 96), *(_DWORD *)(a2 + 104), 5, 36, 0, *(_BYTE *)(a1 + 9588), &src, 1);\nreturn v11;\n}\n}\n}\n}\nif ( !v9 )\n{\nv7 = *(_BYTE *)(a2 + v8 + 8);\nfor ( i = 0; v7 && i <= 7u; ++i )\nv7 >>= 1;\nv9 = i - 1;\n}\nsub_49EA3B(&src, 1, 1, v9, v8);\nv11 = 2;\nsub_49EBB5(*(void **)(a2 + 96), *(_DWORD *)(a2 + 104), 5, 36, 0, *(_BYTE *)(a1 + 9588), &src, 1);\nreturn v11;\n}\n\n\n\nQ:[a1,a2,src,v4,v5,i,v7,v8,v9,v10,sub_4AC40E,sub_49EA3B,sub_49EBB5,sub_491086,sub_49FB52,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'device', 'a2': 'scsiIoCtx', 'src': 'senseKeySpecificDescriptor', 'v4': 'parameterListLength', 'v5': 'selfTestCode', 'i': 'counter', 'v7': 'reservedByteVal', 'v8': 'fieldPointer', 'v9': 'bitPointer', 'v10': 'selfTest', 'sub_4AC40E': 'sntl_Translate_SCSI_Send_Diagnostic_Command', 'sub_49EA3B': 'sntl_Set_Sense_Key_Specific_Descriptor_Invalid_Field', 'sub_49EBB5': 'sntl_Set_Sense_Data_For_Translation', 'sub_491086': 'nvme_Device_Self_Test', 'sub_49FB52': 'set_Sense_Data_By_NVMe_Status'}"}
Validate_hint_SD_Entry
4ceeddb7b16a39fbeac8045d03e7837b1e77a7d5a4a95cb0c916d11a714f4010
macosforge
ValidateMP4
NA
OSErr Validate_hint_SD_Entry( atomOffsetEntry *aoe, void *refcon ) { TrackInfoRec *tir = (TrackInfoRec *)refcon; OSErr err = noErr; UInt64 offset; SampleDescriptionHead sdh; offset = aoe->offset; // Get data BAILIFERR( GetFileData( aoe, &sdh, offset, sizeof(sdh), &offset ) ); EndianSampleDescriptionHead_BtoN( &sdh ); //how to cope with hint data // Print atom contents non-required fields atomprint("sdType=\"%s\"\n", ostypetostr(sdh.sdType)); atomprint("dataRefIndex=\"%ld\"\n", sdh.dataRefIndex); atomprint(">\n"); //vg.tabcnt++; // Check required field values FieldMustBe( sdh.resvd1, 0, "SampleDescription resvd1 must be %d not 0x%lx" ); FieldMustBe( sdh.resvdA, 0, "SampleDescription resvd1 must be %d not 0x%lx" ); // hint data // All done aoe->aoeflags |= kAtomValidated; bail: return err; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40B846", "function_addr": 4241478, "binary_name": "4ceeddb7b16a39fbeac8045d03e7837b1e77a7d5a4a95cb0c916d11a714f4010.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_40], rsi"], [5, "mov rax, [rbp+var_40]"], [6, "mov [rbp+var_10], rax"], [7, "mov [rbp+var_2], 0"], [8, "mov rax, [rbp+var_38]"], [9, "mov rax, [rax+20h]"], [10, "mov [rbp+var_18], rax"], [11, "mov rdx, [rbp+var_18]"], [12, "lea rcx, [rbp+var_18]"], [13, "lea rsi, [rbp+var_30]"], [14, "mov rax, [rbp+var_38]"], [15, "mov r8, rcx"], [16, "mov ecx, 10h"], [17, "mov rdi, rax"], [18, "call sub_41C13F"], [19, "mov [rbp+var_2], ax"], [20, "cmp [rbp+var_2], 0"], [21, "jnz loc_40B953"], [22, "lea rax, [rbp+var_30]"], [23, "mov rdi, rax"], [24, "call sub_41CDC7"], [25, "mov eax, [rbp+var_2C]"], [26, "mov edi, eax"], [27, "call sub_4227FA"], [28, "mov rsi, rax"], [29, "mov edi, offset aSdtypeS"], [30, "mov eax, 0"], [31, "call sub_421F21"], [32, "movzx eax, [rbp+var_22]"], [33, "cwde"], [34, "mov esi, eax"], [35, "mov edi, offset aDatarefindexLd"], [36, "mov eax, 0"], [37, "call sub_421F21"], [38, "mov edi, offset asc_42548C"], [39, "mov eax, 0"], [40, "call sub_421F21"], [41, "mov eax, [rbp+var_28]"], [42, "test eax, eax"], [43, "jz short loc_40B912"], [44, "mov [rbp+var_2], 0F818h"], [45, "mov eax, [rbp+var_28]"], [46, "mov edx, eax"], [47, "mov esi, 0"], [48, "mov edi, offset aSampledescript_2"], [49, "mov eax, 0"], [50, "call sub_4226A8"], [51, "movzx eax, [rbp+var_24]"], [52, "test ax, ax"], [53, "jz short loc_40B93E"], [54, "mov [rbp+var_2], 0F818h"], [55, "movzx eax, [rbp+var_24]"], [56, "movzx eax, ax"], [57, "mov edx, eax"], [58, "mov esi, 0"], [59, "mov edi, offset aSampledescript_2"], [60, "mov eax, 0"], [61, "call sub_4226A8"], [62, "mov rax, [rbp+var_38]"], [63, "mov eax, [rax+34h]"], [64, "or eax, 1"], [65, "mov edx, eax"], [66, "mov rax, [rbp+var_38]"], [67, "mov [rax+34h], edx"], [68, "jmp short loc_40B954"], [69, "nop"], [70, "movzx eax, [rbp+var_2]"], [71, "leave"], [72, "retn"]], "data_dep": [[5, 4], [6, 5], [8, 3], [9, 8], [10, 9], [11, 10], [12, 10], [14, 3], [15, 12], [17, 14], [19, 18], [20, 19], [21, 20], [22, 18], [23, 22], [26, 25], [28, 27], [34, 32], [42, 41], [43, 42], [46, 45], [52, 51], [53, 52], [56, 55], [57, 56], [62, 3], [63, 62], [64, 63], [65, 64], [66, 3], [67, 65], [67, 66], [70, 54], [70, 44], [70, 19], [72, 70]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4ceeddb7b16a39fbeac8045d03e7837b1e77a7d5a4a95cb0c916d11a714f4010_4ceeddb7b16a39fbeac8045d03e7837b1e77a7d5a4a95cb0c916d11a714f4010.jsonl.gz", "strip_func_name": "sub_40B846", "query": "\n\n\n__int64 __fastcall sub_40B846(__int64 a1, __int64 a2)\n{\nint v2; // eax\nint v3; // edx\nint v4; // ecx\nint v5; // er8\nint v6; // er9\nint v7; // esi\nint v8; // edx\nint v9; // ecx\nint v10; // er8\nint v11; // er9\nint v12; // edx\nint v13; // ecx\nint v14; // er8\nint v15; // er9\nint v16; // ecx\nint v17; // er8\nint v18; // er9\nchar v20; // [rsp+0h] [rbp-40h]\nchar v21; // [rsp+0h] [rbp-40h]\nchar v22[4]; // [rsp+10h] [rbp-30h] BYREF\nunsigned int v23; // [rsp+14h] [rbp-2Ch]\nint v24; // [rsp+18h] [rbp-28h]\nunsigned __int16 v25; // [rsp+1Ch] [rbp-24h]\n__int16 v26; // [rsp+1Eh] [rbp-22h]\n__int64 v27[2]; // [rsp+28h] [rbp-18h] BYREF\nunsigned __int16 v28; // [rsp+3Eh] [rbp-2h]\n\nv27[1] = a2;\nv28 = 0;\nv27[0] = *(_QWORD *)(a1 + 32);\nv28 = sub_41C13F(a1, v22, v27[0], 16LL, v27);\nif ( !v28 )\n{\nsub_41CDC7(v22);\nv2 = sub_4227FA(v23);\nsub_421F21((unsigned int)\"sdType=\\\"%s\\\"\\n\", v2, v3, v4, v5, v6, a2);\nv7 = v26;\nsub_421F21((unsigned int)\"dataRefIndex=\\\"%ld\\\"\\n\", v26, v8, v9, v10, v11, v20);\nsub_421F21((unsigned int)\">\\n\", v7, v12, v13, v14, v15, v21);\nif ( v24 )\n{\nv28 = -2024;\nsub_4226A8((unsigned int)\"SampleDescription resvd1 must be %d not 0x%lx\\n\", 0, v24, v16, v17, v18);\n}\nif ( v25 )\n{\nv28 = -2024;\nsub_4226A8((unsigned int)\"SampleDescription resvd1 must be %d not 0x%lx\\n\", 0, v25, v16, v17, v18);\n}\n*(_DWORD *)(a1 + 52) |= 1u;\n}\nreturn v28;\n}\n\n\n\nQ:[a1,a2,v7,v22,v27,v28,sub_40B846,sub_41C13F,sub_41CDC7,sub_4227FA,sub_421F21,sub_4226A8,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'aoe', 'a2': 'refcon', 'v7': 'refcon', 'v22': 'sdh', 'v27': 'offset', 'v28': 'err', 'sub_40B846': 'Validate_hint_SD_Entry', 'sub_41C13F': 'GetFileData', 'sub_41CDC7': 'EndianSampleDescriptionHead_BtoN', 'sub_4227FA': 'ostypetostr', 'sub_421F21': 'atomprint', 'sub_4226A8': 'errprint'}"}
out_debug_aranges
dd1ff0e4669f93380ed9fd7e06bc6887c7f71c1897119ba61f472370a436c8a8
darwin-on-arm
darwin-sdk
NA
static void out_debug_aranges( struct frchain *aranges_section, struct frchain *info_section) { unsigned int addr_size = sizeof_address; addressT size, skip; struct line_seg *s; expressionS expr; char *p; size = 4 + 2 + 4 + 1 + 1; skip = 2 * addr_size - (size & (2 * addr_size - 1)); if (skip == 2 * addr_size) skip = 0; size += skip; for (s = all_segs; s; s = s->next) size += 2 * addr_size; size += 2 * addr_size; section_set(aranges_section); /* Length of the compilation unit. */ out_four (size - 4); /* Version. */ out_two (2); /* Offset to .debug_info. */ /* ??? sizeof_offset */ TC_DWARF2_EMIT_OFFSET (section_symbol (info_section), 4); /* Size of an address (offset portion). */ out_byte (addr_size); /* Size of a segment descriptor. */ out_byte (0); /* Align the header. */ if (skip) { char fill; fill = '\0'; frag_align (ffs (2 * addr_size) - 1, &fill, 1, 0); } for (s = all_segs; s; s = s->next) { fragS *frag; symbolS *beg, *end; frag = first_frag_for_seg (s->seg); beg = symbol_temp_new (s->seg, 0, frag); s->text_start = beg; frag = last_frag_for_seg (s->seg); end = symbol_temp_new (s->seg, get_frag_fix (frag, s->seg), frag); s->text_end = end; memset(&expr, '\0', sizeof(expr)); expr.X_op = O_symbol; expr.X_add_symbol = beg; expr.X_add_number = 0; emit_expr (&expr, addr_size); memset(&expr, '\0', sizeof(expr)); #ifdef OLD expr.X_op = O_subtract; #else expr.X_seg = SEG_DIFFSECT; #endif expr.X_add_symbol = end; #ifdef OLD expr.X_op_symbol = beg; #else expr.X_subtract_symbol = beg; #endif expr.X_add_number = 0; emit_expr (&expr, addr_size); } p = frag_more (2 * addr_size); md_number_to_chars (p, 0, addr_size); md_number_to_chars (p + addr_size, 0, addr_size); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_418C84", "function_addr": 4295812, "binary_name": "dd1ff0e4669f93380ed9fd7e06bc6887c7f71c1897119ba61f472370a436c8a8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "add rsp, 0FFFFFFFFFFFFFF80h"], [3, "mov [rbp+var_78], rdi"], [4, "mov [rbp+var_80], rsi"], [5, "mov eax, cs:dword_44F194"], [6, "mov [rbp+var_1C], eax"], [7, "mov [rbp+var_8], 0Ch"], [8, "mov eax, [rbp+var_1C]"], [9, "add eax, eax"], [10, "mov ecx, eax"], [11, "mov eax, [rbp+var_1C]"], [12, "add eax, eax"], [13, "sub eax, 1"], [14, "mov eax, eax"], [15, "and rax, [rbp+var_8]"], [16, "mov rdx, rax"], [17, "mov rax, rcx"], [18, "sub rax, rdx"], [19, "mov [rbp+var_10], rax"], [20, "mov eax, [rbp+var_1C]"], [21, "add eax, eax"], [22, "mov eax, eax"], [23, "cmp [rbp+var_10], rax"], [24, "jnz short loc_418CDC"], [25, "mov [rbp+var_10], 0"], [26, "mov rax, [rbp+var_10]"], [27, "add [rbp+var_8], rax"], [28, "mov rax, cs:qword_44F168"], [29, "mov [rbp+var_18], rax"], [30, "jmp short loc_418D07"], [31, "mov eax, [rbp+var_1C]"], [32, "add eax, eax"], [33, "mov eax, eax"], [34, "add [rbp+var_8], rax"], [35, "mov rax, [rbp+var_18]"], [36, "mov rax, [rax]"], [37, "mov [rbp+var_18], rax"], [38, "cmp [rbp+var_18], 0"], [39, "jnz short loc_418CF1"], [40, "mov eax, [rbp+var_1C]"], [41, "add eax, eax"], [42, "mov eax, eax"], [43, "add [rbp+var_8], rax"], [44, "mov rax, [rbp+var_78]"], [45, "mov rdi, rax"], [46, "call sub_412C1E"], [47, "mov rax, [rbp+var_8]"], [48, "sub eax, 4"], [49, "mov edi, eax"], [50, "call sub_417A60"], [51, "mov edi, 2"], [52, "call sub_417A2D"], [53, "mov rax, [rbp+var_80]"], [54, "mov rdi, rax"], [55, "call sub_412C63"], [56, "mov esi, 4"], [57, "mov rdi, rax"], [58, "call sub_419A3F"], [59, "mov eax, [rbp+var_1C]"], [60, "mov edi, eax"], [61, "call sub_417980"], [62, "mov edi, 0"], [63, "call sub_417980"], [64, "cmp [rbp+var_10], 0"], [65, "jz short loc_418D9A"], [66, "mov [rbp+var_61], 0"], [67, "mov eax, [rbp+var_1C]"], [68, "add eax, eax"], [69, "mov edi, eax"], [70, "call _ffs"], [71, "lea edi, [rax-1]"], [72, "lea rax, [rbp+var_61]"], [73, "mov ecx, 0"], [74, "mov edx, 1"], [75, "mov rsi, rax"], [76, "call sub_407E94"], [77, "mov rax, cs:qword_44F168"], [78, "mov [rbp+var_18], rax"], [79, "jmp loc_418EC1"], [80, "mov rax, [rbp+var_18]"], [81, "mov eax, [rax+8]"], [82, "mov edi, eax"], [83, "call sub_417943"], [84, "mov [rbp+var_30], rax"], [85, "mov rax, [rbp+var_18]"], [86, "mov eax, [rax+8]"], [87, "mov rdx, [rbp+var_30]"], [88, "mov esi, 0"], [89, "mov edi, eax"], [90, "call sub_414385"], [91, "mov [rbp+var_38], rax"], [92, "mov rax, [rbp+var_18]"], [93, "mov rdx, [rbp+var_38]"], [94, "mov [rax+18h], rdx"], [95, "mov rax, [rbp+var_18]"], [96, "mov eax, [rax+8]"], [97, "mov edi, eax"], [98, "call sub_41795D"], [99, "mov [rbp+var_30], rax"], [100, "mov rax, [rbp+var_18]"], [101, "mov edx, [rax+8]"], [102, "mov rax, [rbp+var_30]"], [103, "mov esi, edx"], [104, "mov rdi, rax"], [105, "call sub_417B3E"], [106, "mov rcx, rax"], [107, "mov rax, [rbp+var_18]"], [108, "mov eax, [rax+8]"], [109, "mov rdx, [rbp+var_30]"], [110, "mov rsi, rcx"], [111, "mov edi, eax"], [112, "call sub_414385"], [113, "mov [rbp+var_40], rax"], [114, "mov rax, [rbp+var_18]"], [115, "mov rdx, [rbp+var_40]"], [116, "mov [rax+20h], rdx"], [117, "lea rax, [rbp+s]"], [118, "mov edx, 20h "], [119, "mov esi, 0"], [120, "mov rdi, rax"], [121, "call _memset"], [122, "mov [rbp+var_48], 1"], [123, "mov rax, [rbp+var_38]"], [124, "mov [rbp+s], rax"], [125, "mov [rbp+var_50], 0"], [126, "mov edx, [rbp+var_1C]"], [127, "lea rax, [rbp+s]"], [128, "mov esi, edx"], [129, "mov rdi, rax"], [130, "call sub_416A63"], [131, "lea rax, [rbp+s]"], [132, "mov edx, 20h "], [133, "mov esi, 0"], [134, "mov rdi, rax"], [135, "call _memset"], [136, "mov [rbp+var_48], 2"], [137, "mov rax, [rbp+var_40]"], [138, "mov [rbp+s], rax"], [139, "mov rax, [rbp+var_38]"], [140, "mov [rbp+var_58], rax"], [141, "mov [rbp+var_50], 0"], [142, "mov edx, [rbp+var_1C]"], [143, "lea rax, [rbp+s]"], [144, "mov esi, edx"], [145, "mov rdi, rax"], [146, "call sub_416A63"], [147, "mov rax, [rbp+var_18]"], [148, "mov rax, [rax]"], [149, "mov [rbp+var_18], rax"], [150, "cmp [rbp+var_18], 0"], [151, "jnz loc_418DAA"], [152, "mov eax, [rbp+var_1C]"], [153, "add eax, eax"], [154, "mov edi, eax"], [155, "call sub_407D83"], [156, "mov [rbp+var_28], rax"], [157, "mov edx, [rbp+var_1C]"], [158, "mov rax, [rbp+var_28]"], [159, "mov esi, 0"], [160, "mov rdi, rax"], [161, "call sub_41D253"], [162, "mov eax, [rbp+var_1C]"], [163, "mov ecx, [rbp+var_1C]"], [164, "mov rdx, [rbp+var_28]"], [165, "add rcx, rdx"], [166, "mov edx, eax"], [167, "mov esi, 0"], [168, "mov rdi, rcx"], [169, "call sub_41D253"], [170, "nop"], [171, "leave"], [172, "retn"]], "data_dep": [[6, 5], [8, 6], [9, 8], [10, 9], [11, 6], [12, 11], [13, 12], [14, 13], [15, 14], [15, 7], [16, 15], [17, 10], [18, 17], [18, 16], [19, 18], [20, 6], [21, 20], [22, 21], [23, 22], [23, 19], [24, 23], [26, 25], [26, 19], [27, 26], [27, 7], [29, 28], [31, 6], [32, 31], [33, 32], [34, 34], [34, 27], [34, 33], [35, 37], [35, 29], [36, 35], [37, 36], [38, 29], [38, 37], [39, 38], [40, 6], [41, 40], [42, 41], [43, 34], [43, 27], [43, 42], [44, 3], [45, 44], [47, 43], [48, 47], [49, 48], [53, 4], [54, 53], [57, 55], [59, 6], [60, 59], [64, 25], [64, 19], [65, 64], [67, 6], [68, 67], [69, 68], [71, 69], [71, 70], [72, 66], [72, 70], [75, 72], [78, 77], [80, 149], [80, 78], [81, 94], [81, 80], [81, 116], [82, 81], [84, 83], [85, 149], [85, 78], [86, 85], [86, 94], [86, 116], [87, 84], [89, 86], [91, 90], [92, 149], [92, 78], [93, 91], [94, 93], [94, 92], [95, 149], [95, 78], [96, 95], [96, 94], [97, 96], [99, 98], [100, 149], [100, 78], [101, 94], [101, 100], [102, 99], [103, 101], [104, 102], [106, 105], [107, 149], [107, 78], [108, 107], [108, 94], [109, 99], [110, 106], [111, 108], [113, 112], [114, 149], [114, 78], [115, 113], [116, 115], [116, 114], [117, 114], [117, 138], [120, 117], [123, 91], [124, 123], [126, 6], [127, 124], [127, 123], [128, 126], [129, 127], [131, 124], [131, 130], [134, 131], [137, 113], [138, 137], [139, 91], [140, 139], [142, 6], [143, 139], [143, 138], [144, 142], [145, 143], [147, 149], [147, 78], [148, 147], [148, 116], [149, 148], [150, 149], [150, 78], [151, 150], [152, 6], [153, 152], [154, 153], [156, 155], [157, 6], [158, 156], [160, 158], [162, 6], [163, 6], [164, 156], [165, 163], [165, 164], [166, 162], [168, 165], [172, 169]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_418C84", "query": "\n\n\n__int64 __fastcall sub_418C84(__int64 a1, char *a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 v6; // rdx\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; // rax\nint v16; // edx\nint v17; // ecx\nint v18; // er8\nint v19; // er9\nint v20; // eax\n__int64 v21; // rax\n__int64 v22; // rcx\n__int64 v23; // r8\n__int64 v24; // r9\n__int64 v25; // rcx\n__int64 v26; // r8\n__int64 v27; // r9\nchar v29; // [rsp+1Fh] [rbp-61h] BYREF\n__int64 s[2]; // [rsp+20h] [rbp-60h] BYREF\n__int64 v31; // [rsp+30h] [rbp-50h]\nint v32; // [rsp+38h] [rbp-48h]\n__int64 v33; // [rsp+40h] [rbp-40h]\n__int64 v34; // [rsp+48h] [rbp-38h]\n__int64 v35; // [rsp+50h] [rbp-30h]\n__int64 v36; // [rsp+58h] [rbp-28h]\nunsigned int v37; // [rsp+64h] [rbp-1Ch]\n__int64 i; // [rsp+68h] [rbp-18h]\n__int64 v39; // [rsp+70h] [rbp-10h]\n__int64 v40; // [rsp+78h] [rbp-8h]\n\nv37 = dword_44F194;\nv40 = 12LL;\nv6 = (2 * dword_44F194 - 1) & 0xCLL;\nv39 = (unsigned int)(2 * dword_44F194) - v6;\nif ( v39 == 2 * dword_44F194 )\nv39 = 0LL;\nv40 += v39;\nfor ( i = qword_44F168; i; i = *(_QWORD *)i )\nv40 += 2 * v37;\nv40 += 2 * v37;\nsub_412C1E(a1, (__int64)a2, v6, (unsigned int)(2 * dword_44F194), a5, a6);\nsub_417A60(v40 - 4, (int)a2, v7, v8, v9, v10);\nsub_417A2D(2, (int)a2, v11, v12, v13, v14);\nv15 = sub_412C63((__int64)a2);\nLODWORD(a2) = 4;\nsub_419A3F(v15, 4LL);\nsub_417980(v37, 4);\nsub_417980(0, 4);\nif ( v39 )\n{\nv29 = 0;\nv20 = ffs(2 * v37);\na2 = &v29;\nsub_407E94(v20 - 1, &v29, 1, 0);\n}\nfor ( i = qword_44F168; i; i = *(_QWORD *)i )\n{\nv35 = sub_417943(*(_DWORD *)(i + 8));\nv34 = sub_414385(*(_DWORD *)(i + 8), 0LL, v35);\n*(_QWORD *)(i + 24) = v34;\nv35 = sub_41795D(*(_DWORD *)(i + 8));\nv21 = sub_417B3E(v35, *(unsigned int *)(i + 8));\nv33 = sub_414385(*(_DWORD *)(i + 8), v21, v35);\n*(_QWORD *)(i + 32) = v33;\nmemset(s, 0, 0x20uLL);\nv32 = 1;\ns[0] = v34;\nv31 = 0LL;\nsub_416A63((__int64)s, v37, v37, v22, v23, v24);\nmemset(s, 0, 0x20uLL);\nv32 = 2;\ns[0] = v33;\ns[1] = v34;\nv31 = 0LL;\nLODWORD(a2) = v37;\nsub_416A63((__int64)s, v37, v37, v25, v26, v27);\n}\nv36 = sub_407D83(2 * v37, (int)a2, v16, v17, v18, v19);\nsub_41D253(v36, 0LL, v37);\nreturn sub_41D253(v36 + v37, 0LL, v37);\n}\n\n\n\nQ:[a1,a2,v29,s,v33,v34,v35,v36,v37,i,v39,v40,sub_418C84,sub_412C1E,sub_417A60,sub_417A2D,sub_412C63,sub_419A3F,sub_417980,sub_407E94,sub_417943,sub_414385,sub_41795D,sub_417B3E,sub_416A63,sub_407D83,sub_41D253,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'aranges_section', 'a2': 'info_section', 'v29': 'fill', 's': 'expr', 'v33': 'end', 'v34': 'beg', 'v35': 'frag', 'v36': 'p', 'v37': 'addr_size', 'i': 's', 'v39': 'skip', 'v40': 'size', 'sub_418C84': 'out_debug_aranges', 'sub_412C1E': 'section_set', 'sub_417A60': 'out_four', 'sub_417A2D': 'out_two', 'sub_412C63': 'section_symbol', 'sub_419A3F': 'macho_dwarf2_emit_offset', 'sub_417980': 'out_byte', 'sub_407E94': 'frag_align', 'sub_417943': 'first_frag_for_seg', 'sub_414385': 'symbol_temp_new', 'sub_41795D': 'last_frag_for_seg', 'sub_417B3E': 'get_frag_fix', 'sub_416A63': 'emit_expr', 'sub_407D83': 'frag_more', 'sub_41D253': 'md_number_to_chars'}"}
psa_aead_unpadded_locate_tag
6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7
mattsta
trade-balancer
NA
static psa_status_t psa_aead_unpadded_locate_tag( size_t tag_length, const uint8_t *ciphertext, size_t ciphertext_length, size_t plaintext_size, const uint8_t **p_tag ) { size_t payload_length; if( tag_length > ciphertext_length ) return( PSA_ERROR_INVALID_ARGUMENT ); payload_length = ciphertext_length - tag_length; if( payload_length > plaintext_size ) return( PSA_ERROR_BUFFER_TOO_SMALL ); *p_tag = ciphertext + payload_length; return( PSA_SUCCESS ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42A315", "function_addr": 4367125, "binary_name": "6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_20], rsi"], [4, "mov [rbp+var_28], rdx"], [5, "mov [rbp+var_30], rcx"], [6, "mov [rbp+var_38], r8"], [7, "mov rax, [rbp+var_18]"], [8, "cmp rax, [rbp+var_28]"], [9, "jbe short loc_42A33E"], [10, "mov eax, 0FFFFFF79h"], [11, "jmp short loc_42A372"], [12, "mov rax, [rbp+var_28]"], [13, "sub rax, [rbp+var_18]"], [14, "mov [rbp+var_8], rax"], [15, "mov rax, [rbp+var_8]"], [16, "cmp rax, [rbp+var_30]"], [17, "jbe short loc_42A35B"], [18, "mov eax, 0FFFFFF76h"], [19, "jmp short loc_42A372"], [20, "mov rdx, [rbp+var_20]"], [21, "mov rax, [rbp+var_8]"], [22, "add rdx, rax"], [23, "mov rax, [rbp+var_38]"], [24, "mov [rax], rdx"], [25, "mov eax, 0"], [26, "pop rbp"], [27, "retn"]], "data_dep": [[7, 2], [8, 4], [8, 7], [9, 8], [12, 4], [13, 2], [13, 12], [14, 13], [15, 14], [16, 15], [16, 5], [17, 16], [20, 3], [21, 14], [22, 20], [22, 21], [23, 6], [24, 23], [24, 22], [26, 0], [27, 10], [27, 25], [27, 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/6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7_6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7.jsonl.gz", "strip_func_name": "sub_42A315", "query": "\n\n\n__int64 __fastcall sub_42A315(unsigned __int64 a1, __int64 a2, unsigned __int64 a3, unsigned __int64 a4, _QWORD *a5)\n{\nif ( a1 > a3 )\nreturn 4294967161LL;\nif ( a3 - a1 > a4 )\nreturn 4294967158LL;\n*a5 = a3 - a1 + a2;\nreturn 0LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,sub_42A315,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'ciphertext_length', 'a4': 'plaintext_size', 'a1': 'tag_length', 'a2': 'ciphertext', 'a5': 'p_tag', 'sub_42A315': 'psa_aead_unpadded_locate_tag'}"}
unpack22_16
799b5628046b8f172e6a885d14321e62e3f40deeddebc3071fc152e5a0e7f98c
cruppstahl
libfor
NA
static uint32_t unpack22_16(uint32_t base, const uint8_t *in, uint32_t *out) { uint32_t *in32 = (uint32_t *)in; uint32_t tmp; (void)tmp; *(out + 0) = base + ((*in32 >> 0) & 4194303); tmp = (*in32 >> 22); in32++; /* consumed: 4 bytes (total: 8) */ tmp |= (*in32 % (1U << 12)) << (22 - 12); *(out + 1) = base + tmp; tmp = (*in32 >> 12); in32++; /* consumed: 4 bytes (total: 12) */ tmp |= (*in32 % (1U << 2)) << (22 - 2); *(out + 2) = base + tmp; *(out + 3) = base + ((*in32 >> 2) & 4194303); tmp = (*in32 >> 24); in32++; /* consumed: 4 bytes (total: 16) */ tmp |= (*in32 % (1U << 14)) << (22 - 14); *(out + 4) = base + tmp; tmp = (*in32 >> 14); in32++; /* consumed: 4 bytes (total: 20) */ tmp |= (*in32 % (1U << 4)) << (22 - 4); *(out + 5) = base + tmp; *(out + 6) = base + ((*in32 >> 4) & 4194303); tmp = (*in32 >> 26); in32++; /* consumed: 4 bytes (total: 24) */ tmp |= (*in32 % (1U << 16)) << (22 - 16); *(out + 7) = base + tmp; tmp = (*in32 >> 16); in32++; /* consumed: 4 bytes (total: 28) */ tmp |= (*in32 % (1U << 6)) << (22 - 6); *(out + 8) = base + tmp; *(out + 9) = base + ((*in32 >> 6) & 4194303); tmp = (*in32 >> 28); in32++; /* consumed: 4 bytes (total: 32) */ tmp |= (*in32 % (1U << 18)) << (22 - 18); *(out + 10) = base + tmp; tmp = (*in32 >> 18); in32++; /* consumed: 4 bytes (total: 36) */ tmp |= (*in32 % (1U << 8)) << (22 - 8); *(out + 11) = base + tmp; *(out + 12) = base + ((*in32 >> 8) & 4194303); tmp = (*in32 >> 30); in32++; /* consumed: 4 bytes (total: 40) */ tmp |= (*in32 % (1U << 20)) << (22 - 20); *(out + 13) = base + tmp; tmp = (*in32 >> 20); in32++; /* consumed: 4 bytes (total: 44) */ tmp |= (*in32 % (1U << 10)) << (22 - 10); *(out + 14) = base + tmp; *(out + 15) = base + ((*in32 >> 10) & 4194303); /* remaining: 0 bits */ return 44; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41C4F9", "function_addr": 4310265, "binary_name": "799b5628046b8f172e6a885d14321e62e3f40deeddebc3071fc152e5a0e7f98c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_14], edi"], [3, "mov [rbp+var_20], rsi"], [4, "mov [rbp+var_28], rdx"], [5, "mov rax, [rbp+var_20]"], [6, "mov [rbp+var_8], rax"], [7, "mov rax, [rbp+var_8]"], [8, "mov eax, [rax]"], [9, "and eax, 3FFFFFh"], [10, "mov edx, eax"], [11, "mov eax, [rbp+var_14]"], [12, "add edx, eax"], [13, "mov rax, [rbp+var_28]"], [14, "mov [rax], edx"], [15, "mov rax, [rbp+var_8]"], [16, "mov eax, [rax]"], [17, "shr eax, 16h"], [18, "mov [rbp+var_C], eax"], [19, "add [rbp+var_8], 4"], [20, "mov rax, [rbp+var_8]"], [21, "mov eax, [rax]"], [22, "shl eax, 0Ah"], [23, "and eax, 3FFC00h"], [24, "or [rbp+var_C], eax"], [25, "mov rax, [rbp+var_28]"], [26, "add rax, 4"], [27, "mov ecx, [rbp+var_14]"], [28, "mov edx, [rbp+var_C]"], [29, "add edx, ecx"], [30, "mov [rax], edx"], [31, "mov rax, [rbp+var_8]"], [32, "mov eax, [rax]"], [33, "shr eax, 0Ch"], [34, "mov [rbp+var_C], eax"], [35, "add [rbp+var_8], 4"], [36, "mov rax, [rbp+var_8]"], [37, "mov eax, [rax]"], [38, "shl eax, 14h"], [39, "and eax, 300000h"], [40, "or [rbp+var_C], eax"], [41, "mov rax, [rbp+var_28]"], [42, "add rax, 8"], [43, "mov ecx, [rbp+var_14]"], [44, "mov edx, [rbp+var_C]"], [45, "add edx, ecx"], [46, "mov [rax], edx"], [47, "mov rax, [rbp+var_8]"], [48, "mov eax, [rax]"], [49, "shr eax, 2"], [50, "and eax, 3FFFFFh"], [51, "mov ecx, eax"], [52, "mov rax, [rbp+var_28]"], [53, "add rax, 0Ch"], [54, "mov edx, [rbp+var_14]"], [55, "add edx, ecx"], [56, "mov [rax], edx"], [57, "mov rax, [rbp+var_8]"], [58, "mov eax, [rax]"], [59, "shr eax, 18h"], [60, "mov [rbp+var_C], eax"], [61, "add [rbp+var_8], 4"], [62, "mov rax, [rbp+var_8]"], [63, "mov eax, [rax]"], [64, "shl eax, 8"], [65, "and eax, 3FFF00h"], [66, "or [rbp+var_C], eax"], [67, "mov rax, [rbp+var_28]"], [68, "add rax, 10h"], [69, "mov ecx, [rbp+var_14]"], [70, "mov edx, [rbp+var_C]"], [71, "add edx, ecx"], [72, "mov [rax], edx"], [73, "mov rax, [rbp+var_8]"], [74, "mov eax, [rax]"], [75, "shr eax, 0Eh"], [76, "mov [rbp+var_C], eax"], [77, "add [rbp+var_8], 4"], [78, "mov rax, [rbp+var_8]"], [79, "mov eax, [rax]"], [80, "shl eax, 12h"], [81, "and eax, 3C0000h"], [82, "or [rbp+var_C], eax"], [83, "mov rax, [rbp+var_28]"], [84, "add rax, 14h"], [85, "mov ecx, [rbp+var_14]"], [86, "mov edx, [rbp+var_C]"], [87, "add edx, ecx"], [88, "mov [rax], edx"], [89, "mov rax, [rbp+var_8]"], [90, "mov eax, [rax]"], [91, "shr eax, 4"], [92, "and eax, 3FFFFFh"], [93, "mov ecx, eax"], [94, "mov rax, [rbp+var_28]"], [95, "add rax, 18h"], [96, "mov edx, [rbp+var_14]"], [97, "add edx, ecx"], [98, "mov [rax], edx"], [99, "mov rax, [rbp+var_8]"], [100, "mov eax, [rax]"], [101, "shr eax, 1Ah"], [102, "mov [rbp+var_C], eax"], [103, "add [rbp+var_8], 4"], [104, "mov rax, [rbp+var_8]"], [105, "mov eax, [rax]"], [106, "shl eax, 6"], [107, "and eax, 3FFFC0h"], [108, "or [rbp+var_C], eax"], [109, "mov rax, [rbp+var_28]"], [110, "add rax, 1Ch"], [111, "mov ecx, [rbp+var_14]"], [112, "mov edx, [rbp+var_C]"], [113, "add edx, ecx"], [114, "mov [rax], edx"], [115, "mov rax, [rbp+var_8]"], [116, "mov eax, [rax]"], [117, "shr eax, 10h"], [118, "mov [rbp+var_C], eax"], [119, "add [rbp+var_8], 4"], [120, "mov rax, [rbp+var_8]"], [121, "mov eax, [rax]"], [122, "shl eax, 10h"], [123, "and eax, 3F0000h"], [124, "or [rbp+var_C], eax"], [125, "mov rax, [rbp+var_28]"], [126, "add rax, 20h "], [127, "mov ecx, [rbp+var_14]"], [128, "mov edx, [rbp+var_C]"], [129, "add edx, ecx"], [130, "mov [rax], edx"], [131, "mov rax, [rbp+var_8]"], [132, "mov eax, [rax]"], [133, "shr eax, 6"], [134, "and eax, 3FFFFFh"], [135, "mov ecx, eax"], [136, "mov rax, [rbp+var_28]"], [137, "add rax, 24h "], [138, "mov edx, [rbp+var_14]"], [139, "add edx, ecx"], [140, "mov [rax], edx"], [141, "mov rax, [rbp+var_8]"], [142, "mov eax, [rax]"], [143, "shr eax, 1Ch"], [144, "mov [rbp+var_C], eax"], [145, "add [rbp+var_8], 4"], [146, "mov rax, [rbp+var_8]"], [147, "mov eax, [rax]"], [148, "shl eax, 4"], [149, "and eax, 3FFFF0h"], [150, "or [rbp+var_C], eax"], [151, "mov rax, [rbp+var_28]"], [152, "add rax, 28h "], [153, "mov ecx, [rbp+var_14]"], [154, "mov edx, [rbp+var_C]"], [155, "add edx, ecx"], [156, "mov [rax], edx"], [157, "mov rax, [rbp+var_8]"], [158, "mov eax, [rax]"], [159, "shr eax, 12h"], [160, "mov [rbp+var_C], eax"], [161, "add [rbp+var_8], 4"], [162, "mov rax, [rbp+var_8]"], [163, "mov eax, [rax]"], [164, "shl eax, 0Eh"], [165, "and eax, 3FC000h"], [166, "or [rbp+var_C], eax"], [167, "mov rax, [rbp+var_28]"], [168, "add rax, 2Ch "], [169, "mov ecx, [rbp+var_14]"], [170, "mov edx, [rbp+var_C]"], [171, "add edx, ecx"], [172, "mov [rax], edx"], [173, "mov rax, [rbp+var_8]"], [174, "mov eax, [rax]"], [175, "shr eax, 8"], [176, "and eax, 3FFFFFh"], [177, "mov ecx, eax"], [178, "mov rax, [rbp+var_28]"], [179, "add rax, 30h "], [180, "mov edx, [rbp+var_14]"], [181, "add edx, ecx"], [182, "mov [rax], edx"], [183, "mov rax, [rbp+var_8]"], [184, "mov eax, [rax]"], [185, "shr eax, 1Eh"], [186, "mov [rbp+var_C], eax"], [187, "add [rbp+var_8], 4"], [188, "mov rax, [rbp+var_8]"], [189, "mov eax, [rax]"], [190, "shl eax, 2"], [191, "and eax, 3FFFFCh"], [192, "or [rbp+var_C], eax"], [193, "mov rax, [rbp+var_28]"], [194, "add rax, 34h "], [195, "mov ecx, [rbp+var_14]"], [196, "mov edx, [rbp+var_C]"], [197, "add edx, ecx"], [198, "mov [rax], edx"], [199, "mov rax, [rbp+var_8]"], [200, "mov eax, [rax]"], [201, "shr eax, 14h"], [202, "mov [rbp+var_C], eax"], [203, "add [rbp+var_8], 4"], [204, "mov rax, [rbp+var_8]"], [205, "mov eax, [rax]"], [206, "shl eax, 0Ch"], [207, "and eax, 3FF000h"], [208, "or [rbp+var_C], eax"], [209, "mov rax, [rbp+var_28]"], [210, "add rax, 38h "], [211, "mov ecx, [rbp+var_14]"], [212, "mov edx, [rbp+var_C]"], [213, "add edx, ecx"], [214, "mov [rax], edx"], [215, "mov rax, [rbp+var_8]"], [216, "mov eax, [rax]"], [217, "shr eax, 0Ah"], [218, "mov ecx, eax"], [219, "mov rax, [rbp+var_28]"], [220, "add rax, 3Ch "], [221, "mov edx, [rbp+var_14]"], [222, "add edx, ecx"], [223, "mov [rax], edx"], [224, "mov eax, 2Ch "], [225, "pop rbp"], [226, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 2], [12, 10], [12, 11], [13, 4], [14, 13], [14, 12], [15, 6], [16, 15], [16, 14], [17, 16], [18, 17], [19, 6], [20, 19], [21, 20], [21, 14], [22, 21], [23, 22], [24, 23], [24, 18], [25, 4], [26, 25], [27, 2], [28, 24], [29, 27], [29, 28], [30, 29], [30, 26], [31, 19], [32, 30], [32, 31], [33, 32], [34, 33], [35, 19], [36, 35], [37, 30], [37, 36], [38, 37], [39, 38], [40, 34], [40, 39], [41, 4], [42, 41], [43, 2], [44, 40], [45, 43], [45, 44], [46, 45], [46, 42], [47, 35], [48, 47], [48, 46], [49, 48], [50, 49], [51, 50], [52, 4], [53, 52], [54, 2], [55, 54], [55, 51], [56, 53], [56, 55], [57, 35], [58, 56], [58, 57], [59, 58], [60, 59], [61, 35], [62, 61], [63, 56], [63, 62], [64, 63], [65, 64], [66, 60], [66, 65], [67, 4], [68, 67], [69, 2], [70, 66], [71, 69], [71, 70], [72, 68], [72, 71], [73, 61], [74, 73], [74, 72], [75, 74], [76, 75], [77, 61], [78, 77], [79, 78], [79, 72], [80, 79], [81, 80], [82, 81], [82, 76], [83, 4], [84, 83], [85, 2], [86, 82], [87, 86], [87, 85], [88, 87], [88, 84], [89, 77], [90, 88], [90, 89], [91, 90], [92, 91], [93, 92], [94, 4], [95, 94], [96, 2], [97, 96], [97, 93], [98, 95], [98, 97], [99, 77], [100, 98], [100, 99], [101, 100], [102, 101], [103, 77], [104, 103], [105, 104], [105, 98], [106, 105], [107, 106], [108, 107], [108, 102], [109, 4], [110, 109], [111, 2], [112, 108], [113, 112], [113, 111], [114, 113], [114, 110], [115, 103], [116, 115], [116, 114], [117, 116], [118, 117], [119, 103], [120, 119], [121, 114], [121, 120], [122, 121], [123, 122], [124, 123], [124, 118], [125, 4], [126, 125], [127, 2], [128, 124], [129, 128], [129, 127], [130, 126], [130, 129], [131, 119], [132, 130], [132, 131], [133, 132], [134, 133], [135, 134], [136, 4], [137, 136], [138, 2], [139, 135], [139, 138], [140, 137], [140, 139], [141, 119], [142, 141], [142, 140], [143, 142], [144, 143], [145, 119], [146, 145], [147, 146], [147, 140], [148, 147], [149, 148], [150, 149], [150, 144], [151, 4], [152, 151], [153, 2], [154, 150], [155, 153], [155, 154], [156, 155], [156, 152], [157, 145], [158, 156], [158, 157], [159, 158], [160, 159], [161, 145], [162, 161], [163, 156], [163, 162], [164, 163], [165, 164], [166, 165], [166, 160], [167, 4], [168, 167], [169, 2], [170, 166], [171, 170], [171, 169], [172, 168], [172, 171], [173, 161], [174, 173], [174, 172], [175, 174], [176, 175], [177, 176], [178, 4], [179, 178], [180, 2], [181, 180], [181, 177], [182, 179], [182, 181], [183, 161], [184, 182], [184, 183], [185, 184], [186, 185], [187, 161], [188, 187], [189, 182], [189, 188], [190, 189], [191, 190], [192, 191], [192, 186], [193, 4], [194, 193], [195, 2], [196, 192], [197, 195], [197, 196], [198, 194], [198, 197], [199, 187], [200, 199], [200, 198], [201, 200], [202, 201], [203, 187], [204, 203], [205, 204], [205, 198], [206, 205], [207, 206], [208, 207], [208, 202], [209, 4], [210, 209], [211, 2], [212, 208], [213, 212], [213, 211], [214, 213], [214, 210], [215, 203], [216, 214], [216, 215], [217, 216], [218, 217], [219, 4], [220, 219], [221, 2], [222, 221], [222, 218], [223, 220], [223, 222], [225, 0], [226, 224]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/799b5628046b8f172e6a885d14321e62e3f40deeddebc3071fc152e5a0e7f98c_799b5628046b8f172e6a885d14321e62e3f40deeddebc3071fc152e5a0e7f98c.jsonl.gz", "strip_func_name": "sub_41C4F9", "query": "\n\n\n__int64 __fastcall sub_41C4F9(int a1, _DWORD *a2, _DWORD *a3)\n{\n*a3 = a1 + (*a2 & 0x3FFFFF);\na3[1] = a1 + ((a2[1] << 10) & 0x3FFC00 | (*a2 >> 22));\na3[2] = a1 + ((a2[2] << 20) & 0x300000 | (a2[1] >> 12));\na3[3] = ((a2[2] >> 2) & 0x3FFFFF) + a1;\na3[4] = a1 + ((a2[3] << 8) & 0x3FFF00 | HIBYTE(a2[2]));\na3[5] = a1 + ((a2[4] << 18) & 0x3C0000 | (a2[3] >> 14));\na3[6] = ((a2[4] >> 4) & 0x3FFFFF) + a1;\na3[7] = a1 + ((a2[5] << 6) & 0x3FFFC0 | (a2[4] >> 26));\na3[8] = a1 + ((a2[6] << 16) & 0x3F0000 | HIWORD(a2[5]));\na3[9] = ((a2[6] >> 6) & 0x3FFFFF) + a1;\na3[10] = a1 + ((16 * a2[7]) & 0x3FFFF0 | (a2[6] >> 28));\na3[11] = a1 + ((a2[8] << 14) & 0x3FC000 | (a2[7] >> 18));\na3[12] = ((a2[8] >> 8) & 0x3FFFFF) + a1;\na3[13] = a1 + ((4 * a2[9]) & 0x3FFFFC | (a2[8] >> 30));\na3[14] = a1 + ((a2[10] << 12) & 0x3FF000 | (a2[9] >> 20));\na3[15] = (a2[10] >> 10) + a1;\nreturn 44LL;\n}\n\n\n\nQ:[a3,a1,a2,sub_41C4F9,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'out', 'a1': 'base', 'a2': 'in', 'sub_41C4F9': 'unpack22_16'}"}
player_ai
2cddf1111182aa7b8fd9a72066b3813bcc4961bc853b85ec9d847b9a314a5ddc
skeeto
connect4
NA
static int player_ai(const struct connect4_game *g, void *arg) { struct ai_config *conf = arg; if (g->nplays) connect4_advance(conf->ai, g->plays[g->nplays - 1]); int play = connect4_playout_many(conf->ai, conf->max_playouts); connect4_advance(conf->ai, play); return play; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402AD0", "function_addr": 4205264, "binary_name": "2cddf1111182aa7b8fd9a72066b3813bcc4961bc853b85ec9d847b9a314a5ddc.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 [rbp+var_8], rax"], [7, "mov rax, [rbp+var_18]"], [8, "mov eax, [rax+20h]"], [9, "test eax, eax"], [10, "jz short loc_402B1C"], [11, "mov rax, [rbp+var_18]"], [12, "mov eax, [rax+20h]"], [13, "lea edx, [rax-1]"], [14, "mov rax, [rbp+var_18]"], [15, "mov edx, edx"], [16, "movzx eax, byte ptr [rax+rdx+24h]"], [17, "movsx edx, al"], [18, "mov rax, [rbp+var_8]"], [19, "mov rax, [rax]"], [20, "mov esi, edx"], [21, "mov rdi, rax"], [22, "call sub_4018D5"], [23, "mov rax, [rbp+var_8]"], [24, "mov edx, [rax+8]"], [25, "mov rax, [rbp+var_8]"], [26, "mov rax, [rax]"], [27, "mov esi, edx"], [28, "mov rdi, rax"], [29, "call sub_4023C5"], [30, "mov [rbp+var_C], eax"], [31, "mov rax, [rbp+var_8]"], [32, "mov rax, [rax]"], [33, "mov edx, [rbp+var_C]"], [34, "mov esi, edx"], [35, "mov rdi, rax"], [36, "call sub_4018D5"], [37, "mov eax, [rbp+var_C]"], [38, "leave"], [39, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [8, 7], [9, 8], [10, 9], [11, 3], [12, 11], [13, 12], [14, 3], [15, 13], [16, 14], [17, 16], [18, 6], [19, 18], [20, 17], [21, 19], [23, 6], [24, 23], [25, 6], [26, 25], [27, 24], [28, 26], [30, 29], [31, 6], [32, 31], [33, 30], [34, 33], [35, 32], [37, 30], [39, 37]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2cddf1111182aa7b8fd9a72066b3813bcc4961bc853b85ec9d847b9a314a5ddc_2cddf1111182aa7b8fd9a72066b3813bcc4961bc853b85ec9d847b9a314a5ddc.jsonl.gz", "strip_func_name": "sub_402AD0", "query": "\n\n\n__int64 __fastcall sub_402AD0(__int64 a1, __int64 a2)\n{\nunsigned int v3; // [rsp+14h] [rbp-Ch]\n\nif ( *(_DWORD *)(a1 + 32) )\nsub_4018D5(*(_QWORD *)a2, *(char *)(a1 + (unsigned int)(*(_DWORD *)(a1 + 32) - 1) + 36));\nv3 = sub_4023C5(*(_QWORD *)a2, *(_DWORD *)(a2 + 8));\nsub_4018D5(*(_QWORD *)a2, v3);\nreturn v3;\n}\n\n\n\nQ:[a1,a2,v3,sub_402AD0,sub_4018D5,sub_4023C5,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'g', 'a2': 'arg', 'v3': 'play', 'sub_402AD0': 'player_ai', 'sub_4018D5': 'connect4_advance', 'sub_4023C5': 'connect4_playout_many'}"}
i3
068e8c840d638c2eaa565d359b5c2b1386f2bbb2f371dad9eb4b78e0e5da3ef1
projecthorus
radiosonde_auto_rx
NA
static int i3(ui8_t *bytes) { // 24bit signed int int val = 0, val24 = 0; val = bytes[0] | (bytes[1]<<8) | (bytes[2]<<16); val24 = val & 0xFFFFFF; if (val24 & 0x800000) val24 = val24 - 0x1000000; return val24; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40163E", "function_addr": 4199998, "binary_name": "068e8c840d638c2eaa565d359b5c2b1386f2bbb2f371dad9eb4b78e0e5da3ef1.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_8], 0"], [4, "mov [rbp+var_4], 0"], [5, "mov rax, [rbp+var_18]"], [6, "movzx eax, byte ptr [rax]"], [7, "movzx edx, al"], [8, "mov rax, [rbp+var_18]"], [9, "add rax, 1"], [10, "movzx eax, byte ptr [rax]"], [11, "movzx eax, al"], [12, "shl eax, 8"], [13, "or edx, eax"], [14, "mov rax, [rbp+var_18]"], [15, "add rax, 2"], [16, "movzx eax, byte ptr [rax]"], [17, "movzx eax, al"], [18, "shl eax, 10h"], [19, "or eax, edx"], [20, "mov [rbp+var_8], eax"], [21, "mov eax, [rbp+var_8]"], [22, "and eax, 0FFFFFFh"], [23, "mov [rbp+var_4], eax"], [24, "mov eax, [rbp+var_4]"], [25, "and eax, 800000h"], [26, "test eax, eax"], [27, "jz short loc_4016A5"], [28, "sub [rbp+var_4], 1000000h"], [29, "mov eax, [rbp+var_4]"], [30, "pop rbp"], [31, "retn"]], "data_dep": [[5, 2], [6, 5], [7, 6], [8, 2], [9, 8], [10, 9], [11, 10], [12, 11], [13, 7], [13, 12], [14, 2], [15, 14], [16, 15], [17, 16], [18, 17], [19, 18], [19, 13], [20, 19], [21, 20], [22, 21], [23, 22], [24, 23], [25, 24], [26, 25], [27, 26], [28, 23], [29, 23], [29, 28], [30, 0], [31, 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/068e8c840d638c2eaa565d359b5c2b1386f2bbb2f371dad9eb4b78e0e5da3ef1_068e8c840d638c2eaa565d359b5c2b1386f2bbb2f371dad9eb4b78e0e5da3ef1.jsonl.gz", "strip_func_name": "sub_40163E", "query": "\n\n\n__int64 __fastcall sub_40163E(unsigned __int16 *a1)\n{\nint v2; // [rsp+10h] [rbp-8h]\nunsigned int v3; // [rsp+14h] [rbp-4h]\n\nv2 = *a1 | (*((unsigned __int8 *)a1 + 2) << 16);\nv3 = v2 & 0xFFFFFF;\nif ( (v2 & 0x800000) != 0 )\nv3 -= 0x1000000;\nreturn v3;\n}\n\n\n\nQ:[a1,v2,v3,sub_40163E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'bytes', 'v2': 'val', 'v3': 'val24', 'sub_40163E': 'i3'}"}
UG_ButtonSetStyle
3cfddacdd4e21b0e6e6d59f61143cf49a8a22ed0921b7e88571a2f2e8101b107
digitalbitbox
bitbox02-firmware
NA
UG_RESULT UG_ButtonSetStyle( UG_WINDOW* wnd, UG_U8 id, UG_U8 style ) { UG_OBJECT* obj=NULL; UG_BUTTON* btn=NULL; obj = _UG_SearchObject( wnd, OBJ_TYPE_BUTTON, id ); if ( obj == NULL ) return UG_RESULT_FAIL; btn = (UG_BUTTON*)(obj->data); /* Select color scheme */ btn->style &= ~(BTN_STYLE_USE_ALTERNATE_COLORS | BTN_STYLE_TOGGLE_COLORS | BTN_STYLE_NO_BORDERS | BTN_STYLE_NO_FILL); btn->state |= BTN_STATE_ALWAYS_REDRAW; if ( style & BTN_STYLE_NO_BORDERS ) { btn->style |= BTN_STYLE_NO_BORDERS; } if ( style & BTN_STYLE_NO_FILL ) { btn->style |= BTN_STYLE_NO_FILL; } if ( style & BTN_STYLE_TOGGLE_COLORS ) { btn->style |= BTN_STYLE_TOGGLE_COLORS; } else if ( style & BTN_STYLE_USE_ALTERNATE_COLORS ) { btn->style |= BTN_STYLE_USE_ALTERNATE_COLORS; } else { btn->state &= ~BTN_STATE_ALWAYS_REDRAW; } /* 3D or 2D */ if ( style & BTN_STYLE_3D ) { btn->style |= BTN_STYLE_3D; } else { btn->style &= ~BTN_STYLE_3D; } obj->state |= OBJ_STATE_UPDATE | OBJ_STATE_REDRAW; return UG_RESULT_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40728E", "function_addr": 4223630, "binary_name": "3cfddacdd4e21b0e6e6d59f61143cf49a8a22ed0921b7e88571a2f2e8101b107.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov ecx, esi"], [5, "mov eax, edx"], [6, "mov edx, ecx"], [7, "mov [rbp+var_1C], dl"], [8, "mov [rbp+var_20], al"], [9, "mov [rbp+var_8], 0"], [10, "mov [rbp+var_10], 0"], [11, "movzx edx, [rbp+var_1C]"], [12, "mov rax, [rbp+var_18]"], [13, "mov esi, 1"], [14, "mov rdi, rax"], [15, "call sub_404687"], [16, "mov [rbp+var_8], rax"], [17, "cmp [rbp+var_8], 0"], [18, "jnz short loc_4072E0"], [19, "mov eax, 0FFFFFFFFh"], [20, "jmp locret_4073F0"], [21, "mov rax, [rbp+var_8]"], [22, "mov rax, [rax+28h]"], [23, "mov [rbp+var_10], rax"], [24, "mov rax, [rbp+var_10]"], [25, "movzx eax, byte ptr [rax+1]"], [26, "and eax, 0FFFFFFE1h"], [27, "mov edx, eax"], [28, "mov rax, [rbp+var_10]"], [29, "mov [rax+1], dl"], [30, "mov rax, [rbp+var_10]"], [31, "movzx eax, byte ptr [rax]"], [32, "or eax, 2"], [33, "mov edx, eax"], [34, "mov rax, [rbp+var_10]"], [35, "mov [rax], dl"], [36, "movzx eax, [rbp+var_20]"], [37, "and eax, 8"], [38, "test eax, eax"], [39, "jz short loc_407331"], [40, "mov rax, [rbp+var_10]"], [41, "movzx eax, byte ptr [rax+1]"], [42, "or eax, 8"], [43, "mov edx, eax"], [44, "mov rax, [rbp+var_10]"], [45, "mov [rax+1], dl"], [46, "movzx eax, [rbp+var_20]"], [47, "and eax, 10h"], [48, "test eax, eax"], [49, "jz short loc_407350"], [50, "mov rax, [rbp+var_10]"], [51, "movzx eax, byte ptr [rax+1]"], [52, "or eax, 10h"], [53, "mov edx, eax"], [54, "mov rax, [rbp+var_10]"], [55, "mov [rax+1], dl"], [56, "movzx eax, [rbp+var_20]"], [57, "and eax, 2"], [58, "test eax, eax"], [59, "jz short loc_407371"], [60, "mov rax, [rbp+var_10]"], [61, "movzx eax, byte ptr [rax+1]"], [62, "or eax, 2"], [63, "mov edx, eax"], [64, "mov rax, [rbp+var_10]"], [65, "mov [rax+1], dl"], [66, "jmp short loc_4073A4"], [67, "movzx eax, [rbp+var_20]"], [68, "and eax, 4"], [69, "test eax, eax"], [70, "jz short loc_407392"], [71, "mov rax, [rbp+var_10]"], [72, "movzx eax, byte ptr [rax+1]"], [73, "or eax, 4"], [74, "mov edx, eax"], [75, "mov rax, [rbp+var_10]"], [76, "mov [rax+1], dl"], [77, "jmp short loc_4073A4"], [78, "mov rax, [rbp+var_10]"], [79, "movzx eax, byte ptr [rax]"], [80, "and eax, 0FFFFFFFDh"], [81, "mov edx, eax"], [82, "mov rax, [rbp+var_10]"], [83, "mov [rax], dl"], [84, "movzx eax, [rbp+var_20]"], [85, "and eax, 1"], [86, "test eax, eax"], [87, "jz short loc_4073C5"], [88, "mov rax, [rbp+var_10]"], [89, "movzx eax, byte ptr [rax+1]"], [90, "or eax, 1"], [91, "mov edx, eax"], [92, "mov rax, [rbp+var_10]"], [93, "mov [rax+1], dl"], [94, "jmp short loc_4073D9"], [95, "mov rax, [rbp+var_10]"], [96, "movzx eax, byte ptr [rax+1]"], [97, "and eax, 0FFFFFFFEh"], [98, "mov edx, eax"], [99, "mov rax, [rbp+var_10]"], [100, "mov [rax+1], dl"], [101, "mov rax, [rbp+var_8]"], [102, "movzx eax, byte ptr [rax]"], [103, "or eax, 60h"], [104, "mov edx, eax"], [105, "mov rax, [rbp+var_8]"], [106, "mov [rax], dl"], [107, "mov eax, 0"], [108, "leave"], [109, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 5], [11, 7], [12, 3], [14, 12], [16, 15], [17, 16], [18, 17], [21, 16], [22, 21], [23, 22], [24, 23], [25, 24], [26, 25], [27, 26], [28, 23], [29, 27], [29, 28], [30, 23], [31, 29], [31, 30], [32, 31], [33, 32], [34, 23], [35, 33], [35, 34], [36, 8], [37, 36], [38, 37], [39, 38], [40, 23], [41, 40], [41, 35], [41, 45], [41, 29], [42, 41], [43, 42], [44, 23], [45, 43], [45, 44], [46, 8], [47, 46], [48, 47], [49, 48], [50, 23], [51, 29], [51, 50], [51, 45], [51, 35], [51, 55], [52, 51], [53, 52], [54, 23], [55, 54], [55, 53], [56, 8], [57, 56], [58, 57], [59, 58], [60, 23], [61, 45], [61, 29], [61, 35], [61, 65], [61, 60], [61, 55], [62, 61], [63, 62], [64, 23], [65, 63], [65, 64], [67, 8], [68, 67], [69, 68], [70, 69], [71, 23], [72, 29], [72, 45], [72, 35], [72, 55], [72, 76], [72, 71], [73, 72], [74, 73], [75, 23], [76, 74], [76, 75], [78, 23], [79, 35], [79, 83], [79, 78], [79, 55], [79, 45], [79, 29], [80, 79], [81, 80], [82, 23], [83, 82], [83, 81], [84, 8], [85, 84], [86, 85], [87, 86], [88, 23], [89, 45], [89, 29], [89, 93], [89, 65], [89, 88], [89, 35], [89, 83], [89, 76], [89, 55], [90, 89], [91, 90], [92, 23], [93, 92], [93, 91], [95, 23], [96, 95], [96, 35], [96, 83], [96, 76], [96, 55], [96, 29], [96, 45], [96, 100], [96, 65], [97, 96], [98, 97], [99, 23], [100, 98], [100, 99], [101, 16], [102, 100], [102, 29], [102, 93], [102, 45], [102, 65], [102, 106], [102, 35], [102, 83], [102, 101], [102, 55], [102, 76], [103, 102], [104, 103], [105, 16], [106, 104], [106, 105], [109, 19], [109, 107]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3cfddacdd4e21b0e6e6d59f61143cf49a8a22ed0921b7e88571a2f2e8101b107_3cfddacdd4e21b0e6e6d59f61143cf49a8a22ed0921b7e88571a2f2e8101b107.jsonl.gz", "strip_func_name": "sub_40728E", "query": "\n\n\n__int64 __fastcall sub_40728E(__int64 a1, char a2, char a3)\n{\n_BYTE *v5; // [rsp+10h] [rbp-10h]\n__int64 v6; // [rsp+18h] [rbp-8h]\n\nv6 = sub_404687(a1, 1, a2);\nif ( !v6 )\nreturn 0xFFFFFFFFLL;\nv5 = *(_BYTE **)(v6 + 40);\nv5[1] &= 0xE1u;\n*v5 |= 2u;\nif ( (a3 & 8) != 0 )\nv5[1] |= 8u;\nif ( (a3 & 0x10) != 0 )\nv5[1] |= 0x10u;\nif ( (a3 & 2) != 0 )\n{\nv5[1] |= 2u;\n}\nelse if ( (a3 & 4) != 0 )\n{\nv5[1] |= 4u;\n}\nelse\n{\n*v5 &= 0xFDu;\n}\nif ( (a3 & 1) != 0 )\nv5[1] |= 1u;\nelse\nv5[1] &= 0xFEu;\n*(_BYTE *)v6 |= 0x60u;\nreturn 0LL;\n}\n\n\n\nQ:[a3,a1,a2,v5,v6,sub_40728E,sub_404687,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'style', 'a1': 'wnd', 'a2': 'id', 'v5': 'btn', 'v6': 'obj', 'sub_40728E': 'UG_ButtonSetStyle', 'sub_404687': '_UG_SearchObject'}"}
pr_out_port_rate_handle_start
835eee4c756dd6569182a316e0798460284e9d6978289a063a1d8a567f287ccf
multipath-tcp
iproute-mptcp
NA
static void pr_out_port_rate_handle_start(struct dl *dl, struct nlattr **tb, bool try_nice) { const char *bus_name; const char *dev_name; const char *node_name; static char buf[64]; bus_name = mnl_attr_get_str(tb[DEVLINK_ATTR_BUS_NAME]); dev_name = mnl_attr_get_str(tb[DEVLINK_ATTR_DEV_NAME]); node_name = mnl_attr_get_str(tb[DEVLINK_ATTR_RATE_NODE_NAME]); sprintf(buf, "%s/%s/%s", bus_name, dev_name, node_name); if (dl->json_output) open_json_object(buf); else pr_out("%s:", buf); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40E047", "function_addr": 4251719, "binary_name": "835eee4c756dd6569182a316e0798460284e9d6978289a063a1d8a567f287ccf.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 eax, edx"], [6, "mov [rbp+var_34], al"], [7, "mov rax, [rbp+var_30]"], [8, "add rax, 8"], [9, "mov rax, [rax]"], [10, "mov rdi, rax"], [11, "call _mnl_attr_get_str"], [12, "mov [rbp+var_8], rax"], [13, "mov rax, [rbp+var_30]"], [14, "add rax, 10h"], [15, "mov rax, [rax]"], [16, "mov rdi, rax"], [17, "call _mnl_attr_get_str"], [18, "mov [rbp+var_10], rax"], [19, "mov rax, [rbp+var_30]"], [20, "add rax, 540h"], [21, "mov rax, [rax]"], [22, "mov rdi, rax"], [23, "call _mnl_attr_get_str"], [24, "mov [rbp+var_18], rax"], [25, "mov rcx, [rbp+var_18]"], [26, "mov rdx, [rbp+var_10]"], [27, "mov rax, [rbp+var_8]"], [28, "mov r8, rcx"], [29, "mov rcx, rdx"], [30, "mov rdx, rax"], [31, "mov esi, offset aSSS"], [32, "mov edi, offset byte_434880"], [33, "mov eax, 0"], [34, "call _sprintf"], [35, "mov rax, [rbp+var_28]"], [36, "movzx eax, byte ptr [rax+190h]"], [37, "test al, al"], [38, "jz short loc_40E0E7"], [39, "mov edi, offset byte_434880"], [40, "call sub_41F39D"], [41, "jmp short loc_40E0FB"], [42, "mov esi, offset byte_434880"], [43, "mov edi, offset aS_5"], [44, "mov eax, 0"], [45, "call sub_403DC9"], [46, "nop"], [47, "leave"], [48, "retn"]], "data_dep": [[6, 5], [7, 4], [8, 7], [9, 8], [10, 9], [12, 11], [13, 4], [14, 13], [15, 14], [16, 15], [18, 17], [19, 4], [20, 19], [21, 20], [22, 21], [24, 23], [25, 24], [26, 18], [27, 12], [28, 25], [29, 26], [30, 27], [35, 3], [36, 35], [37, 36], [38, 37], [48, 45], [48, 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/835eee4c756dd6569182a316e0798460284e9d6978289a063a1d8a567f287ccf_835eee4c756dd6569182a316e0798460284e9d6978289a063a1d8a567f287ccf.jsonl.gz", "strip_func_name": "sub_40E047", "query": "\n\n\nint __fastcall sub_40E047(__int64 a1)\n{\n__int64 v1; // rdx\n__int64 v2; // rcx\n__int64 v3; // r8\n__int64 v4; // r9\nint result; // eax\nconst char *v6; // [rsp+28h] [rbp-18h]\nconst char *v7; // [rsp+30h] [rbp-10h]\nconst char *v8; // [rsp+38h] [rbp-8h]\n\nv8 = (const char *)mnl_attr_get_str();\nv7 = (const char *)mnl_attr_get_str();\nv6 = (const char *)mnl_attr_get_str();\nsprintf(byte_434880, \"%s/%s/%s\", v8, v7, v6);\nif ( *(_BYTE *)(a1 + 400) )\nresult = sub_41F39D(byte_434880);\nelse\nresult = sub_403DC9(\"%s:\", (__int64)byte_434880, v1, v2, v3, v4);\nreturn result;\n}\n\n\n\nQ:[a1,v1,v6,v7,v8,sub_40E047,sub_41F39D,sub_403DC9,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'dl_0', 'v1': 'try_nice', 'v6': 'node_name', 'v7': 'dev_name', 'v8': 'bus_name', 'sub_40E047': 'pr_out_port_rate_handle_start', 'sub_41F39D': 'open_json_object', 'sub_403DC9': 'pr_out'}"}
printSymbolTable
9fb152280bc296402481effb363baf7e69e326337ee0cc1c947861f1826f4953
open-simh
simtools
NA
void printSymbolTable() { int ix; int symbol_lines; SYM_T *sym; char mark; symbol_lines = 0; for (ix = 0, sym = symtab; ix < symbol_top; ix++, sym++) { if (M_FIXED(sym->type) || M_PSEUDO(sym->type) || M_MACRO(sym->type) || M_EPSEUDO(sym->type)) continue; if (symbol_lines == 0) { topOfForm( list_title, s_symtable ); symbol_lines = LIST_LINES_PER_PAGE; } switch( sym->type & ( DEFINED | REDEFINED )) { case UNDEFINED: mark = '?'; break; case REDEFINED: mark = '#'; break; default: mark = ' '; break; } fprintf( listfile, "%c%-6.6s %6.6o\n", mark, sym->name, sym->val ); symbol_lines--; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404334", "function_addr": 4211508, "binary_name": "9fb152280bc296402481effb363baf7e69e326337ee0cc1c947861f1826f4953.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], 0"], [4, "mov [rbp+var_4], 0"], [5, "mov rax, cs:qword_409D80"], [6, "mov [rbp+var_10], rax"], [7, "jmp loc_404425"], [8, "mov rax, [rbp+var_10]"], [9, "mov eax, [rax]"], [10, "and eax, 2"], [11, "test eax, eax"], [12, "jnz loc_40441B"], [13, "mov rax, [rbp+var_10]"], [14, "mov eax, [rax]"], [15, "and eax, 43h"], [16, "cmp eax, 43h "], [17, "jz loc_40441B"], [18, "mov rax, [rbp+var_10]"], [19, "mov eax, [rax]"], [20, "and eax, 101h"], [21, "cmp eax, 101h"], [22, "jz loc_40441B"], [23, "mov rax, [rbp+var_10]"], [24, "mov eax, [rax]"], [25, "and eax, 83h"], [26, "cmp eax, 83h"], [27, "jz short loc_40441B"], [28, "cmp [rbp+var_8], 0"], [29, "jnz short loc_4043C1"], [30, "mov esi, offset aSymbolTable"], [31, "mov edi, offset byte_40C320"], [32, "call sub_4047E0"], [33, "mov [rbp+var_8], 3Ch "], [34, "mov rax, [rbp+var_10]"], [35, "mov eax, [rax]"], [36, "and eax, 11h"], [37, "test eax, eax"], [38, "jz short loc_4043D5"], [39, "cmp eax, 11h"], [40, "jz short loc_4043DB"], [41, "jmp short loc_4043E1"], [42, "mov [rbp+var_11], 3Fh "], [43, "jmp short loc_4043E6"], [44, "mov [rbp+var_11], 23h "], [45, "jmp short loc_4043E6"], [46, "mov [rbp+var_11], 20h "], [47, "nop"], [48, "mov rax, [rbp+var_10]"], [49, "mov esi, [rax+0Ch]"], [50, "mov rax, [rbp+var_10]"], [51, "lea rcx, [rax+4]"], [52, "movsx edx, [rbp+var_11]"], [53, "mov rax, cs:stream"], [54, "mov r8d, esi"], [55, "mov esi, offset aC66s66o"], [56, "mov rdi, rax"], [57, "mov eax, 0"], [58, "call _fprintf"], [59, "sub [rbp+var_8], 1"], [60, "jmp short loc_40441C"], [61, "nop"], [62, "add [rbp+var_4], 1"], [63, "add [rbp+var_10], 18h"], [64, "mov eax, cs:dword_409D88"], [65, "cmp [rbp+var_4], eax"], [66, "jl loc_40435A"], [67, "nop"], [68, "nop"], [69, "leave"], [70, "retn"]], "data_dep": [[6, 5], [8, 6], [8, 63], [9, 8], [10, 9], [11, 10], [12, 11], [13, 63], [13, 6], [14, 13], [15, 14], [16, 15], [17, 16], [18, 6], [18, 63], [19, 18], [20, 19], [21, 20], [22, 21], [23, 6], [23, 63], [24, 23], [25, 24], [26, 25], [27, 26], [28, 3], [28, 59], [29, 28], [34, 6], [34, 63], [35, 34], [36, 35], [37, 36], [38, 37], [39, 37], [40, 39], [48, 63], [48, 6], [49, 48], [50, 6], [50, 63], [51, 50], [51, 51], [52, 46], [52, 42], [52, 44], [54, 49], [56, 53], [59, 3], [59, 33], [59, 59], [62, 4], [62, 62], [63, 6], [63, 63], [65, 64], [65, 4], [65, 62], [66, 65], [70, 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/9fb152280bc296402481effb363baf7e69e326337ee0cc1c947861f1826f4953_9fb152280bc296402481effb363baf7e69e326337ee0cc1c947861f1826f4953.jsonl.gz", "strip_func_name": "sub_404334", "query": "\n\n\n__int64 sub_404334()\n{\nint v0; // eax\n__int64 result; // rax\nchar v2; // [rsp+Fh] [rbp-11h]\n__int64 i; // [rsp+10h] [rbp-10h]\nint v4; // [rsp+18h] [rbp-8h]\nint v5; // [rsp+1Ch] [rbp-4h]\n\nv4 = 0;\nv5 = 0;\nfor ( i = qword_409D80; ; i += 24LL )\n{\nresult = (unsigned int)dword_409D88;\nif ( v5 >= dword_409D88 )\nbreak;\nif ( (*(_DWORD *)i & 2) == 0\n&& (*(_DWORD *)i & 0x43) != 67\n&& (*(_DWORD *)i & 0x101) != 257\n&& (*(_DWORD *)i & 0x83) != 131 )\n{\nif ( !v4 )\n{\nsub_4047E0(&byte_40C320, aSymbolTable);\nv4 = 60;\n}\nv0 = *(_DWORD *)i & 0x11;\nif ( v0 )\n{\nif ( v0 == 17 )\nv2 = 35;\nelse\nv2 = 32;\n}\nelse\n{\nv2 = 63;\n}\nfprintf(stream, \"%c%-6.6s %6.6o\\n\", (unsigned int)v2, (const char *)(i + 4), *(unsigned int *)(i + 12));\n--v4;\n}\n++v5;\n}\nreturn result;\n}\n\n\n\nQ:[v2,i,v4,v5,sub_404334,sub_4047E0,]\nAssistant: ", "hints": "[]", "response": "{'v2': 'mark', 'i': 'sym', 'v4': 'symbol_lines', 'v5': 'ix', 'sub_404334': 'printSymbolTable', 'sub_4047E0': 'topOfForm'}"}
is_clx_n_platform
f3289d91472f8ba82301152b86372819bacdda97fbdc2768a4880549cb47a846
SUSE
kernel
NA
int is_clx_n_platform(void) { if (cpu_model == 0x55) if (cpu_stepping == 0x6 || cpu_stepping == 0x7) return 1; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4027D7", "function_addr": 4204503, "binary_name": "f3289d91472f8ba82301152b86372819bacdda97fbdc2768a4880549cb47a846.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, cs:dword_41DAE8"], [3, "cmp eax, 55h "], [4, "jnz short loc_402803"], [5, "mov eax, cs:dword_41DAEC"], [6, "cmp eax, 6"], [7, "jz short loc_4027FC"], [8, "mov eax, cs:dword_41DAEC"], [9, "cmp eax, 7"], [10, "jnz short loc_402803"], [11, "mov eax, 1"], [12, "jmp short loc_402808"], [13, "mov eax, 0"], [14, "pop rbp"], [15, "retn"]], "data_dep": [[3, 2], [4, 3], [6, 5], [7, 6], [9, 8], [10, 9], [14, 0], [15, 11], [15, 13]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f3289d91472f8ba82301152b86372819bacdda97fbdc2768a4880549cb47a846_f3289d91472f8ba82301152b86372819bacdda97fbdc2768a4880549cb47a846.jsonl.gz", "strip_func_name": "sub_4027D7", "query": "\n\n\n_BOOL8 sub_4027D7()\n{\nreturn dword_41DAE8 == 85 && (dword_41DAEC == 6 || dword_41DAEC == 7);\n}\n\n\n\nQ:[sub_4027D7,]\nAssistant: ", "hints": "[]", "response": "{'sub_4027D7': 'is_clx_n_platform'}"}