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
|
---|---|---|---|---|---|---|---|---|
sha3_update | 3cd855ed588f3d1e72915a590ff85ed31a6e0ae9fa454756145e114e2383fc0c | mjosaarinen | tiny_sha3 | NA | int sha3_update(sha3_ctx_t *c, const void *data, size_t len)
{
size_t i;
int j;
j = c->pt;
for (i = 0; i < len; i++) {
c->st.b[j++] ^= ((const uint8_t *) data)[i];
if (j >= c->rsiz) {
sha3_keccakf(c->st.q);
j = 0;
}
}
c->pt = j;
return 1;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40188F", "function_addr": 4200591, "binary_name": "3cd855ed588f3d1e72915a590ff85ed31a6e0ae9fa454756145e114e2383fc0c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 28h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov rax, [rbp+var_18]"], [7, "mov eax, [rax+0C8h]"], [8, "mov [rbp+var_C], eax"], [9, "mov [rbp+var_8], 0"], [10, "jmp short loc_40190E"], [11, "mov eax, [rbp+var_C]"], [12, "lea edx, [rax+1]"], [13, "mov [rbp+var_C], edx"], [14, "mov rcx, [rbp+var_18]"], [15, "movsxd rdx, eax"], [16, "movzx ecx, byte ptr [rcx+rdx]"], [17, "mov rsi, [rbp+var_20]"], [18, "mov rdx, [rbp+var_8]"], [19, "add rdx, rsi"], [20, "movzx edx, byte ptr [rdx]"], [21, "xor ecx, edx"], [22, "mov rdx, [rbp+var_18]"], [23, "cdqe"], [24, "mov [rdx+rax], cl"], [25, "mov rax, [rbp+var_18]"], [26, "mov eax, [rax+0CCh]"], [27, "cmp [rbp+var_C], eax"], [28, "jl short loc_401909"], [29, "mov rax, [rbp+var_18]"], [30, "mov rdi, rax"], [31, "call sub_401172"], [32, "mov [rbp+var_C], 0"], [33, "add [rbp+var_8], 1"], [34, "mov rax, [rbp+var_8]"], [35, "cmp rax, [rbp+var_28]"], [36, "jb short loc_4018BA"], [37, "mov rax, [rbp+var_18]"], [38, "mov edx, [rbp+var_C]"], [39, "mov [rax+0C8h], edx"], [40, "mov eax, 1"], [41, "leave"], [42, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [11, 8], [11, 32], [11, 13], [12, 22], [12, 24], [12, 11], [13, 12], [14, 3], [15, 11], [16, 24], [16, 14], [17, 4], [18, 9], [18, 33], [19, 18], [19, 17], [20, 19], [20, 24], [21, 16], [21, 20], [22, 3], [24, 11], [24, 21], [25, 3], [26, 24], [26, 25], [27, 13], [27, 26], [28, 27], [29, 3], [30, 29], [33, 9], [33, 33], [34, 9], [34, 33], [35, 5], [35, 34], [36, 35], [37, 3], [38, 32], [38, 13], [38, 8], [39, 38], [39, 37], [42, 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/3cd855ed588f3d1e72915a590ff85ed31a6e0ae9fa454756145e114e2383fc0c_3cd855ed588f3d1e72915a590ff85ed31a6e0ae9fa454756145e114e2383fc0c.jsonl.gz", "strip_func_name": "sub_40188F", "query": "\n\n\n__int64 __fastcall sub_40188F(__int64 a1, __int64 a2, unsigned __int64 a3)\n{\nint v3; // eax\nint v6; // [rsp+1Ch] [rbp-Ch]\nunsigned __int64 i; // [rsp+20h] [rbp-8h]\n\nv6 = *(_DWORD *)(a1 + 200);\nfor ( i = 0LL; i < a3; ++i )\n{\nv3 = v6++;\n*(_BYTE *)(a1 + v3) ^= *(_BYTE *)(a2 + i);\nif ( v6 >= *(_DWORD *)(a1 + 204) )\n{\nsub_401172((_QWORD *)a1);\nv6 = 0;\n}\n}\n*(_DWORD *)(a1 + 200) = v6;\nreturn 1LL;\n}\n\n\n\nQ:[a3,a1,a2,sub_40188F,sub_401172,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'len', 'a1': 'c', 'a2': 'data', 'sub_40188F': 'sha3_update', 'sub_401172': 'sha3_keccakf'}"} |
|
unicast_negotiation_post_recv | 7af1f850afc1c3e89c40b08da14a93ca4e7a54739e2c3e87f7b06a31ef70aec1 | nxp-archive | openil_linuxptp | NA | static int unicast_negotiation_post_recv(struct tlv_extra *extra)
{
struct request_unicast_xmit_tlv *request;
struct ack_cancel_unicast_xmit_tlv *ack;
struct cancel_unicast_xmit_tlv *cancel;
struct grant_unicast_xmit_tlv *grant;
struct TLV *tlv = extra->tlv;
switch (tlv->type) {
case TLV_REQUEST_UNICAST_TRANSMISSION:
if (TLV_LENGTH_INVALID(tlv, request_unicast_xmit_tlv)) {
return -EBADMSG;
}
request = (struct request_unicast_xmit_tlv *) tlv;
if (!unicast_message_type_valid(request->message_type)) {
return -EBADMSG;
}
NTOHL(request->durationField);
break;
case TLV_GRANT_UNICAST_TRANSMISSION:
if (TLV_LENGTH_INVALID(tlv, grant_unicast_xmit_tlv)) {
return -EBADMSG;
}
grant = (struct grant_unicast_xmit_tlv *) tlv;
if (!unicast_message_type_valid(grant->message_type)) {
return -EBADMSG;
}
NTOHL(grant->durationField);
break;
case TLV_CANCEL_UNICAST_TRANSMISSION:
if (TLV_LENGTH_INVALID(tlv, cancel_unicast_xmit_tlv)) {
return -EBADMSG;
}
cancel = (struct cancel_unicast_xmit_tlv *) tlv;
if (!unicast_message_type_valid(cancel->message_type_flags)) {
return -EBADMSG;
}
break;
case TLV_ACKNOWLEDGE_CANCEL_UNICAST_TRANSMISSION:
if (TLV_LENGTH_INVALID(tlv, ack_cancel_unicast_xmit_tlv)) {
return -EBADMSG;
}
ack = (struct ack_cancel_unicast_xmit_tlv *) tlv;
if (!unicast_message_type_valid(ack->message_type_flags)) {
return -EBADMSG;
}
break;
}
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42233A", "function_addr": 4334394, "binary_name": "7af1f850afc1c3e89c40b08da14a93ca4e7a54739e2c3e87f7b06a31ef70aec1.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+10h]"], [6, "mov [rbp+var_8], rax"], [7, "mov rax, [rbp+var_8]"], [8, "movzx eax, word ptr [rax]"], [9, "movzx eax, ax"], [10, "cmp eax, 7"], [11, "jz loc_42247A"], [12, "cmp eax, 7"], [13, "jg loc_4224B8"], [14, "cmp eax, 6"], [15, "jz loc_422440"], [16, "cmp eax, 6"], [17, "jg loc_4224B8"], [18, "cmp eax, 4"], [19, "jz short loc_42238F"], [20, "cmp eax, 5"], [21, "jz short loc_4223E9"], [22, "jmp loc_4224B8"], [23, "mov rax, [rbp+var_8]"], [24, "movzx eax, word ptr [rax+2]"], [25, "cmp ax, 5"], [26, "ja short loc_4223A7"], [27, "mov eax, 0FFFFFFB6h"], [28, "jmp locret_4224BD"], [29, "mov rax, [rbp+var_8]"], [30, "mov [rbp+var_28], rax"], [31, "mov rax, [rbp+var_28]"], [32, "movzx eax, byte ptr [rax+4]"], [33, "movzx eax, al"], [34, "mov edi, eax"], [35, "call sub_4222F5"], [36, "test eax, eax"], [37, "jnz short loc_4223CF"], [38, "mov eax, 0FFFFFFB6h"], [39, "jmp locret_4224BD"], [40, "mov rax, [rbp+var_28]"], [41, "mov eax, [rax+6]"], [42, "mov edi, eax"], [43, "call _ntohl"], [44, "mov rdx, [rbp+var_28]"], [45, "mov [rdx+6], eax"], [46, "jmp loc_4224B8"], [47, "mov rax, [rbp+var_8]"], [48, "movzx eax, word ptr [rax+2]"], [49, "cmp ax, 7"], [50, "ja short loc_422401"], [51, "mov eax, 0FFFFFFB6h"], [52, "jmp locret_4224BD"], [53, "mov rax, [rbp+var_8]"], [54, "mov [rbp+var_20], rax"], [55, "mov rax, [rbp+var_20]"], [56, "movzx eax, byte ptr [rax+4]"], [57, "movzx eax, al"], [58, "mov edi, eax"], [59, "call sub_4222F5"], [60, "test eax, eax"], [61, "jnz short loc_422429"], [62, "mov eax, 0FFFFFFB6h"], [63, "jmp locret_4224BD"], [64, "mov rax, [rbp+var_20]"], [65, "mov eax, [rax+6]"], [66, "mov edi, eax"], [67, "call _ntohl"], [68, "mov rdx, [rbp+var_20]"], [69, "mov [rdx+6], eax"], [70, "jmp short loc_4224B8"], [71, "mov rax, [rbp+var_8]"], [72, "movzx eax, word ptr [rax+2]"], [73, "cmp ax, 1"], [74, "ja short loc_422455"], [75, "mov eax, 0FFFFFFB6h"], [76, "jmp short locret_4224BD"], [77, "mov rax, [rbp+var_8]"], [78, "mov [rbp+var_18], rax"], [79, "mov rax, [rbp+var_18]"], [80, "movzx eax, byte ptr [rax+4]"], [81, "movzx eax, al"], [82, "mov edi, eax"], [83, "call sub_4222F5"], [84, "test eax, eax"], [85, "jnz short loc_4224B4"], [86, "mov eax, 0FFFFFFB6h"], [87, "jmp short locret_4224BD"], [88, "mov rax, [rbp+var_8]"], [89, "movzx eax, word ptr [rax+2]"], [90, "cmp ax, 1"], [91, "ja short loc_42248F"], [92, "mov eax, 0FFFFFFB6h"], [93, "jmp short locret_4224BD"], [94, "mov rax, [rbp+var_8]"], [95, "mov [rbp+var_10], rax"], [96, "mov rax, [rbp+var_10]"], [97, "movzx eax, byte ptr [rax+4]"], [98, "movzx eax, al"], [99, "mov edi, eax"], [100, "call sub_4222F5"], [101, "test eax, eax"], [102, "jnz short loc_4224B7"], [103, "mov eax, 0FFFFFFB6h"], [104, "jmp short locret_4224BD"], [105, "nop"], [106, "jmp short loc_4224B8"], [107, "nop"], [108, "mov eax, 0"], [109, "leave"], [110, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [12, 9], [13, 12], [14, 9], [15, 14], [16, 9], [17, 16], [18, 9], [19, 18], [20, 9], [21, 20], [23, 6], [24, 23], [25, 24], [26, 25], [29, 6], [30, 29], [31, 30], [32, 31], [33, 32], [34, 33], [36, 35], [37, 36], [40, 30], [41, 40], [42, 41], [44, 30], [45, 43], [45, 44], [47, 6], [48, 47], [49, 48], [50, 49], [53, 6], [54, 53], [55, 54], [56, 55], [57, 56], [58, 57], [60, 59], [61, 60], [64, 54], [65, 64], [66, 65], [68, 54], [69, 67], [69, 68], [71, 6], [72, 71], [73, 72], [74, 73], [77, 6], [78, 77], [79, 78], [80, 79], [81, 80], [82, 81], [84, 83], [85, 84], [88, 6], [89, 88], [90, 89], [91, 90], [94, 6], [95, 94], [96, 95], [97, 96], [98, 97], [99, 98], [101, 100], [102, 101], [110, 75], [110, 38], [110, 86], [110, 51], [110, 108], [110, 62], [110, 92], [110, 103], [110, 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/7af1f850afc1c3e89c40b08da14a93ca4e7a54739e2c3e87f7b06a31ef70aec1_7af1f850afc1c3e89c40b08da14a93ca4e7a54739e2c3e87f7b06a31ef70aec1.jsonl.gz", "strip_func_name": "sub_42233A", "query": "\n\n\n__int64 __fastcall sub_42233A(__int64 a1)\n{\nint v1; // eax\nunsigned __int16 *v3; // [rsp+38h] [rbp-8h]\n\nv3 = *(unsigned __int16 **)(a1 + 16);\nv1 = *v3;\nif ( v1 == 7 )\n{\nif ( v3[1] <= 1u )\nreturn 4294967222LL;\nif ( !sub_4222F5(*((_BYTE *)v3 + 4)) )\nreturn 4294967222LL;\n}\nelse if ( *v3 <= 7u )\n{\nswitch ( v1 )\n{\ncase 6:\nif ( v3[1] <= 1u )\nreturn 4294967222LL;\nif ( !sub_4222F5(*((_BYTE *)v3 + 4)) )\nreturn 4294967222LL;\nreturn 0LL;\ncase 4:\nif ( v3[1] <= 5u )\nreturn 4294967222LL;\nif ( !sub_4222F5(*((_BYTE *)v3 + 4)) )\nreturn 4294967222LL;\nbreak;\ncase 5:\nif ( v3[1] <= 7u )\nreturn 4294967222LL;\nif ( !sub_4222F5(*((_BYTE *)v3 + 4)) )\nreturn 4294967222LL;\nbreak;\ndefault:\nreturn 0LL;\n}\n*(_DWORD *)(v3 + 3) = ntohl(*(_DWORD *)(v3 + 3));\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,v3,sub_42233A,sub_4222F5,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'extra', 'v3': 'tlv', 'sub_42233A': 'unicast_negotiation_post_recv', 'sub_4222F5': 'unicast_message_type_valid'}"} |
|
testHEX16sWithinDeltaWhenThereAreDifferenceOutsideOf16Bits | 08f75e8cea2799daf4ab70b8df261c534a663dff963410741a43aabb6fbc7ad6 | LeeLulin | esp-homekit-direct | NA | void testHEX16sWithinDeltaWhenThereAreDifferenceOutsideOf16Bits(void)
{
TEST_ASSERT_HEX16_WITHIN(5, 0x54321, 0x44321);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40CA8E", "function_addr": 4246158, "binary_name": "08f75e8cea2799daf4ab70b8df261c534a663dff963410741a43aabb6fbc7ad6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:qword_43F150"], [3, "add rax, 1"], [4, "mov cs:qword_43F150, rax"], [5, "mov r9d, 42h "], [6, "mov r8d, 3F8h"], [7, "mov ecx, 0"], [8, "mov edx, 4321h"], [9, "mov esi, 4321h"], [10, "mov edi, 5"], [11, "call sub_404323"], [12, "mov rax, cs:qword_43F158"], [13, "add rax, 1"], [14, "mov cs:qword_43F158, rax"], [15, "nop"], [16, "pop rbp"], [17, "retn"]], "data_dep": [[3, 2], [4, 3], [13, 12], [14, 13], [16, 0], [17, 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/08f75e8cea2799daf4ab70b8df261c534a663dff963410741a43aabb6fbc7ad6_08f75e8cea2799daf4ab70b8df261c534a663dff963410741a43aabb6fbc7ad6.jsonl.gz", "strip_func_name": "sub_40CA8E", "query": "\n\n\n__int64 sub_40CA8E()\n{\n++qword_43F150;\nsub_404323(5uLL, 17185LL, 17185LL, 0LL, 1016LL, 66);\nreturn ++qword_43F158;\n}\n\n\n\nQ:[sub_40CA8E,sub_404323,]\nAssistant: ", "hints": "[]", "response": "{'sub_40CA8E': 'testHEX16sWithinDeltaWhenThereAreDifferenceOutsideOf16Bits', 'sub_404323': 'UnityAssertNumbersWithin'}"} |
|
set_action | bab98b302fe9e88e45c2a4cebb95076641d2fa8818c04a3ef58c0ce5574b4de3 | aerospike | act | NA | static void
set_action(int sig_num, action_t act)
{
struct sigaction sa;
memset(&sa, 0, sizeof(sa));
sa.sa_sigaction = act;
sigemptyset(&sa.sa_mask);
// SA_SIGINFO prefers sa_sigaction over sa_handler.
sa.sa_flags = SA_RESTART | SA_SIGINFO;
if (sigaction(sig_num, &sa, NULL) < 0) {
printf("ERROR: could not register signal handler for %d\n", sig_num);
fflush(stdout);
_exit(-1);
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404150", "function_addr": 4211024, "binary_name": "bab98b302fe9e88e45c2a4cebb95076641d2fa8818c04a3ef58c0ce5574b4de3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0B0h"], [3, "mov [rbp+sig], edi"], [4, "mov [rbp+var_B0], rsi"], [5, "lea rax, [rbp+s]"], [6, "mov edx, 98h"], [7, "mov esi, 0"], [8, "mov rdi, rax"], [9, "call _memset"], [10, "mov rax, [rbp+var_B0]"], [11, "mov [rbp+s], rax"], [12, "lea rax, [rbp+s]"], [13, "add rax, 8"], [14, "mov rdi, rax"], [15, "call _sigemptyset"], [16, "mov [rbp+var_18], 10000004h"], [17, "lea rcx, [rbp+s]"], [18, "mov eax, [rbp+sig]"], [19, "mov edx, 0"], [20, "mov rsi, rcx"], [21, "mov edi, eax"], [22, "call _sigaction"], [23, "test eax, eax"], [24, "jns short loc_4041F9"], [25, "mov eax, [rbp+sig]"], [26, "mov esi, eax"], [27, "mov edi, offset aErrorCouldNotR"], [28, "mov eax, 0"], [29, "call _printf"], [30, "mov rax, cs:stdout"], [31, "mov rdi, rax"], [32, "call _fflush"], [33, "mov edi, 0FFFFFFFFh"], [34, "call __exit"], [35, "nop"], [36, "leave"], [37, "retn"]], "data_dep": [[8, 5], [10, 4], [11, 10], [12, 10], [12, 11], [13, 12], [14, 13], [17, 11], [18, 3], [20, 17], [21, 18], [23, 22], [24, 23], [25, 3], [26, 25], [31, 30], [37, 23]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/bab98b302fe9e88e45c2a4cebb95076641d2fa8818c04a3ef58c0ce5574b4de3_bab98b302fe9e88e45c2a4cebb95076641d2fa8818c04a3ef58c0ce5574b4de3.jsonl.gz", "strip_func_name": "sub_404150", "query": "\n\n\nint __fastcall sub_404150(unsigned int a1, void (*a2)(int))\n{\nint result; // eax\nstruct sigaction s; // [rsp+10h] [rbp-A0h] BYREF\n\nmemset(&s, 0, sizeof(s));\ns.sa_handler = a2;\nsigemptyset(&s.sa_mask);\ns.sa_flags = 268435460;\nresult = sigaction(a1, &s, 0LL);\nif ( result < 0 )\n{\nprintf(\"ERROR: could not register signal handler for %d\\n\", a1);\nfflush(stdout);\n_exit(-1);\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,s,sub_404150,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'sig_num', 'a2': 'act', 's': 'sa', 'sub_404150': 'set_action'}"} |
|
calini | 4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487 | nccgroup | proxmark3-amiimicyou | NA | static void
calini(int *resc, model_t **result, const poly_t divisor, int flags, const poly_t xorout, int args, const poly_t *argpolys) {
/* Calculate Init, check it against all the arguments and add to
* results if consistent.
*/
poly_t rcpdiv, rxor, arg, init;
const poly_t *aptr, *iptr;
unsigned long alen, ilen;
if(args < 1) return;
/* find argument of the shortest length */
alen = plen(*(aptr = iptr = argpolys));
for(++iptr; iptr < argpolys + args; ++iptr) {
ilen = plen(*iptr);
if(ilen < alen) {
aptr = iptr; alen = ilen;
}
}
rcpdiv = pclone(divisor);
prcp(&rcpdiv);
/* If the algorithm is reflected, an ordinary CRC requires the
* model's XorOut to be reversed, as XorOut follows the RefOut
* stage. To reverse the CRC calculation we need rxor to be the
* mirror image of the forward XorOut.
*/
rxor = pclone(xorout);
if(~flags & P_REFOUT)
prev(&rxor);
arg = pclone(*aptr);
prev(&arg);
init = pcrc(arg, rcpdiv, rxor, pzero, 0);
pfree(&arg);
pfree(&rxor);
pfree(&rcpdiv);
prev(&init);
/* Submit the model to the results table.
* Could skip the shortest argument but we wish to check our
* calculation.
*/
chkres(resc, result, divisor, init, flags, xorout, args, argpolys);
pfree(&init);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_46A45F", "function_addr": 4629599, "binary_name": "4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 98h"], [4, "mov [rbp+var_78], rdi"], [5, "mov [rbp+var_80], rsi"], [6, "mov [rbp+var_90], rdx"], [7, "mov [rbp+var_88], rcx"], [8, "mov [rbp+var_94], r8d"], [9, "mov [rbp+var_98], r9d"], [10, "cmp [rbp+var_98], 0"], [11, "jle loc_46A684"], [12, "mov rax, [rbp+arg_10]"], [13, "mov [rbp+var_20], rax"], [14, "mov rax, [rbp+var_20]"], [15, "mov [rbp+var_18], rax"], [16, "mov rax, [rbp+var_18]"], [17, "mov rdx, [rax]"], [18, "mov rax, [rax+8]"], [19, "mov rdi, rdx"], [20, "mov rsi, rax"], [21, "call plen"], [22, "mov [rbp+var_28], rax"], [23, "add [rbp+var_20], 10h"], [24, "jmp short loc_46A506"], [25, "mov rax, [rbp+var_20]"], [26, "mov rdx, [rax]"], [27, "mov rax, [rax+8]"], [28, "mov rdi, rdx"], [29, "mov rsi, rax"], [30, "call plen"], [31, "mov [rbp+var_30], rax"], [32, "mov rax, [rbp+var_30]"], [33, "cmp rax, [rbp+var_28]"], [34, "jnb short loc_46A501"], [35, "mov rax, [rbp+var_20]"], [36, "mov [rbp+var_18], rax"], [37, "mov rax, [rbp+var_30]"], [38, "mov [rbp+var_28], rax"], [39, "add [rbp+var_20], 10h"], [40, "mov eax, [rbp+var_98]"], [41, "cdqe"], [42, "shl rax, 4"], [43, "mov rdx, rax"], [44, "mov rax, [rbp+arg_10]"], [45, "add rax, rdx"], [46, "cmp [rbp+var_20], rax"], [47, "jb short loc_46A4CD"], [48, "mov rdx, [rbp+var_90]"], [49, "mov rax, [rbp+var_88]"], [50, "mov rdi, rdx"], [51, "mov rsi, rax"], [52, "call pclone"], [53, "mov [rbp+var_40], rax"], [54, "mov [rbp+var_38], rdx"], [55, "lea rax, [rbp+var_40]"], [56, "mov rdi, rax"], [57, "call prcp"], [58, "mov rdx, [rbp+arg_0]"], [59, "mov rax, [rbp+arg_8]"], [60, "mov rdi, rdx"], [61, "mov rsi, rax"], [62, "call pclone"], [63, "mov [rbp+var_50], rax"], [64, "mov [rbp+var_48], rdx"], [65, "mov eax, [rbp+var_94]"], [66, "and eax, 2"], [67, "test eax, eax"], [68, "jnz short loc_46A583"], [69, "lea rax, [rbp+var_50]"], [70, "mov rdi, rax"], [71, "call prev"], [72, "mov rax, [rbp+var_18]"], [73, "mov rdx, [rax]"], [74, "mov rax, [rax+8]"], [75, "mov rdi, rdx"], [76, "mov rsi, rax"], [77, "call pclone"], [78, "mov [rbp+var_60], rax"], [79, "mov [rbp+var_58], rdx"], [80, "lea rax, [rbp+var_60]"], [81, "mov rdi, rax"], [82, "call prev"], [83, "mov rcx, [rbp+var_50]"], [84, "mov rbx, [rbp+var_48]"], [85, "mov rax, [rbp+var_40]"], [86, "mov rdx, [rbp+var_38]"], [87, "mov rdi, [rbp+var_60]"], [88, "mov rsi, [rbp+var_58]"], [89, "sub rsp, 8"], [90, "push 0"], [91, "push cs:qword_4BE878"], [92, "push cs:qword_4BE870"], [93, "mov r8, rcx"], [94, "mov r9, rbx"], [95, "mov rcx, rdx"], [96, "mov rdx, rax"], [97, "call pcrc"], [98, "add rsp, 20h"], [99, "mov [rbp+var_70], rax"], [100, "mov [rbp+var_68], rdx"], [101, "lea rax, [rbp+var_60]"], [102, "mov rdi, rax"], [103, "call pfree"], [104, "lea rax, [rbp+var_50]"], [105, "mov rdi, rax"], [106, "call pfree"], [107, "lea rax, [rbp+var_40]"], [108, "mov rdi, rax"], [109, "call pfree"], [110, "lea rax, [rbp+var_70]"], [111, "mov rdi, rax"], [112, "call prev"], [113, "mov rcx, [rbp+var_70]"], [114, "mov rbx, [rbp+var_68]"], [115, "mov rax, [rbp+var_90]"], [116, "mov rdx, [rbp+var_88]"], [117, "mov rsi, [rbp+var_80]"], [118, "mov rdi, [rbp+var_78]"], [119, "sub rsp, 8"], [120, "push [rbp+arg_10]"], [121, "mov r8d, [rbp+var_98]"], [122, "push r8"], [123, "push [rbp+arg_8]"], [124, "push [rbp+arg_0]"], [125, "mov r8d, [rbp+var_94]"], [126, "push r8"], [127, "mov r8, rcx"], [128, "mov r9, rbx"], [129, "mov rcx, rdx"], [130, "mov rdx, rax"], [131, "call sub_46A68B"], [132, "add rsp, 30h"], [133, "lea rax, [rbp+var_70]"], [134, "mov rdi, rax"], [135, "call pfree"], [136, "jmp short loc_46A685"], [137, "nop"], [138, "mov rbx, [rbp+var_8]"], [139, "leave"], [140, "retn"]], "data_dep": [[10, 9], [11, 10], [13, 12], [14, 13], [15, 14], [16, 15], [17, 16], [18, 16], [19, 17], [20, 18], [22, 21], [23, 13], [25, 23], [25, 39], [26, 25], [27, 25], [28, 26], [29, 27], [31, 30], [32, 31], [33, 38], [33, 22], [33, 32], [34, 33], [35, 23], [35, 39], [36, 35], [37, 31], [38, 37], [39, 39], [39, 23], [40, 9], [42, 40], [43, 42], [45, 43], [45, 44], [46, 45], [46, 39], [46, 23], [47, 46], [48, 6], [49, 7], [50, 48], [51, 49], [53, 52], [54, 48], [55, 52], [55, 53], [56, 55], [60, 58], [61, 59], [63, 62], [64, 58], [65, 8], [66, 65], [67, 66], [68, 67], [69, 67], [69, 63], [70, 69], [72, 36], [72, 15], [73, 72], [74, 72], [75, 73], [76, 74], [78, 77], [79, 73], [80, 78], [80, 77], [81, 80], [83, 63], [84, 64], [85, 53], [86, 54], [87, 78], [88, 79], [89, 3], [93, 83], [94, 84], [95, 86], [96, 85], [98, 89], [99, 97], [100, 96], [101, 97], [101, 78], [102, 101], [104, 63], [104, 103], [105, 104], [107, 106], [107, 53], [108, 107], [110, 109], [110, 99], [111, 110], [113, 99], [114, 100], [115, 6], [116, 7], [117, 5], [118, 4], [119, 98], [121, 9], [122, 121], [125, 8], [126, 125], [127, 113], [128, 114], [129, 116], [130, 115], [132, 119], [133, 131], [133, 99], [134, 133], [140, 135]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487_4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487.jsonl.gz", "strip_func_name": "sub_46A45F", "query": "\n\n\nvoid __fastcall sub_46A45F(int a1, int a2, __int64 a3, __int64 a4, int a5, int a6, __int64 a7, __int64 a8, _QWORD *a9)\n{\n__int64 v9; // rdx\n__int64 v10; // rdx\n__int64 v11; // rdx\n__int64 v12; // rdx\n__int64 v17; // [rsp+30h] [rbp-70h] BYREF\n__int64 v18; // [rsp+38h] [rbp-68h]\n__int64 v19; // [rsp+40h] [rbp-60h] BYREF\n__int64 v20; // [rsp+48h] [rbp-58h]\n__int64 v21; // [rsp+50h] [rbp-50h] BYREF\n__int64 v22; // [rsp+58h] [rbp-48h]\n__int64 v23; // [rsp+60h] [rbp-40h] BYREF\n__int64 v24; // [rsp+68h] [rbp-38h]\nunsigned __int64 v25; // [rsp+70h] [rbp-30h]\nunsigned __int64 v26; // [rsp+78h] [rbp-28h]\n_QWORD *i; // [rsp+80h] [rbp-20h]\n_QWORD *v28; // [rsp+88h] [rbp-18h]\n\nif ( a6 > 0 )\n{\ni = a9;\nv28 = a9;\nv26 = plen(*a9, a9[1]);\nfor ( i = a9 + 2; i < &a9[2 * a6]; i += 2 )\n{\nv25 = plen(*i, i[1]);\nif ( v25 < v26 )\n{\nv28 = i;\nv26 = v25;\n}\n}\nv23 = pclone(a3, a4);\nv24 = v9;\nprcp(&v23);\nv21 = pclone(a7, a8);\nv22 = v10;\nif ( (a5 & 2) == 0 )\nprev(&v21);\nv19 = pclone(*v28, v28[1]);\nv20 = v11;\nprev(&v19);\nv17 = pcrc(v19, v20, v23, v24, v21, v22, 0LL, 0LL, 0);\nv18 = v12;\npfree(&v19);\npfree(&v21);\npfree(&v23);\nprev(&v17);\nsub_46A68B(a1, a2, a3, a4, v17, v18, a5, a7, a8, a6, (__int64)a9);\npfree(&v17);\n}\n}\n\n\n\nQ:[a3,a1,a2,a5,a6,a7,a9,v12,v17,v19,v21,v23,v25,v26,i,v28,sub_46A45F,sub_46A68B,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'divisor', 'a1': 'resc', 'a2': 'result', 'a5': 'flags', 'a6': 'args', 'a7': 'xorout', 'a9': 'argpolys', 'v12': 'divisor', 'v17': 'init', 'v19': 'arg', 'v21': 'rxor', 'v23': 'rcpdiv', 'v25': 'ilen', 'v26': 'alen', 'i': 'iptr', 'v28': 'aptr', 'sub_46A45F': 'calini', 'sub_46A68B': 'chkres'}"} |
|
Emit_add_reg_imm32 | 518a2dbcf2aa822ab5e34f398d32cdd6641f6708a7b6bb6cf2eb3278ed9803db | tekknolagi | ghuloum | NA | void Emit_add_reg_imm32(Buffer *buf, Register dst, int32_t src) {
Buffer_write8(buf, kRexPrefix);
if (dst == kRax) {
// Optimization: add eax, {imm32} can either be encoded as 05 {imm32} or 81
// c0 {imm32}.
Buffer_write8(buf, 0x05);
} else {
Buffer_write8(buf, 0x81);
Buffer_write8(buf, 0xc0 + dst);
}
Buffer_write32(buf, src);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401732", "function_addr": 4200242, "binary_name": "518a2dbcf2aa822ab5e34f398d32cdd6641f6708a7b6bb6cf2eb3278ed9803db.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_C], esi"], [5, "mov [rbp+var_10], edx"], [6, "mov rax, [rbp+var_8]"], [7, "mov esi, 48h "], [8, "mov rdi, rax"], [9, "call sub_40161D"], [10, "cmp [rbp+var_C], 0"], [11, "jnz short loc_40176E"], [12, "mov rax, [rbp+var_8]"], [13, "mov esi, 5"], [14, "mov rdi, rax"], [15, "call sub_40161D"], [16, "jmp short loc_401796"], [17, "mov rax, [rbp+var_8]"], [18, "mov esi, 81h"], [19, "mov rdi, rax"], [20, "call sub_40161D"], [21, "mov eax, [rbp+var_C]"], [22, "sub eax, 40h "], [23, "movzx edx, al"], [24, "mov rax, [rbp+var_8]"], [25, "mov esi, edx"], [26, "mov rdi, rax"], [27, "call sub_40161D"], [28, "mov edx, [rbp+var_10]"], [29, "mov rax, [rbp+var_8]"], [30, "mov esi, edx"], [31, "mov rdi, rax"], [32, "call sub_401669"], [33, "nop"], [34, "leave"], [35, "retn"]], "data_dep": [[6, 3], [8, 6], [10, 4], [11, 10], [12, 3], [14, 12], [17, 3], [19, 17], [21, 4], [22, 21], [23, 22], [24, 3], [25, 23], [26, 24], [28, 5], [29, 3], [30, 28], [31, 29], [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/518a2dbcf2aa822ab5e34f398d32cdd6641f6708a7b6bb6cf2eb3278ed9803db_518a2dbcf2aa822ab5e34f398d32cdd6641f6708a7b6bb6cf2eb3278ed9803db.jsonl.gz", "strip_func_name": "sub_401732", "query": "\n\n\n__int64 __fastcall sub_401732(_QWORD *a1, int a2, int a3)\n{\nsub_40161D(a1, 0x48u);\nif ( a2 )\n{\nsub_40161D(a1, 0x81u);\nsub_40161D(a1, a2 - 64);\n}\nelse\n{\nsub_40161D(a1, 5u);\n}\nreturn sub_401669(a1, a3);\n}\n\n\n\nQ:[a3,a1,a2,sub_401732,sub_40161D,sub_401669,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'src', 'a1': 'buf', 'a2': 'dst', 'sub_401732': 'Emit_add_reg_imm32', 'sub_40161D': 'Buffer_write8', 'sub_401669': 'Buffer_write32'}"} |
|
parse_kill | 854cdf5444b2b00c87d26e7d13f4f78203371e000073005c07d41bd72c04e6ea | pahihu | mumps | NA | void parse_kill() // KILL
{
short s; // for functions
int args = 0; // number of args
u_char *ptr; // a handy pointer
if (*source_ptr == '(') // exclusive kill
{ args = 0; // argument count
source_ptr++; // skip the (
while (TRUE) // now, get one or more args
{ ptr = comp_ptr; // save for ron
s = localvar(); // get var
if (s < 0) // if we got an error
{ comperror(s); // compile it
return; // and exit
}
ptr[s++] = OPMVAR; // build an mvar, point at type
if ((ptr[s] != TYPVARNAM) &&
(ptr[s] != TYPVARIDX)) SYNTX // must be local unsubscripted
args++; // count the arg
if (*source_ptr == ')') // closing bracket?
{ source_ptr++; // skip it
break; // and exit
}
if (*source_ptr != ',') break; // do it elsewhere
source_ptr++; // skip the comma
} // end 'get one or more args'
*comp_ptr++ = CMKILLB; // opcode
*comp_ptr++ = args; // number of args
}
else
{ while (TRUE) // loop thru normal kill
{ ptr = comp_ptr; // save posn
if (*source_ptr == '@') // indirection ?
{ atom(); // eval the string
if (*(comp_ptr - 1) == INDEVAL) // if it was indirect
{ *(comp_ptr - 1) = INDKILL; // say kill indirect
}
else // experimantal for $O(@.@())
{ ptr -= 2; // back up over subs to type
if (*(comp_ptr - 3) == OPVAR)
*(comp_ptr - 3) = OPMVAR; // change to OPMVAR
}
}
else
{ ptr = comp_ptr; // save posn
s = localvar(); // we need a var
if (s < 0)
{ comperror(s); // compile the error
return; // and exit
}
ptr = &ptr[s]; // point at the OPVAR
*ptr = OPMVAR; // change to a OPMVAR
}
if (*(comp_ptr - 1) != INDKILL)
*comp_ptr++ = CMKILL; // and the opcode
if (*source_ptr != ',') break; // done
source_ptr++; // point at next
}
} // end while
if (*source_ptr == ',') // stupid A,A),...
{ source_ptr++; // point past comma
parse_kill(); // and re-enter
}
return;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4073C2", "function_addr": 4223938, "binary_name": "854cdf5444b2b00c87d26e7d13f4f78203371e000073005c07d41bd72c04e6ea.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_4], 0"], [4, "mov rax, cs:s1"], [5, "movzx eax, byte ptr [rax]"], [6, "cmp al, 28h "], [7, "jnz loc_4074F9"], [8, "mov [rbp+var_4], 0"], [9, "mov rax, cs:s1"], [10, "add rax, 1"], [11, "mov cs:s1, rax"], [12, "mov rax, cs:dest"], [13, "mov [rbp+var_10], rax"], [14, "mov eax, 0"], [15, "call sub_40634D"], [16, "mov [rbp+var_12], ax"], [17, "cmp [rbp+var_12], 0"], [18, "jns short loc_40742C"], [19, "movsx eax, [rbp+var_12]"], [20, "mov edi, eax"], [21, "call sub_405799"], [22, "jmp locret_40761D"], [23, "movzx eax, [rbp+var_12]"], [24, "mov edx, eax"], [25, "add edx, 1"], [26, "mov [rbp+var_12], dx"], [27, "movsx rdx, ax"], [28, "mov rax, [rbp+var_10]"], [29, "add rax, rdx"], [30, "mov byte ptr [rax], 3Eh "], [31, "movsx rdx, [rbp+var_12]"], [32, "mov rax, [rbp+var_10]"], [33, "add rax, rdx"], [34, "movzx eax, byte ptr [rax]"], [35, "test al, al"], [36, "jz short loc_40747C"], [37, "movsx rdx, [rbp+var_12]"], [38, "mov rax, [rbp+var_10]"], [39, "add rax, rdx"], [40, "movzx eax, byte ptr [rax]"], [41, "cmp al, 40h "], [42, "jz short loc_40747C"], [43, "mov edi, 0FFFFFF2Bh"], [44, "call sub_405799"], [45, "jmp locret_40761D"], [46, "add [rbp+var_4], 1"], [47, "mov rax, cs:s1"], [48, "movzx eax, byte ptr [rax]"], [49, "cmp al, 29h "], [50, "jnz short loc_4074A2"], [51, "mov rax, cs:s1"], [52, "add rax, 1"], [53, "mov cs:s1, rax"], [54, "jmp short loc_4074C8"], [55, "mov rax, cs:s1"], [56, "movzx eax, byte ptr [rax]"], [57, "cmp al, 2Ch "], [58, "jnz short loc_4074C7"], [59, "mov rax, cs:s1"], [60, "add rax, 1"], [61, "mov cs:s1, rax"], [62, "jmp loc_4073FC"], [63, "nop"], [64, "mov rax, cs:dest"], [65, "lea rdx, [rax+1]"], [66, "mov cs:dest, rdx"], [67, "mov byte ptr [rax], 0A7h"], [68, "mov rax, cs:dest"], [69, "lea rdx, [rax+1]"], [70, "mov cs:dest, rdx"], [71, "mov edx, [rbp+var_4]"], [72, "mov [rax], dl"], [73, "jmp loc_4075F2"], [74, "mov rax, cs:dest"], [75, "mov [rbp+var_10], rax"], [76, "mov rax, cs:s1"], [77, "movzx eax, byte ptr [rax]"], [78, "cmp al, 40h "], [79, "jnz short loc_407565"], [80, "mov eax, 0"], [81, "call sub_4059FD"], [82, "mov rax, cs:dest"], [83, "sub rax, 1"], [84, "movzx eax, byte ptr [rax]"], [85, "cmp al, 41h "], [86, "jnz short loc_40753E"], [87, "mov rax, cs:dest"], [88, "sub rax, 1"], [89, "mov byte ptr [rax], 0BBh"], [90, "jmp short loc_4075A5"], [91, "sub [rbp+var_10], 2"], [92, "mov rax, cs:dest"], [93, "sub rax, 3"], [94, "movzx eax, byte ptr [rax]"], [95, "cmp al, 3Dh "], [96, "jnz short loc_4075A5"], [97, "mov rax, cs:dest"], [98, "sub rax, 3"], [99, "mov byte ptr [rax], 3Eh "], [100, "jmp short loc_4075A5"], [101, "mov rax, cs:dest"], [102, "mov [rbp+var_10], rax"], [103, "mov eax, 0"], [104, "call sub_40634D"], [105, "mov [rbp+var_12], ax"], [106, "cmp [rbp+var_12], 0"], [107, "jns short loc_407595"], [108, "movsx eax, [rbp+var_12]"], [109, "mov edi, eax"], [110, "call sub_405799"], [111, "jmp locret_40761D"], [112, "movsx rax, [rbp+var_12]"], [113, "add [rbp+var_10], rax"], [114, "mov rax, [rbp+var_10]"], [115, "mov byte ptr [rax], 3Eh "], [116, "mov rax, cs:dest"], [117, "sub rax, 1"], [118, "movzx eax, byte ptr [rax]"], [119, "cmp al, 0BBh"], [120, "jz short loc_4075CC"], [121, "mov rax, cs:dest"], [122, "lea rdx, [rax+1]"], [123, "mov cs:dest, rdx"], [124, "mov byte ptr [rax], 0A6h"], [125, "mov rax, cs:s1"], [126, "movzx eax, byte ptr [rax]"], [127, "cmp al, 2Ch "], [128, "jnz short loc_4075F1"], [129, "mov rax, cs:s1"], [130, "add rax, 1"], [131, "mov cs:s1, rax"], [132, "jmp loc_4074F9"], [133, "nop"], [134, "mov rax, cs:s1"], [135, "movzx eax, byte ptr [rax]"], [136, "cmp al, 2Ch "], [137, "jnz short loc_40761C"], [138, "mov rax, cs:s1"], [139, "add rax, 1"], [140, "mov cs:s1, rax"], [141, "mov eax, 0"], [142, "call sub_4073C2"], [143, "nop"], [144, "leave"], [145, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [10, 9], [11, 10], [13, 12], [16, 15], [17, 16], [18, 17], [19, 16], [20, 19], [23, 16], [24, 23], [25, 24], [26, 25], [27, 23], [28, 13], [29, 27], [29, 28], [30, 29], [31, 26], [32, 13], [33, 31], [33, 32], [34, 30], [34, 33], [35, 34], [36, 35], [37, 26], [38, 13], [39, 37], [39, 38], [40, 30], [40, 39], [41, 40], [42, 41], [46, 8], [46, 46], [47, 11], [47, 61], [48, 47], [48, 30], [49, 48], [50, 49], [51, 11], [51, 61], [52, 51], [53, 52], [55, 11], [55, 61], [56, 30], [56, 55], [57, 56], [58, 57], [59, 11], [59, 61], [60, 59], [61, 60], [65, 72], [65, 31], [65, 67], [65, 37], [65, 30], [65, 64], [66, 65], [67, 64], [68, 66], [69, 65], [69, 67], [69, 68], [70, 69], [71, 46], [72, 68], [72, 71], [74, 123], [75, 74], [76, 131], [77, 124], [77, 99], [77, 76], [77, 89], [77, 115], [78, 77], [79, 78], [82, 123], [83, 82], [84, 115], [84, 124], [84, 99], [84, 83], [84, 89], [85, 84], [86, 85], [87, 123], [88, 87], [89, 88], [91, 75], [92, 123], [93, 92], [94, 89], [94, 93], [94, 115], [94, 124], [94, 99], [95, 94], [96, 95], [97, 123], [98, 97], [99, 98], [101, 123], [102, 101], [105, 104], [106, 105], [107, 106], [108, 105], [109, 108], [112, 105], [113, 112], [113, 102], [114, 113], [115, 114], [116, 123], [117, 116], [118, 115], [118, 124], [118, 99], [118, 117], [118, 89], [119, 118], [120, 119], [121, 123], [122, 122], [122, 115], [122, 124], [122, 99], [122, 121], [122, 89], [123, 122], [124, 121], [125, 131], [126, 89], [126, 125], [126, 115], [126, 124], [126, 99], [127, 126], [128, 127], [129, 131], [130, 129], [131, 130], [134, 131], [134, 11], [134, 61], [134, 53], [135, 67], [135, 115], [135, 124], [135, 99], [135, 30], [135, 89], [135, 134], [135, 72], [136, 135], [137, 136], [138, 11], [138, 61], [138, 131], [138, 53], [139, 138], [140, 139], [145, 44], [145, 110], [145, 21], [145, 142], [145, 135]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/854cdf5444b2b00c87d26e7d13f4f78203371e000073005c07d41bd72c04e6ea_854cdf5444b2b00c87d26e7d13f4f78203371e000073005c07d41bd72c04e6ea.jsonl.gz", "strip_func_name": "sub_4073C2", "query": "\n\n\n__int64 sub_4073C2()\n{\n__int64 result; // rax\n__int16 v1; // ax\n_BYTE *v2; // rax\n_BYTE *v3; // rax\n_BYTE *v4; // rax\n__int16 v5; // [rsp+Eh] [rbp-12h]\n__int16 v6; // [rsp+Eh] [rbp-12h]\n_BYTE *v7; // [rsp+10h] [rbp-10h]\n_BYTE *v8; // [rsp+10h] [rbp-10h]\nchar v9; // [rsp+1Ch] [rbp-4h]\n\nif ( *s1 == 40 )\n{\nv9 = 0;\n++s1;\nwhile ( 1 )\n{\nv7 = dest;\nv5 = sub_40634D();\nif ( v5 < 0 )\nbreak;\nv1 = v5;\nv6 = v5 + 1;\nv7[v1] = 62;\nif ( v7[v6] && v7[v6] != 64 )\nreturn sub_405799(-213);\n++v9;\nif ( *s1 == 41 )\n{\n++s1;\nLABEL_12:\nv2 = dest;\ndest = (char *)dest + 1;\n*v2 = -89;\nv3 = dest;\ndest = (char *)dest + 1;\n*v3 = v9;\ngoto LABEL_24;\n}\nif ( *s1 != 44 )\ngoto LABEL_12;\n++s1;\n}\nLABEL_4:\nresult = sub_405799(v5);\n}\nelse\n{\nwhile ( 1 )\n{\nif ( *s1 == 64 )\n{\nsub_4059FD();\nif ( *((char *)dest - 1) == 65 )\n{\n*((char *)dest - 1) = -69;\n}\nelse if ( *((char *)dest - 3) == 61 )\n{\n*((char *)dest - 3) = 62;\n}\n}\nelse\n{\nv8 = dest;\nv5 = sub_40634D();\nif ( v5 < 0 )\ngoto LABEL_4;\nv8[v5] = 62;\n}\nif ( *((char *)dest - 1) != -69 )\n{\nv4 = dest;\ndest = (char *)dest + 1;\n*v4 = -90;\n}\nif ( *s1 != 44 )\nbreak;\n++s1;\n}\nLABEL_24:\nresult = (unsigned __int8)*s1;\nif ( (_BYTE)result == 44 )\n{\n++s1;\nresult = sub_4073C2();\n}\n}\nreturn result;\n}\n\n\n\nQ:[v6,v7,v9,sub_4073C2,sub_40634D,sub_405799,sub_4059FD,]\nAssistant: ", "hints": "[]", "response": "{'v6': 's', 'v7': 'ptra', 'v9': 'args', 'sub_4073C2': 'parse_kill', 'sub_40634D': 'localvar', 'sub_405799': 'comperror', 'sub_4059FD': 'atom'}"} |
|
red_mkdir2 | ebce38d56473c420b2dd35734b38c295e926b8a2feaa22442c4129495df4ce92 | tuxera | reliance-edge | NA | int32_t red_mkdir2(
const char *pszPath,
uint16_t uMode)
{
return red_mkdirat(RED_AT_FDNONE, pszPath, uMode);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40ECB6", "function_addr": 4254902, "binary_name": "ebce38d56473c420b2dd35734b38c295e926b8a2feaa22442c4129495df4ce92.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], ax"], [6, "movzx edx, [rbp+var_C]"], [7, "mov rax, [rbp+var_8]"], [8, "mov rsi, rax"], [9, "mov edi, 0FFFFFF9Ch"], [10, "call sub_40ECDF"], [11, "leave"], [12, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [8, 7], [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/ebce38d56473c420b2dd35734b38c295e926b8a2feaa22442c4129495df4ce92_ebce38d56473c420b2dd35734b38c295e926b8a2feaa22442c4129495df4ce92.jsonl.gz", "strip_func_name": "sub_40ECB6", "query": "\n\n\n__int64 __fastcall sub_40ECB6(__int64 a1, unsigned __int16 a2)\n{\nreturn sub_40ECDF(4294967196LL, a1, a2);\n}\n\n\n\nQ:[a1,a2,sub_40ECB6,sub_40ECDF,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pszPath', 'a2': 'uMode', 'sub_40ECB6': 'red_mkdir2', 'sub_40ECDF': 'red_mkdirat'}"} |
|
rsa_debug | 065ca9415a4dc9aec682871a535af2dee0f80c3adecda73ebf561b8301874f09 | FreeRTOS | iot-reference-stm32u5 | NA | static void rsa_debug( const void *ctx, mbedtls_pk_debug_item *items )
{
items->type = MBEDTLS_PK_DEBUG_MPI;
items->name = "rsa.N";
items->value = &( ((mbedtls_rsa_context *) ctx)->N );
items++;
items->type = MBEDTLS_PK_DEBUG_MPI;
items->name = "rsa.E";
items->value = &( ((mbedtls_rsa_context *) ctx)->E );
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_440AE3", "function_addr": 4459235, "binary_name": "065ca9415a4dc9aec682871a535af2dee0f80c3adecda73ebf561b8301874f09.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_10]"], [5, "mov dword ptr [rax], 1"], [6, "mov rax, [rbp+var_10]"], [7, "mov qword ptr [rax+8], offset aRsaN"], [8, "mov rax, [rbp+var_8]"], [9, "lea rdx, [rax+10h]"], [10, "mov rax, [rbp+var_10]"], [11, "mov [rax+10h], rdx"], [12, "add [rbp+var_10], 18h"], [13, "mov rax, [rbp+var_10]"], [14, "mov dword ptr [rax], 1"], [15, "mov rax, [rbp+var_10]"], [16, "mov qword ptr [rax+8], offset aRsaE"], [17, "mov rax, [rbp+var_8]"], [18, "lea rdx, [rax+28h]"], [19, "mov rax, [rbp+var_10]"], [20, "mov [rax+10h], rdx"], [21, "nop"], [22, "pop rbp"], [23, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 6], [8, 2], [9, 8], [9, 7], [10, 3], [11, 10], [11, 9], [12, 3], [13, 12], [14, 13], [15, 12], [16, 15], [17, 2], [18, 17], [18, 16], [18, 9], [19, 12], [20, 19], [20, 18], [22, 0], [23, 19]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/065ca9415a4dc9aec682871a535af2dee0f80c3adecda73ebf561b8301874f09_065ca9415a4dc9aec682871a535af2dee0f80c3adecda73ebf561b8301874f09.jsonl.gz", "strip_func_name": "sub_440AE3", "query": "\n\n\n__int64 __fastcall sub_440AE3(__int64 a1, __int64 a2)\n{\n__int64 result; // rax\n\n*(_DWORD *)a2 = 1;\n*(_QWORD *)(a2 + 8) = \"rsa.N\";\n*(_QWORD *)(a2 + 16) = a1 + 16;\n*(_DWORD *)(a2 + 24) = 1;\n*(_QWORD *)(a2 + 32) = \"rsa.E\";\nresult = a2 + 24;\n*(_QWORD *)(a2 + 40) = a1 + 40;\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_440AE3,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ctx', 'a2': 'items', 'sub_440AE3': 'rsa_debug'}"} |
|
NotifyHandler | 409f7ebd875056ec33b17ff69e77e300c0715d956d9a542312496070b0061f7d | bitdefender | napoca | NA | static void
NotifyHandler (
ACPI_HANDLE Device,
UINT32 Value,
void *Context)
{
ACPI_INFO (("Received a notify 0x%X", Value));
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4015AF", "function_addr": 4199855, "binary_name": "409f7ebd875056ec33b17ff69e77e300c0715d956d9a542312496070b0061f7d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_C], esi"], [5, "mov [rbp+var_18], rdx"], [6, "mov eax, [rbp+var_C]"], [7, "mov esi, eax"], [8, "mov edi, offset aReceivedANotif"], [9, "mov eax, 0"], [10, "call sub_42B4CB"], [11, "nop"], [12, "leave"], [13, "retn"]], "data_dep": [[6, 4], [7, 6], [13, 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/409f7ebd875056ec33b17ff69e77e300c0715d956d9a542312496070b0061f7d_409f7ebd875056ec33b17ff69e77e300c0715d956d9a542312496070b0061f7d.jsonl.gz", "strip_func_name": "sub_4015AF", "query": "\n\n\n__int64 __fastcall sub_4015AF(__int64 a1, int a2, int a3, int a4, int a5, int a6)\n{\nreturn sub_42B4CB((unsigned int)\"Received a notify 0x%X\", a2, a3, a4, a5, a6);\n}\n\n\n\nQ:[a3,a2,a1,sub_4015AF,sub_42B4CB,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'Context', 'a2': 'Value', 'a1': 'Device', 'sub_4015AF': 'NotifyHandler', 'sub_42B4CB': 'AcpiInfo'}"} |
|
print_pgp_credential | a55437195f8ae7fcbc9fcbc7c4ce7ea2903742f0fcbd5868b140c66600d2ad6c | AonCyberLabs | D-Modem | NA | static int print_pgp_credential(pjsip_pgp_credential *cred, char *buf, pj_size_t size)
{
PJ_UNUSED_ARG(cred);
PJ_UNUSED_ARG(buf);
PJ_UNUSED_ARG(size);
return -1;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4397D9", "function_addr": 4429785, "binary_name": "a55437195f8ae7fcbc9fcbc7c4ce7ea2903742f0fcbd5868b140c66600d2ad6c.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 eax, 0FFFFFFFFh"], [6, "pop rbp"], [7, "retn"]], "data_dep": [[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/a55437195f8ae7fcbc9fcbc7c4ce7ea2903742f0fcbd5868b140c66600d2ad6c_a55437195f8ae7fcbc9fcbc7c4ce7ea2903742f0fcbd5868b140c66600d2ad6c.jsonl.gz", "strip_func_name": "sub_4397D9", "query": "\n\n\n__int64 sub_4397D9()\n{\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[sub_4397D9,]\nAssistant: ", "hints": "[]", "response": "{'sub_4397D9': 'print_pgp_credential'}"} |
|
sm_handle_encryption_result_dkg_irk | 1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca | micropython | micropython-unicorn | NA | static void sm_handle_encryption_result_dkg_irk(void *arg){
UNUSED(arg);
sm_aes128_state = SM_AES128_IDLE;
log_info_key("irk", sm_persistent_irk);
dkg_state = DKG_CALC_DHK;
sm_run();
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4249FB", "function_addr": 4344315, "binary_name": "1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov cs:dword_474718, 0"], [5, "mov esi, offset qword_4745F0"], [6, "mov edi, offset aIrk_1"], [7, "call sub_406693"], [8, "mov cs:dword_474600, 2"], [9, "call sub_422BBE"], [10, "nop"], [11, "leave"], [12, "retn"]], "data_dep": [[12, 9]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca_1f4b836241663a98d995a650a671acd1dabc7b5a96a4160d7267c822f4bbfdca.jsonl.gz", "strip_func_name": "sub_4249FB", "query": "\n\n\nchar sub_4249FB()\n{\ndword_474718 = 0;\nsub_406693((int)\"irk\", (__int64)&qword_4745F0);\ndword_474600 = 2;\nreturn sub_422BBE((__int64)\"irk\", (__int64)&qword_4745F0);\n}\n\n\n\nQ:[sub_4249FB,sub_406693,sub_422BBE,]\nAssistant: ", "hints": "[]", "response": "{'sub_4249FB': 'sm_handle_encryption_result_dkg_irk', 'sub_406693': 'log_info_key', 'sub_422BBE': 'sm_run'}"} |
|
suspend_for_remaining_interval | 82684331cebdf758458391f5523a182c31c44f15339b17baedc2a834767c369e | cdown | psi-notify | NA | static void suspend_for_remaining_interval(const struct timespec *in) {
struct timespec out, remaining;
long cfg_nsec, rem_nsec, sleep_nsec;
if (cfg.update_interval == 0) {
return;
}
expect(clock_gettime(CLOCK_MONOTONIC, &out) == 0);
if (out.tv_nsec - in->tv_nsec < 0) {
remaining.tv_sec = out.tv_sec - in->tv_sec - 1;
remaining.tv_nsec = out.tv_nsec - in->tv_nsec + SEC_TO_NSEC;
} else {
remaining.tv_sec = out.tv_sec - in->tv_sec;
remaining.tv_nsec = out.tv_nsec - in->tv_nsec;
}
cfg_nsec = cfg.update_interval * SEC_TO_NSEC;
rem_nsec = remaining.tv_sec * SEC_TO_NSEC + remaining.tv_nsec;
if (rem_nsec >= cfg_nsec) {
warn("Timer elapsed %lld seconds before we completed one event loop.\n",
(long long)cfg.update_interval);
return;
}
sleep_nsec = cfg_nsec - rem_nsec;
remaining.tv_sec = sleep_nsec / SEC_TO_NSEC;
remaining.tv_nsec = sleep_nsec % SEC_TO_NSEC;
expect(nanosleep(&remaining, NULL) == 0 || errno == EINTR);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404292", "function_addr": 4211346, "binary_name": "82684331cebdf758458391f5523a182c31c44f15339b17baedc2a834767c369e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_48], rdi"], [4, "mov rax, cs:qword_408318"], [5, "test rax, rax"], [6, "jz loc_404487"], [7, "lea rax, [rbp+tp]"], [8, "mov rsi, rax"], [9, "mov edi, 1"], [10, "call _clock_gettime"], [11, "test eax, eax"], [12, "jz short loc_4042F7"], [13, "mov rax, cs:stderr"], [14, "mov r9d, 2B1h"], [15, "mov r8d, offset aSuspendForRema"], [16, "mov ecx, offset aPsiNotifyC"], [17, "mov edx, offset aClockGettimeCl"], [18, "mov esi, offset format"], [19, "mov rdi, rax"], [20, "mov eax, 0"], [21, "call _fprintf"], [22, "call _abort"], [23, "mov rdx, [rbp+tp.tv_nsec]"], [24, "mov rax, [rbp+var_48]"], [25, "mov rcx, [rax+8]"], [26, "mov rax, rdx"], [27, "sub rax, rcx"], [28, "test rax, rax"], [29, "jns short loc_404345"], [30, "mov rdx, [rbp+tp.tv_sec]"], [31, "mov rax, [rbp+var_48]"], [32, "mov rcx, [rax]"], [33, "mov rax, rdx"], [34, "sub rax, rcx"], [35, "sub rax, 1"], [36, "mov [rbp+requested_time.tv_sec], rax"], [37, "mov rdx, [rbp+tp.tv_nsec]"], [38, "mov rax, [rbp+var_48]"], [39, "mov rcx, [rax+8]"], [40, "mov rax, rdx"], [41, "sub rax, rcx"], [42, "add rax, 3B9ACA00h"], [43, "mov [rbp+requested_time.tv_nsec], rax"], [44, "jmp short loc_404370"], [45, "mov rdx, [rbp+tp.tv_sec]"], [46, "mov rax, [rbp+var_48]"], [47, "mov rcx, [rax]"], [48, "mov rax, rdx"], [49, "sub rax, rcx"], [50, "mov [rbp+requested_time.tv_sec], rax"], [51, "mov rdx, [rbp+tp.tv_nsec]"], [52, "mov rax, [rbp+var_48]"], [53, "mov rcx, [rax+8]"], [54, "mov rax, rdx"], [55, "sub rax, rcx"], [56, "mov [rbp+requested_time.tv_nsec], rax"], [57, "mov rax, cs:qword_408318"], [58, "imul rax, 3B9ACA00h"], [59, "mov [rbp+var_8], rax"], [60, "mov rax, [rbp+requested_time.tv_sec]"], [61, "imul rdx, rax, 3B9ACA00h"], [62, "mov rax, [rbp+requested_time.tv_nsec]"], [63, "add rax, rdx"], [64, "mov [rbp+var_10], rax"], [65, "mov rax, [rbp+var_10]"], [66, "cmp rax, [rbp+var_8]"], [67, "jl short loc_4043C7"], [68, "mov rdx, cs:qword_408318"], [69, "mov rax, cs:stderr"], [70, "mov esi, offset aWarnTimerElaps"], [71, "mov rdi, rax"], [72, "mov eax, 0"], [73, "call _fprintf"], [74, "jmp locret_404488"], [75, "mov rax, [rbp+var_8]"], [76, "sub rax, [rbp+var_10]"], [77, "mov [rbp+var_18], rax"], [78, "mov rcx, [rbp+var_18]"], [79, "mov rdx, 112E0BE826D694B3h"], [80, "mov rax, rcx"], [81, "imul rdx"], [82, "mov rax, rdx"], [83, "sar rax, 1Ah"], [84, "sar rcx, 3Fh"], [85, "mov rdx, rcx"], [86, "sub rax, rdx"], [87, "mov [rbp+requested_time.tv_sec], rax"], [88, "mov rcx, [rbp+var_18]"], [89, "mov rdx, 112E0BE826D694B3h"], [90, "mov rax, rcx"], [91, "imul rdx"], [92, "mov rax, rdx"], [93, "sar rax, 1Ah"], [94, "mov rdx, rcx"], [95, "sar rdx, 3Fh"], [96, "sub rax, rdx"], [97, "imul rdx, rax, 3B9ACA00h"], [98, "mov rax, rcx"], [99, "sub rax, rdx"], [100, "mov [rbp+requested_time.tv_nsec], rax"], [101, "lea rax, [rbp+requested_time]"], [102, "mov esi, 0"], [103, "mov rdi, rax"], [104, "call _nanosleep"], [105, "test eax, eax"], [106, "jz short locret_404488"], [107, "call ___errno_location"], [108, "mov eax, [rax]"], [109, "cmp eax, 4"], [110, "jz short locret_404488"], [111, "mov rax, cs:stderr"], [112, "mov r9d, 2C8h"], [113, "mov r8d, offset aSuspendForRema"], [114, "mov ecx, offset aPsiNotifyC"], [115, "mov edx, offset aNanosleepRemai"], [116, "mov esi, offset format"], [117, "mov rdi, rax"], [118, "mov eax, 0"], [119, "call _fprintf"], [120, "call _abort"], [121, "nop"], [122, "leave"], [123, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 5], [8, 7], [11, 10], [12, 11], [19, 13], [24, 3], [25, 24], [26, 23], [27, 26], [27, 25], [28, 27], [29, 28], [31, 3], [32, 31], [33, 30], [34, 32], [34, 33], [35, 34], [36, 35], [38, 3], [39, 38], [40, 37], [41, 40], [41, 39], [42, 41], [43, 42], [46, 3], [47, 46], [48, 45], [49, 48], [49, 47], [50, 49], [52, 3], [53, 52], [54, 51], [55, 54], [55, 53], [56, 55], [58, 57], [59, 58], [60, 50], [60, 36], [61, 51], [61, 37], [61, 60], [62, 43], [62, 56], [63, 61], [63, 62], [64, 63], [65, 64], [66, 59], [66, 65], [67, 66], [71, 69], [75, 59], [76, 64], [76, 75], [77, 76], [78, 77], [80, 78], [81, 79], [82, 81], [83, 82], [84, 78], [85, 84], [86, 83], [86, 85], [87, 86], [88, 77], [90, 88], [91, 89], [92, 91], [93, 92], [94, 88], [95, 94], [96, 95], [96, 93], [97, 95], [97, 96], [98, 88], [99, 97], [99, 98], [100, 99], [101, 99], [103, 101], [105, 104], [106, 105], [108, 107], [109, 108], [110, 109], [117, 111], [123, 108], [123, 5], [123, 105], [123, 73]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/82684331cebdf758458391f5523a182c31c44f15339b17baedc2a834767c369e_82684331cebdf758458391f5523a182c31c44f15339b17baedc2a834767c369e.jsonl.gz", "strip_func_name": "sub_404292", "query": "\n\n\nint __fastcall sub_404292(_QWORD *a1)\n{\nint result; // eax\nstruct timespec requested_time; // [rsp+10h] [rbp-40h] BYREF\nstruct timespec tp; // [rsp+20h] [rbp-30h] BYREF\n__int64 v4; // [rsp+38h] [rbp-18h]\n__time_t v5; // [rsp+40h] [rbp-10h]\n__int64 v6; // [rsp+48h] [rbp-8h]\n\nresult = qword_408318;\nif ( qword_408318 )\n{\nif ( clock_gettime(1, &tp) )\n{\nfprintf(\nstderr,\n\"FATAL: !(%s) at %s:%s:%d\\n\",\n\"clock_gettime(CLOCK_MONOTONIC, &out) == 0\",\n\"psi-notify.c\",\n\"suspend_for_remaining_interval\",\n689LL);\nabort();\n}\nif ( tp.tv_nsec - a1[1] >= 0 )\n{\nrequested_time.tv_sec = tp.tv_sec - *a1;\nrequested_time.tv_nsec = tp.tv_nsec - a1[1];\n}\nelse\n{\nrequested_time.tv_sec = tp.tv_sec - *a1 - 1;\nrequested_time.tv_nsec = tp.tv_nsec - a1[1] + 1000000000;\n}\nv6 = 1000000000 * qword_408318;\nv5 = 1000000000 * requested_time.tv_sec + requested_time.tv_nsec;\nif ( v5 < 1000000000 * qword_408318 )\n{\nv4 = v6 - v5;\nrequested_time.tv_sec = (v6 - v5) / 1000000000;\nrequested_time.tv_nsec = (v6 - v5) % 1000000000;\nresult = nanosleep(&requested_time, 0LL);\nif ( result )\n{\nresult = *__errno_location();\nif ( result != 4 )\n{\nfprintf(\nstderr,\n\"FATAL: !(%s) at %s:%s:%d\\n\",\n\"nanosleep(&remaining, NULL) == 0 || errno == EINTR\",\n\"psi-notify.c\",\n\"suspend_for_remaining_interval\",\n712LL);\nabort();\n}\n}\n}\nelse\n{\nresult = fprintf(stderr, \"WARN: Timer elapsed %lld seconds before we completed one event loop.\\n\", qword_408318);\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,requested_time,tp,v4,v5,v6,sub_404292,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'in', 'requested_time': 'remaining', 'tp': 'out', 'v4': 'sleep_nsec', 'v5': 'rem_nsec', 'v6': 'cfg_nsec', 'sub_404292': 'suspend_for_remaining_interval'}"} |
|
mp_2expt | 20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640 | sonic-net | sonic-buildimage | NA | static int mp_2expt (mp_int * a, int b)
{
int res;
/* zero a as per default */
mp_zero (a);
/* grow a to accommodate the single bit */
if ((res = mp_grow (a, b / DIGIT_BIT + 1)) != MP_OKAY) {
return res;
}
/* set the used count of where the bit will go */
a->used = b / DIGIT_BIT + 1;
/* put the single bit in its place */
a->dp[b / DIGIT_BIT] = ((mp_digit)1) << (b % DIGIT_BIT);
return MP_OKAY;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4A6C15", "function_addr": 4877333, "binary_name": "20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_1C], esi"], [5, "mov rax, [rbp+var_18]"], [6, "mov rdi, rax"], [7, "call sub_4A5280"], [8, "mov eax, [rbp+var_1C]"], [9, "movsxd rdx, eax"], [10, "imul rdx, 0FFFFFFFF88888889h"], [11, "shr rdx, 20h"], [12, "add edx, eax"], [13, "sar edx, 5"], [14, "sar eax, 1Fh"], [15, "mov ecx, eax"], [16, "mov eax, edx"], [17, "sub eax, ecx"], [18, "lea edx, [rax+1]"], [19, "mov rax, [rbp+var_18]"], [20, "mov esi, edx"], [21, "mov rdi, rax"], [22, "call sub_4A5534"], [23, "mov [rbp+var_4], eax"], [24, "cmp [rbp+var_4], 0"], [25, "jz short loc_4A6C71"], [26, "mov eax, [rbp+var_4]"], [27, "jmp locret_4A6D02"], [28, "mov eax, [rbp+var_1C]"], [29, "movsxd rdx, eax"], [30, "imul rdx, 0FFFFFFFF88888889h"], [31, "shr rdx, 20h"], [32, "add edx, eax"], [33, "sar edx, 5"], [34, "sar eax, 1Fh"], [35, "mov ecx, eax"], [36, "mov eax, edx"], [37, "sub eax, ecx"], [38, "lea edx, [rax+1]"], [39, "mov rax, [rbp+var_18]"], [40, "mov [rax], edx"], [41, "mov eax, [rbp+var_1C]"], [42, "movsxd rdx, eax"], [43, "imul rdx, 0FFFFFFFF88888889h"], [44, "shr rdx, 20h"], [45, "add edx, eax"], [46, "sar edx, 5"], [47, "mov ecx, eax"], [48, "sar ecx, 1Fh"], [49, "sub edx, ecx"], [50, "imul ecx, edx, 3Ch "], [51, "sub eax, ecx"], [52, "mov edx, eax"], [53, "mov rax, [rbp+var_18]"], [54, "mov rsi, [rax+10h]"], [55, "mov eax, [rbp+var_1C]"], [56, "movsxd rcx, eax"], [57, "imul rcx, 0FFFFFFFF88888889h"], [58, "shr rcx, 20h"], [59, "add ecx, eax"], [60, "sar ecx, 5"], [61, "sar eax, 1Fh"], [62, "mov edi, eax"], [63, "mov eax, ecx"], [64, "sub eax, edi"], [65, "cdqe"], [66, "shl rax, 3"], [67, "add rax, rsi"], [68, "mov esi, 1"], [69, "mov ecx, edx"], [70, "shl rsi, cl"], [71, "mov rdx, rsi"], [72, "mov [rax], rdx"], [73, "mov eax, 0"], [74, "leave"], [75, "retn"]], "data_dep": [[5, 3], [6, 5], [8, 4], [9, 8], [10, 9], [11, 10], [12, 8], [12, 11], [13, 12], [14, 8], [15, 14], [16, 13], [17, 16], [17, 15], [18, 17], [18, 13], [19, 3], [20, 18], [21, 19], [23, 22], [24, 23], [25, 24], [26, 23], [28, 4], [29, 28], [30, 29], [31, 30], [32, 31], [32, 28], [33, 32], [34, 28], [35, 34], [36, 33], [37, 35], [37, 36], [38, 33], [38, 37], [39, 3], [40, 38], [40, 39], [41, 4], [42, 41], [43, 42], [44, 43], [45, 41], [45, 44], [46, 45], [47, 41], [48, 47], [49, 46], [49, 48], [50, 49], [50, 48], [51, 50], [51, 41], [52, 51], [53, 3], [54, 40], [54, 53], [55, 4], [56, 55], [57, 56], [58, 57], [59, 55], [59, 58], [60, 59], [61, 55], [62, 61], [63, 60], [64, 62], [64, 63], [66, 64], [67, 54], [67, 66], [69, 52], [70, 68], [70, 69], [71, 70], [72, 67], [72, 71], [75, 26], [75, 73]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640_20c07804a3f28a6a5c3f8253e79de0ec1aedc41632a0737ad8dad981cd237640.jsonl.gz", "strip_func_name": "sub_4A6C15", "query": "\n\n\n__int64 __fastcall sub_4A6C15(__int64 a1, int a2)\n{\nunsigned int v3; // [rsp+1Ch] [rbp-4h]\n\nsub_4A5280(a1);\nv3 = sub_4A5534(a1, a2 / 60 + 1);\nif ( v3 )\nreturn v3;\n*(_DWORD *)a1 = a2 / 60 + 1;\n*(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * (a2 / 60)) = 1LL << (a2 % 60);\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,sub_4A6C15,sub_4A5280,sub_4A5534,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'a', 'a2': 'b', 'v3': 'res', 'sub_4A6C15': 'mp_2expt', 'sub_4A5280': 'mp_zero', 'sub_4A5534': 'mp_grow'}"} |
|
sim_getnames_sock | f403d1d8b77541da522a0d0c3deff2e4197be390cb78692e79a5ebc1ff898374 | open-simh | simh | NA | int sim_getnames_sock (SOCKET sock, char **socknamebuf, char **peernamebuf)
{
struct sockaddr_storage sockname, peername;
#if defined (macintosh) || defined (__linux) || defined (__linux__) || \
defined (__APPLE__) || defined (__OpenBSD__) || \
defined(__NetBSD__) || defined(__FreeBSD__) || \
(defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)) || \
defined (__HAIKU__) || defined(__CYGWIN__)
socklen_t socknamesize = (socklen_t)sizeof(sockname);
socklen_t peernamesize = (socklen_t)sizeof(peername);
#elif defined (_WIN32) || defined (__EMX__) || \
(defined (__ALPHA) && defined (__unix__)) || \
defined (__hpux)
int socknamesize = (int)sizeof(sockname);
int peernamesize = (int)sizeof(peername);
#else
size_t socknamesize = sizeof(sockname);
size_t peernamesize = sizeof(peername);
#endif
char hostbuf[NI_MAXHOST+1];
char portbuf[NI_MAXSERV+1];
if (socknamebuf)
*socknamebuf = (char *)calloc(1, NI_MAXHOST+NI_MAXSERV+4);
if (peernamebuf)
*peernamebuf = (char *)calloc(1, NI_MAXHOST+NI_MAXSERV+4);
(void)getsockname (sock, (struct sockaddr *)&sockname, &socknamesize);
(void)getpeername (sock, (struct sockaddr *)&peername, &peernamesize);
if (socknamebuf != NULL) {
_sim_getaddrname ((struct sockaddr *)&sockname, (size_t)socknamesize, hostbuf, portbuf);
sprintf(*socknamebuf, "[%s]:%s", hostbuf, portbuf);
}
if (peernamebuf != NULL) {
_sim_getaddrname ((struct sockaddr *)&peername, (size_t)peernamesize, hostbuf, portbuf);
sprintf(*peernamebuf, "[%s]:%s", hostbuf, portbuf);
}
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_482DD7", "function_addr": 4730327, "binary_name": "f403d1d8b77541da522a0d0c3deff2e4197be390cb78692e79a5ebc1ff898374.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 560h"], [3, "mov [rbp+fd], edi"], [4, "mov [rbp+var_550], rsi"], [5, "mov [rbp+var_558], rdx"], [6, "mov [rbp+len], 80h"], [7, "mov [rbp+var_108], 80h"], [8, "cmp [rbp+var_550], 0"], [9, "jz short loc_482E30"], [10, "mov esi, 425h"], [11, "mov edi, 1"], [12, "call _calloc"], [13, "mov rdx, rax"], [14, "mov rax, [rbp+var_550]"], [15, "mov [rax], rdx"], [16, "cmp [rbp+var_558], 0"], [17, "jz short loc_482E56"], [18, "mov esi, 425h"], [19, "mov edi, 1"], [20, "call _calloc"], [21, "mov rdx, rax"], [22, "mov rax, [rbp+var_558]"], [23, "mov [rax], rdx"], [24, "lea rax, [rbp+addr]"], [25, "mov rcx, rax"], [26, "lea rdx, [rbp+len]"], [27, "mov eax, [rbp+fd]"], [28, "mov rsi, rcx"], [29, "mov edi, eax"], [30, "call _getsockname"], [31, "lea rax, [rbp+var_100]"], [32, "mov rcx, rax"], [33, "lea rdx, [rbp+var_108]"], [34, "mov eax, [rbp+fd]"], [35, "mov rsi, rcx"], [36, "mov edi, eax"], [37, "call _getpeername"], [38, "cmp [rbp+var_550], 0"], [39, "jz short loc_482EEB"], [40, "mov eax, [rbp+len]"], [41, "mov esi, eax"], [42, "lea rcx, [rbp+var_540]"], [43, "lea rdx, [rbp+var_510]"], [44, "lea rax, [rbp+addr]"], [45, "mov rdi, rax"], [46, "call sub_482CE9"], [47, "mov rax, [rbp+var_550]"], [48, "mov rax, [rax]"], [49, "lea rcx, [rbp+var_540]"], [50, "lea rdx, [rbp+var_510]"], [51, "mov esi, offset aSS_20"], [52, "mov rdi, rax"], [53, "mov eax, 0"], [54, "call _sprintf"], [55, "cmp [rbp+var_558], 0"], [56, "jz short loc_482F44"], [57, "mov eax, [rbp+var_108]"], [58, "mov esi, eax"], [59, "lea rcx, [rbp+var_540]"], [60, "lea rdx, [rbp+var_510]"], [61, "lea rax, [rbp+var_100]"], [62, "mov rdi, rax"], [63, "call sub_482CE9"], [64, "mov rax, [rbp+var_558]"], [65, "mov rax, [rax]"], [66, "lea rcx, [rbp+var_540]"], [67, "lea rdx, [rbp+var_510]"], [68, "mov esi, offset aSS_20"], [69, "mov rdi, rax"], [70, "mov eax, 0"], [71, "call _sprintf"], [72, "mov eax, 0"], [73, "leave"], [74, "retn"]], "data_dep": [[8, 4], [9, 8], [13, 12], [14, 4], [15, 14], [15, 13], [16, 5], [17, 16], [21, 20], [22, 5], [23, 22], [23, 21], [24, 14], [24, 22], [25, 24], [26, 21], [26, 13], [26, 6], [27, 3], [28, 25], [29, 27], [31, 30], [32, 31], [33, 26], [33, 7], [34, 3], [35, 32], [36, 34], [38, 4], [39, 38], [40, 6], [41, 40], [42, 32], [43, 33], [44, 40], [45, 44], [47, 4], [48, 15], [48, 23], [48, 47], [49, 42], [50, 43], [52, 48], [55, 5], [56, 55], [57, 7], [58, 57], [59, 32], [59, 49], [60, 50], [60, 33], [61, 57], [62, 61], [64, 5], [65, 64], [65, 15], [65, 23], [66, 59], [67, 60], [69, 65], [74, 72]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f403d1d8b77541da522a0d0c3deff2e4197be390cb78692e79a5ebc1ff898374_f403d1d8b77541da522a0d0c3deff2e4197be390cb78692e79a5ebc1ff898374.jsonl.gz", "strip_func_name": "sub_482DD7", "query": "\n\n\n__int64 __fastcall sub_482DD7(int a1, char **a2, char **a3)\n{\nchar v5[48]; // [rsp+20h] [rbp-540h] BYREF\nchar v6[1032]; // [rsp+50h] [rbp-510h] BYREF\nsocklen_t v7; // [rsp+458h] [rbp-108h] BYREF\nsocklen_t len; // [rsp+45Ch] [rbp-104h] BYREF\nstruct sockaddr v9; // [rsp+460h] [rbp-100h] BYREF\nstruct sockaddr addr; // [rsp+4E0h] [rbp-80h] BYREF\n\nlen = 128;\nv7 = 128;\nif ( a2 )\n*a2 = (char *)calloc(1uLL, 0x425uLL);\nif ( a3 )\n*a3 = (char *)calloc(1uLL, 0x425uLL);\ngetsockname(a1, &addr, &len);\ngetpeername(a1, &v9, &v7);\nif ( a2 )\n{\nsub_482CE9((__int64)&addr, len, v6, v5);\nsprintf(*a2, \"[%s]:%s\", v6, v5);\n}\nif ( a3 )\n{\nsub_482CE9((__int64)&v9, v7, v6, v5);\nsprintf(*a3, \"[%s]:%s\", v6, v5);\n}\nreturn 0LL;\n}\n\n\n\nQ:[a3,a1,a2,v5,v6,v7,len,v9,addr,sub_482DD7,sub_482CE9,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'peernamebuf', 'a1': 'sock', 'a2': 'socknamebuf', 'v5': 'portbuf', 'v6': 'hostbuf', 'v7': 'peernamesize', 'len': 'socknamesize', 'v9': 'peername', 'addr': 'sockname', 'sub_482DD7': 'sim_getnames_sock', 'sub_482CE9': '_sim_getaddrname'}"} |
|
gt_mm_write_uint32 | 063ddcb6b93f710a6859e9ff7c9b8b71767c1cbf3d7ad04e0e84f9003001e3af | smarco | gem3-mapper | NA | GT_INLINE void gt_mm_write_uint32(gt_mm* const mm,const uint32_t data) {
GT_MM_CHECK(mm);
GT_MM_CHECK_SEGMENT(mm);
*((uint32_t*)mm->cursor) = data;
mm->cursor += 4;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41924A", "function_addr": 4297290, "binary_name": "063ddcb6b93f710a6859e9ff7c9b8b71767c1cbf3d7ad04e0e84f9003001e3af.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_C], esi"], [4, "mov rax, [rbp+var_8]"], [5, "mov rax, [rax+18h]"], [6, "mov edx, [rbp+var_C]"], [7, "mov [rax], edx"], [8, "mov rax, [rbp+var_8]"], [9, "mov rax, [rax+18h]"], [10, "lea rdx, [rax+4]"], [11, "mov rax, [rbp+var_8]"], [12, "mov [rax+18h], rdx"], [13, "nop"], [14, "pop rbp"], [15, "retn"]], "data_dep": [[4, 2], [5, 4], [6, 3], [7, 6], [7, 5], [8, 2], [9, 8], [9, 7], [10, 7], [10, 6], [10, 9], [11, 2], [12, 11], [12, 10], [14, 0], [15, 11]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/063ddcb6b93f710a6859e9ff7c9b8b71767c1cbf3d7ad04e0e84f9003001e3af_063ddcb6b93f710a6859e9ff7c9b8b71767c1cbf3d7ad04e0e84f9003001e3af.jsonl.gz", "strip_func_name": "sub_41924A", "query": "\n\n\n__int64 __fastcall sub_41924A(__int64 a1, int a2)\n{\n__int64 result; // rax\n\n**(_DWORD **)(a1 + 24) = a2;\nresult = a1;\n*(_QWORD *)(a1 + 24) += 4LL;\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_41924A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'mm', 'a2': 'data', 'sub_41924A': 'gt_mm_write_uint32'}"} |
|
HbnLineReaderPosition | 2e41131efdc31893b1e9cfe634b3497205fe890eb5cb06161fcc58fe784adeba | xiaochuanle | MECAT2 | NA | size_t HbnLineReaderPosition(const HbnLineReader* reader)
{
return HbnBufferedLineReaderPosition(reader);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_414661", "function_addr": 4277857, "binary_name": "2e41131efdc31893b1e9cfe634b3497205fe890eb5cb06161fcc58fe784adeba.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_4145BE"], [7, "leave"], [8, "retn"]], "data_dep": [[4, 3], [5, 4], [8, 6]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2e41131efdc31893b1e9cfe634b3497205fe890eb5cb06161fcc58fe784adeba_2e41131efdc31893b1e9cfe634b3497205fe890eb5cb06161fcc58fe784adeba.jsonl.gz", "strip_func_name": "sub_414661", "query": "\n\n\n__int64 __fastcall sub_414661(__int64 a1)\n{\nreturn sub_4145BE(a1);\n}\n\n\n\nQ:[a1,sub_414661,sub_4145BE,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'reader', 'sub_414661': 'HbnLineReaderPosition', 'sub_4145BE': 'HbnBufferedLineReaderPosition'}"} |
|
LZ4_saveDict | bd29eb06c6bd9ce786a5f0493409644ae32860426c0c5797271d83ef2d25ebcc | powturbo | TurboPFor-Integer-Compression | NA | int LZ4_saveDict (LZ4_stream_t* LZ4_dict, char* safeBuffer, int dictSize)
{
LZ4_stream_t_internal* const dict = &LZ4_dict->internal_donotuse;
DEBUGLOG(5, "LZ4_saveDict : dictSize=%i, safeBuffer=%p", dictSize, safeBuffer);
if ((U32)dictSize > 64 KB) { dictSize = 64 KB; } /* useless to define a dictionary > 64 KB */
if ((U32)dictSize > dict->dictSize) { dictSize = (int)dict->dictSize; }
if (safeBuffer == NULL) assert(dictSize == 0);
if (dictSize > 0) {
const BYTE* const previousDictEnd = dict->dictionary + dict->dictSize;
assert(dict->dictionary);
LZ4_memmove(safeBuffer, previousDictEnd - dictSize, (size_t)dictSize);
}
dict->dictionary = (const BYTE*)safeBuffer;
dict->dictSize = (U32)dictSize;
return dictSize;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_438774", "function_addr": 4425588, "binary_name": "bd29eb06c6bd9ce786a5f0493409644ae32860426c0c5797271d83ef2d25ebcc.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+dest], rsi"], [5, "mov [rbp+var_24], edx"], [6, "mov rax, [rbp+var_18]"], [7, "mov [rbp+var_8], rax"], [8, "mov eax, [rbp+var_24]"], [9, "cmp eax, 10000h"], [10, "jbe short loc_4387A0"], [11, "mov [rbp+var_24], 10000h"], [12, "mov rax, [rbp+var_8]"], [13, "mov edx, [rax+4018h]"], [14, "mov eax, [rbp+var_24]"], [15, "cmp edx, eax"], [16, "jnb short loc_4387BE"], [17, "mov rax, [rbp+var_8]"], [18, "mov eax, [rax+4018h]"], [19, "mov [rbp+var_24], eax"], [20, "cmp [rbp+var_24], 0"], [21, "jle short loc_438809"], [22, "mov rax, [rbp+var_8]"], [23, "mov rdx, [rax+4000h]"], [24, "mov rax, [rbp+var_8]"], [25, "mov eax, [rax+4018h]"], [26, "mov eax, eax"], [27, "add rax, rdx"], [28, "mov [rbp+var_10], rax"], [29, "mov eax, [rbp+var_24]"], [30, "movsxd rdx, eax"], [31, "mov eax, [rbp+var_24]"], [32, "cdqe"], [33, "neg rax"], [34, "mov rcx, rax"], [35, "mov rax, [rbp+var_10]"], [36, "add rcx, rax"], [37, "mov rax, [rbp+dest]"], [38, "mov rsi, rcx"], [39, "mov rdi, rax"], [40, "call _memmove"], [41, "mov rax, [rbp+var_8]"], [42, "mov rdx, [rbp+dest]"], [43, "mov [rax+4000h], rdx"], [44, "mov edx, [rbp+var_24]"], [45, "mov rax, [rbp+var_8]"], [46, "mov [rax+4018h], edx"], [47, "mov eax, [rbp+var_24]"], [48, "leave"], [49, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 5], [9, 8], [10, 9], [12, 7], [13, 12], [14, 5], [14, 11], [15, 14], [15, 13], [16, 15], [17, 7], [18, 17], [19, 18], [20, 5], [20, 11], [20, 19], [21, 20], [22, 7], [23, 22], [24, 7], [25, 24], [26, 25], [27, 23], [27, 26], [28, 27], [29, 19], [29, 5], [29, 11], [30, 29], [31, 5], [31, 11], [31, 19], [33, 31], [34, 33], [35, 28], [36, 34], [36, 35], [37, 4], [38, 36], [39, 37], [41, 7], [42, 4], [43, 42], [43, 41], [44, 5], [44, 11], [44, 19], [45, 7], [46, 45], [46, 44], [47, 19], [47, 5], [47, 11], [49, 47]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/bd29eb06c6bd9ce786a5f0493409644ae32860426c0c5797271d83ef2d25ebcc_bd29eb06c6bd9ce786a5f0493409644ae32860426c0c5797271d83ef2d25ebcc.jsonl.gz", "strip_func_name": "sub_438774", "query": "\n\n\n__int64 __fastcall sub_438774(__int64 a1, void *a2, unsigned int a3)\n{\nint v4; // [rsp+Ch] [rbp-24h]\n\nv4 = a3;\nif ( a3 > 0x10000 )\nv4 = 0x10000;\nif ( *(_DWORD *)(a1 + 16408) < (unsigned int)v4 )\nv4 = *(_DWORD *)(a1 + 16408);\nif ( v4 > 0 )\nmemmove(a2, (const void *)(*(_QWORD *)(a1 + 0x4000) + *(unsigned int *)(a1 + 16408) - v4), v4);\n*(_QWORD *)(a1 + 0x4000) = a2;\n*(_DWORD *)(a1 + 16408) = v4;\nreturn (unsigned int)v4;\n}\n\n\n\nQ:[a3,a1,a2,v4,sub_438774,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'dictSize', 'a1': 'LZ4_dict', 'a2': 'safeBuffer', 'v4': 'dictSizea', 'sub_438774': 'LZ4_saveDict'}"} |
|
_loadEnviron | efec0669d8928f35c10d441625aa516e9c89e71dc034afe38aaa2fe73d307505 | klange | ponyos | NA | static void _loadEnviron(KrkInstance * module) {
/* Create a new class to subclass `dict` */
KrkString * className = S("_Environ");
krk_push(OBJECT_VAL(className));
Environ = krk_newClass(className, vm.baseClasses->dictClass);
krk_attachNamedObject(&module->fields, "_Environ", (KrkObj*)Environ);
krk_pop(); /* className */
/* Add our set method that should also call dict's set method */
BIND_METHOD(Environ,__setitem__);
BIND_METHOD(Environ,__delitem__);
krk_finalizeClass(Environ);
/* Start with an empty dictionary */
KrkInstance * environObj = AS_INSTANCE(krk_dict_of(0,NULL,0));
krk_push(OBJECT_VAL(environObj));
/* Transform it into an _Environ */
environObj->_class = Environ;
/* And attach it to the module */
krk_attachNamedObject(&module->fields, "environ", (KrkObj*)environObj);
krk_pop();
/* Now load the environment into it */
if (!environ) return; /* Empty environment */
char ** env = environ;
for (; *env; env++) {
const char * equals = strchr(*env, '=');
if (!equals) continue;
size_t len = strlen(*env);
size_t keyLen = equals - *env;
size_t valLen = len - keyLen - 1;
KrkValue key = OBJECT_VAL(krk_copyString(*env, keyLen));
krk_push(key);
KrkValue val = OBJECT_VAL(krk_copyString(equals+1, valLen));
krk_push(val);
krk_tableSet(AS_DICT(OBJECT_VAL(environObj)), key, val);
krk_pop(); /* val */
krk_pop(); /* key */
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_46B9EC", "function_addr": 4635116, "binary_name": "efec0669d8928f35c10d441625aa516e9c89e71dc034afe38aaa2fe73d307505.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_58], rdi"], [4, "mov esi, 8"], [5, "mov edi, offset aEnviron_1"], [6, "call krk_copyString"], [7, "mov [rbp+var_10], rax"], [8, "mov rax, [rbp+var_10]"], [9, "mov rdx, 0FFFFFFFFFFFFh"], [10, "and rdx, rax"], [11, "mov rax, 7FFD000000000000h"], [12, "or rax, rdx"], [13, "mov rdi, rax"], [14, "call krk_push"], [15, "mov rax, cs:qword_496B18"], [16, "mov rdx, [rax+90h]"], [17, "mov rax, [rbp+var_10]"], [18, "mov rsi, rdx"], [19, "mov rdi, rax"], [20, "call krk_newClass"], [21, "mov cs:qword_496E18, rax"], [22, "mov rax, cs:qword_496E18"], [23, "mov rdx, [rbp+var_58]"], [24, "lea rcx, [rdx+20h]"], [25, "mov rdx, rax"], [26, "mov esi, offset aEnviron_1"], [27, "mov rdi, rcx"], [28, "call krk_attachNamedObject"], [29, "call krk_pop"], [30, "mov rax, cs:qword_496E18"], [31, "add rax, 38h "], [32, "mov edx, offset sub_46B32A"], [33, "mov esi, offset aSetitem_3"], [34, "mov rdi, rax"], [35, "call krk_defineNative"], [36, "mov rax, cs:qword_496E18"], [37, "add rax, 38h "], [38, "mov edx, offset sub_46B757"], [39, "mov esi, offset aDelitem_2"], [40, "mov rdi, rax"], [41, "call krk_defineNative"], [42, "mov rax, cs:qword_496E18"], [43, "mov rdi, rax"], [44, "call krk_finalizeClass"], [45, "mov edx, 0"], [46, "mov esi, 0"], [47, "mov edi, 0"], [48, "call krk_dict_of"], [49, "mov rdx, 0FFFFFFFFFFFFh"], [50, "and rax, rdx"], [51, "mov [rbp+var_18], rax"], [52, "mov rax, [rbp+var_18]"], [53, "mov rdx, 0FFFFFFFFFFFFh"], [54, "and rdx, rax"], [55, "mov rax, 7FFD000000000000h"], [56, "or rax, rdx"], [57, "mov rdi, rax"], [58, "call krk_push"], [59, "mov rdx, cs:qword_496E18"], [60, "mov rax, [rbp+var_18]"], [61, "mov [rax+18h], rdx"], [62, "mov rax, [rbp+var_58]"], [63, "lea rcx, [rax+20h]"], [64, "mov rax, [rbp+var_18]"], [65, "mov rdx, rax"], [66, "mov esi, offset aEnviron_2"], [67, "mov rdi, rcx"], [68, "call krk_attachNamedObject"], [69, "call krk_pop"], [70, "mov rax, cs:environ"], [71, "test rax, rax"], [72, "jz loc_46BC88"], [73, "mov rax, cs:environ"], [74, "mov [rbp+var_8], rax"], [75, "jmp loc_46BC76"], [76, "mov rax, [rbp+var_8]"], [77, "mov rax, [rax]"], [78, "mov esi, 3Dh "], [79, "mov rdi, rax"], [80, "call _strchr"], [81, "mov [rbp+var_20], rax"], [82, "cmp [rbp+var_20], 0"], [83, "jz loc_46BC70"], [84, "mov rax, [rbp+var_8]"], [85, "mov rax, [rax]"], [86, "mov rdi, rax"], [87, "call _strlen"], [88, "mov [rbp+var_28], rax"], [89, "mov rax, [rbp+var_8]"], [90, "mov rdx, [rax]"], [91, "mov rax, [rbp+var_20]"], [92, "sub rax, rdx"], [93, "mov [rbp+var_30], rax"], [94, "mov rax, [rbp+var_28]"], [95, "sub rax, [rbp+var_30]"], [96, "sub rax, 1"], [97, "mov [rbp+var_38], rax"], [98, "mov rax, [rbp+var_8]"], [99, "mov rax, [rax]"], [100, "mov rdx, [rbp+var_30]"], [101, "mov rsi, rdx"], [102, "mov rdi, rax"], [103, "call krk_copyString"], [104, "mov rdx, rax"], [105, "mov rax, 0FFFFFFFFFFFFh"], [106, "and rdx, rax"], [107, "mov rax, 7FFD000000000000h"], [108, "or rax, rdx"], [109, "mov [rbp+var_40], rax"], [110, "mov rax, [rbp+var_40]"], [111, "mov rdi, rax"], [112, "call krk_push"], [113, "mov rax, [rbp+var_20]"], [114, "lea rdx, [rax+1]"], [115, "mov rax, [rbp+var_38]"], [116, "mov rsi, rax"], [117, "mov rdi, rdx"], [118, "call krk_copyString"], [119, "mov rdx, rax"], [120, "mov rax, 0FFFFFFFFFFFFh"], [121, "and rdx, rax"], [122, "mov rax, 7FFD000000000000h"], [123, "or rax, rdx"], [124, "mov [rbp+var_48], rax"], [125, "mov rax, [rbp+var_48]"], [126, "mov rdi, rax"], [127, "call krk_push"], [128, "mov rax, [rbp+var_18]"], [129, "mov rdx, 0FFFFFFFFFFFFh"], [130, "and rax, rdx"], [131, "lea rcx, [rax+38h]"], [132, "mov rdx, [rbp+var_48]"], [133, "mov rax, [rbp+var_40]"], [134, "mov rsi, rax"], [135, "mov rdi, rcx"], [136, "call krk_tableSet"], [137, "call krk_pop"], [138, "call krk_pop"], [139, "jmp short loc_46BC71"], [140, "nop"], [141, "add [rbp+var_8], 8"], [142, "mov rax, [rbp+var_8]"], [143, "mov rax, [rax]"], [144, "test rax, rax"], [145, "jnz loc_46BB5D"], [146, "jmp short locret_46BC89"], [147, "nop"], [148, "leave"], [149, "retn"]], "data_dep": [[7, 6], [8, 7], [10, 8], [10, 9], [12, 10], [12, 11], [13, 12], [16, 15], [17, 7], [18, 16], [19, 17], [21, 20], [22, 21], [23, 3], [24, 23], [25, 22], [27, 24], [30, 21], [31, 30], [34, 31], [36, 21], [37, 36], [40, 37], [42, 21], [43, 42], [50, 49], [50, 48], [51, 50], [52, 51], [54, 53], [54, 52], [56, 55], [56, 54], [57, 56], [59, 21], [60, 51], [61, 60], [61, 59], [62, 3], [63, 61], [63, 24], [63, 62], [64, 51], [65, 64], [67, 63], [71, 70], [72, 71], [74, 73], [76, 74], [76, 141], [77, 76], [77, 61], [79, 77], [81, 80], [82, 81], [83, 82], [84, 141], [84, 74], [85, 84], [85, 61], [86, 85], [88, 87], [89, 141], [89, 74], [90, 89], [90, 61], [91, 81], [92, 90], [92, 91], [93, 92], [94, 88], [95, 93], [95, 94], [96, 95], [97, 96], [98, 141], [98, 74], [99, 98], [99, 61], [100, 93], [101, 100], [102, 99], [104, 103], [106, 104], [106, 105], [108, 107], [108, 106], [109, 108], [110, 109], [111, 110], [113, 81], [114, 113], [114, 106], [114, 61], [115, 97], [116, 115], [117, 114], [119, 118], [121, 119], [121, 120], [123, 121], [123, 122], [124, 123], [125, 124], [126, 125], [128, 51], [130, 128], [130, 129], [131, 61], [131, 63], [131, 131], [131, 130], [132, 124], [133, 109], [134, 133], [135, 131], [141, 74], [141, 141], [142, 141], [142, 74], [143, 142], [143, 61], [144, 143], [145, 144], [149, 71], [149, 144]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_46B9EC", "query": "\n\n\nconst char *__fastcall sub_46B9EC(__int64 a1)\n{\nint v1; // ecx\nint v2; // er8\nint v3; // er9\nconst char *result; // rax\n__int64 v5; // [rsp+18h] [rbp-48h]\n__int64 v6; // [rsp+20h] [rbp-40h]\nunsigned __int64 v7; // [rsp+28h] [rbp-38h]\nchar *v8; // [rsp+40h] [rbp-20h]\n__int64 v9; // [rsp+48h] [rbp-18h]\n__int64 v10; // [rsp+50h] [rbp-10h]\nconst char **i; // [rsp+58h] [rbp-8h]\n\nv10 = krk_copyString((__int64)\"_Environ\", 8uLL);\nkrk_push(v10 & 0xFFFFFFFFFFFFLL | 0x7FFD000000000000LL);\nqword_496E18 = (__int64)krk_newClass(v10, *(_QWORD **)(qword_496B18 + 144));\nkrk_attachNamedObject((_QWORD *)(a1 + 32), \"_Environ\", qword_496E18);\nkrk_pop();\nkrk_defineNative(qword_496E18 + 56, (__int64)\"__setitem__\", (__int64)sub_46B32A);\nkrk_defineNative(qword_496E18 + 56, (__int64)\"__delitem__\", (__int64)sub_46B757);\nkrk_finalizeClass((_QWORD *)qword_496E18);\nv9 = krk_dict_of(0, 0LL, 0, v1, v2, v3) & 0xFFFFFFFFFFFFLL;\nkrk_push(v9 | 0x7FFD000000000000LL);\n*(_QWORD *)(v9 + 24) = qword_496E18;\nkrk_attachNamedObject((_QWORD *)(a1 + 32), \"environ\", v9);\nkrk_pop();\nresult = (const char *)environ;\nif ( environ )\n{\nfor ( i = (const char **)environ; ; ++i )\n{\nresult = *i;\nif ( !*i )\nbreak;\nv8 = strchr(*i, 61);\nif ( v8 )\n{\nv7 = strlen(*i) - (v8 - *i) - 1;\nv6 = krk_copyString((__int64)*i, v8 - *i) & 0xFFFFFFFFFFFFLL | 0x7FFD000000000000LL;\nkrk_push(v6);\nv5 = krk_copyString((__int64)(v8 + 1), v7) & 0xFFFFFFFFFFFFLL | 0x7FFD000000000000LL;\nkrk_push(v5);\nkrk_tableSet((_QWORD *)((v9 & 0xFFFFFFFFFFFFLL) + 56), v6, v5);\nkrk_pop();\nkrk_pop();\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,v5,v6,v7,v8,v9,v10,i,sub_46B9EC,sub_46B32A,sub_46B757,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'module', 'v5': 'val', 'v6': 'key', 'v7': 'valLen', 'v8': 'equals', 'v9': 'environObj', 'v10': 'className', 'i': 'env', 'sub_46B9EC': '_loadEnviron', 'sub_46B32A': '_Environ___setitem__', 'sub_46B757': '_Environ___delitem__'}"} |
|
smartypants_cb__parens | 38073ba7356dfc89ed95cf02b4680897fb1e0cee1ddf7cb62bfcf6b58f2dc520 | sschober | qarkdown | NA | static size_t
smartypants_cb__parens(hoedown_buffer *ob, struct smartypants_data *smrt, uint8_t previous_char, const uint8_t *text, size_t size)
{
if (size >= 3) {
uint8_t t1 = tolower(text[1]);
uint8_t t2 = tolower(text[2]);
if (t1 == 'c' && t2 == ')') {
HOEDOWN_BUFPUTSL(ob, "©");
return 2;
}
if (t1 == 'r' && t2 == ')') {
HOEDOWN_BUFPUTSL(ob, "®");
return 2;
}
if (size >= 4 && t1 == 't' && t2 == 'm' && text[3] == ')') {
HOEDOWN_BUFPUTSL(ob, "™");
return 3;
}
}
hoedown_buffer_putc(ob, text[0]);
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41286A", "function_addr": 4270186, "binary_name": "38073ba7356dfc89ed95cf02b4680897fb1e0cee1ddf7cb62bfcf6b58f2dc520.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 eax, edx"], [6, "mov [rbp+var_30], rcx"], [7, "mov [rbp+var_38], r8"], [8, "mov [rbp+var_24], al"], [9, "cmp [rbp+var_38], 2"], [10, "jbe loc_41295C"], [11, "mov rax, [rbp+var_30]"], [12, "add rax, 1"], [13, "movzx eax, byte ptr [rax]"], [14, "movzx eax, al"], [15, "mov edi, eax"], [16, "call _tolower"], [17, "mov [rbp+var_1], al"], [18, "mov rax, [rbp+var_30]"], [19, "add rax, 2"], [20, "movzx eax, byte ptr [rax]"], [21, "movzx eax, al"], [22, "mov edi, eax"], [23, "call _tolower"], [24, "mov [rbp+var_2], al"], [25, "cmp [rbp+var_1], 63h "], [26, "jnz short loc_4128F0"], [27, "cmp [rbp+var_2], 29h "], [28, "jnz short loc_4128F0"], [29, "mov rax, [rbp+var_18]"], [30, "mov edx, 6"], [31, "lea rsi, aCopy"], [32, "mov rdi, rax"], [33, "call sub_402A10"], [34, "mov eax, 2"], [35, "jmp locret_412979"], [36, "cmp [rbp+var_1], 72h "], [37, "jnz short loc_41291B"], [38, "cmp [rbp+var_2], 29h "], [39, "jnz short loc_41291B"], [40, "mov rax, [rbp+var_18]"], [41, "mov edx, 5"], [42, "lea rsi, aReg"], [43, "mov rdi, rax"], [44, "call sub_402A10"], [45, "mov eax, 2"], [46, "jmp short locret_412979"], [47, "cmp [rbp+var_38], 3"], [48, "jbe short loc_41295C"], [49, "cmp [rbp+var_1], 74h "], [50, "jnz short loc_41295C"], [51, "cmp [rbp+var_2], 6Dh "], [52, "jnz short loc_41295C"], [53, "mov rax, [rbp+var_30]"], [54, "add rax, 3"], [55, "movzx eax, byte ptr [rax]"], [56, "cmp al, 29h "], [57, "jnz short loc_41295C"], [58, "mov rax, [rbp+var_18]"], [59, "mov edx, 7"], [60, "lea rsi, aTrade"], [61, "mov rdi, rax"], [62, "call sub_402A10"], [63, "mov eax, 3"], [64, "jmp short locret_412979"], [65, "mov rax, [rbp+var_30]"], [66, "movzx eax, byte ptr [rax]"], [67, "movzx edx, al"], [68, "mov rax, [rbp+var_18]"], [69, "mov esi, edx"], [70, "mov rdi, rax"], [71, "call sub_402B06"], [72, "mov eax, 0"], [73, "leave"], [74, "retn"]], "data_dep": [[8, 5], [9, 7], [10, 9], [11, 6], [12, 11], [13, 12], [14, 13], [15, 14], [17, 16], [18, 6], [19, 18], [20, 19], [21, 20], [22, 21], [24, 23], [25, 17], [26, 25], [27, 24], [28, 27], [29, 3], [32, 29], [36, 17], [37, 36], [38, 24], [39, 38], [40, 3], [43, 40], [47, 7], [48, 47], [49, 17], [50, 49], [51, 24], [52, 51], [53, 6], [54, 53], [55, 54], [56, 55], [57, 56], [58, 3], [61, 58], [65, 6], [66, 65], [67, 66], [68, 3], [69, 67], [70, 68], [74, 34], [74, 45], [74, 63], [74, 72]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/38073ba7356dfc89ed95cf02b4680897fb1e0cee1ddf7cb62bfcf6b58f2dc520_38073ba7356dfc89ed95cf02b4680897fb1e0cee1ddf7cb62bfcf6b58f2dc520.jsonl.gz", "strip_func_name": "sub_41286A", "query": "\n\n\n__int64 __fastcall sub_41286A(_QWORD *a1, __int64 a2, __int64 a3, char *a4, unsigned __int64 a5)\n{\n__int64 result; // rax\nchar v8; // [rsp+3Eh] [rbp-2h]\nchar v9; // [rsp+3Fh] [rbp-1h]\n\nif ( a5 <= 2 )\ngoto LABEL_13;\nv9 = tolower((unsigned __int8)a4[1]);\nv8 = tolower((unsigned __int8)a4[2]);\nif ( v9 == 99 && v8 == 41 )\n{\nsub_402A10(a1, \"©\", 6uLL);\nreturn 2LL;\n}\nif ( v9 == 114 && v8 == 41 )\n{\nsub_402A10(a1, \"®\", 5uLL);\nreturn 2LL;\n}\nif ( a5 > 3 && v9 == 116 && v8 == 109 && a4[3] == 41 )\n{\nsub_402A10(a1, \"™\", 7uLL);\nresult = 3LL;\n}\nelse\n{\nLABEL_13:\nsub_402B06(a1, *a4);\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a4,a1,a5,a2,a3,v8,sub_41286A,sub_402A10,sub_402B06,]\nAssistant: ", "hints": "[]", "response": "{'a4': 'text', 'a1': 'ob', 'a5': 'size', 'a2': 'smrt', 'a3': 'previous_char', 'v8': 't2', 'sub_41286A': 'smartypants_cb__parens', 'sub_402A10': 'hoedown_buffer_put', 'sub_402B06': 'hoedown_buffer_putc'}"} |
|
print_pos | dbd7436cf6a1ca8c98b79ba002a1525366ed3f2506782e26b4d7b2e609eb7753 | projecthorus | radiosonde_auto_rx | NA | static int print_pos(gpx_t *gpx, int csOK) {
int err, err2;
err = 0;
if (gpx->type == t_M10) {
err |= get_GPSweek(gpx);
err |= get_GPStime(gpx);
err |= get_GPSlat(gpx);
err |= get_GPSlon(gpx);
err |= get_GPSalt(gpx);
err2 = get_GPSvel(gpx);
}
else if (gpx->type == t_M10plus) {
err |= get_gtopGPStime(gpx);
err |= get_gtopGPSdate(gpx);
err |= get_gtopGPSpos(gpx);
err2 = get_gtopGPSvel(gpx);
}
else err = 0xFF;
if (!err) {
if (gpx->type == t_M10) {
Gps2Date(gpx->week, gpx->gpssec, &gpx->jahr, &gpx->monat, &gpx->tag);
}
gpx->T = get_Temp(gpx);
gpx->_RH = get_RH(gpx);
gpx->Ti = get_intTemp(gpx);
gpx->batV = get_BatV(gpx);
get_SN(gpx);
if ( !gpx->option.slt )
{
if (gpx->option.col) {
fprintf(stdout, col_TXT);
if (gpx->type == t_M10)
{
if (gpx->option.vbs >= 3) fprintf(stdout, " (W "col_GPSweek"%d"col_TXT") ", gpx->week);
fprintf(stdout, col_GPSTOW"%s"col_TXT" ", weekday[gpx->wday]);
}
fprintf(stdout, col_GPSdate"%04d-%02d-%02d"col_TXT" "col_GPSTOW"%02d:%02d:%06.3f"col_TXT" ",
gpx->jahr, gpx->monat, gpx->tag, gpx->std, gpx->min, gpx->sek);
fprintf(stdout, " lat: "col_GPSlat"%.5f"col_TXT" ", gpx->lat);
fprintf(stdout, " lon: "col_GPSlon"%.5f"col_TXT" ", gpx->lon);
fprintf(stdout, " alt: "col_GPSalt"%.2f"col_TXT" ", gpx->alt);
if (!err2) {
//if (gpx->option.vbs == 2) fprintf(stdout, " "col_GPSvel"(%.1f , %.1f : %.1f)"col_TXT" ", gpx->vx, gpx->vy, gpx->vD2);
fprintf(stdout, " vH: "col_GPSvel"%.1f"col_TXT" D: "col_GPSvel"%.1f"col_TXT" vV: "col_GPSvel"%.1f"col_TXT" ", gpx->vH, gpx->vD, gpx->vV);
}
if (gpx->option.vbs >= 2) {
fprintf(stdout, " SN: "col_SN"%s"col_TXT, gpx->SN);
}
if (gpx->option.vbs >= 2) {
fprintf(stdout, " # ");
if (csOK) fprintf(stdout, " "col_CSok"[OK]"col_TXT);
else fprintf(stdout, " "col_CSno"[NO]"col_TXT);
}
if (gpx->option.ptu && csOK) {
if (gpx->T > -270.0) fprintf(stdout, " T=%.1fC", gpx->T);
if (gpx->option.vbs >= 2) { if (gpx->_RH > -0.5) fprintf(stdout, " _RH=%.0f%%", gpx->_RH); }
if (gpx->option.vbs >= 3) {
float t2 = get_Tntc2(gpx);
float fq555 = get_TLC555freq(gpx);
fprintf(stdout, " (Ti:%.1fC)", gpx->Ti);
if (t2 > -270.0) fprintf(stdout, " (T2:%.1fC) (%.3fkHz)", t2, fq555/1e3);
}
}
if (gpx->option.vbs >= 3 && csOK) {
fprintf(stdout, " (bat:%.2fV)", gpx->batV);
}
fprintf(stdout, ANSI_COLOR_RESET"");
}
else {
if (gpx->type == t_M10)
{
if (gpx->option.vbs >= 3) fprintf(stdout, " (W %d) ", gpx->week);
fprintf(stdout, "%s ", weekday[gpx->wday]);
}
fprintf(stdout, "%04d-%02d-%02d %02d:%02d:%06.3f ",
gpx->jahr, gpx->monat, gpx->tag, gpx->std, gpx->min, gpx->sek);
fprintf(stdout, " lat: %.5f ", gpx->lat);
fprintf(stdout, " lon: %.5f ", gpx->lon);
fprintf(stdout, " alt: %.2f ", gpx->alt);
if (!err2) {
//if (gpx->option.vbs == 2) fprintf(stdout, " (%.1f , %.1f : %.1f) ", gpx->vx, gpx->vy, gpx->vD2);
fprintf(stdout, " vH: %.1f D: %.1f vV: %.1f ", gpx->vH, gpx->vD, gpx->vV);
}
if (gpx->option.vbs >= 2) {
fprintf(stdout, " SN: %s", gpx->SN);
}
if (gpx->option.vbs >= 2) {
fprintf(stdout, " # ");
if (csOK) fprintf(stdout, " [OK]"); else fprintf(stdout, " [NO]");
}
if (gpx->option.ptu && csOK) {
if (gpx->T > -270.0) fprintf(stdout, " T=%.1fC", gpx->T);
if (gpx->option.vbs >= 2) { if (gpx->_RH > -0.5) fprintf(stdout, " _RH=%.0f%%", gpx->_RH); }
if (gpx->option.vbs >= 3) {
float t2 = get_Tntc2(gpx);
float fq555 = get_TLC555freq(gpx);
fprintf(stdout, " (Ti:%.1fC)", gpx->Ti);
if (t2 > -270.0) fprintf(stdout, " (T2:%.1fC) (%.3fkHz)", t2, fq555/1e3);
}
}
if (gpx->option.vbs >= 3 && csOK) {
fprintf(stdout, " (bat:%.2fV)", gpx->batV);
}
}
fprintf(stdout, "\n");
}
if (gpx->option.jsn) {
// Print out telemetry data as JSON
if (csOK) {
char *ver_jsn = NULL;
int j;
char sn_id[4+12] = "M10-";
ui8_t aprs_id[4];
double sec_gps0 = (double)gpx->week*SECONDS_IN_WEEK + gpx->tow_ms/1e3;
// UTC = GPS - UTC_OFS (ab 1.1.2017: UTC_OFS=18sec)
int utc_s = gpx->gpssec - gpx->utc_ofs;
int utc_week = gpx->week;
int utc_jahr; int utc_monat; int utc_tag;
int utc_std; int utc_min; float utc_sek;
if (utc_s < 0) {
utc_week -= 1;
utc_s += 604800; // 604800sec = 1week
}
if (gpx->type == t_M10) {
Gps2Date(utc_week, utc_s, &utc_jahr, &utc_monat, &utc_tag);
utc_s %= (24*3600); // 86400sec = 1day
utc_std = utc_s/3600;
utc_min = (utc_s%3600)/60;
utc_sek = utc_s%60 + (gpx->tow_ms % 1000)/1000.0;
}
else {
utc_jahr = gpx->jahr;
utc_monat = gpx->monat;
utc_tag = gpx->tag;
utc_std = gpx->std;
utc_min = gpx->min;
utc_sek = gpx->sek;
}
strncpy(sn_id+4, gpx->SN, 12);
sn_id[15] = '\0';
for (j = 0; sn_id[j]; j++) { if (sn_id[j] == ' ') sn_id[j] = '-'; }
fprintf(stdout, "{ \"type\": \"%s\"", "M10");
fprintf(stdout, ", \"frame\": %lu, ", (unsigned long)(sec_gps0+0.5));
fprintf(stdout, "\"id\": \"%s\", \"datetime\": \"%04d-%02d-%02dT%02d:%02d:%06.3fZ\", \"lat\": %.5f, \"lon\": %.5f, \"alt\": %.5f, \"vel_h\": %.5f, \"heading\": %.5f, \"vel_v\": %.5f",
sn_id, utc_jahr, utc_monat, utc_tag, utc_std, utc_min, utc_sek, gpx->lat, gpx->lon, gpx->alt, gpx->vH, gpx->vD, gpx->vV);
if (gpx->type == t_M10) {
fprintf(stdout, ", \"sats\": %d", gpx->numSV);
}
// APRS id, 9 characters
aprs_id[0] = gpx->frame_bytes[pos_SN+2];
aprs_id[1] = gpx->frame_bytes[pos_SN] & 0xF;
aprs_id[2] = gpx->frame_bytes[pos_SN+4];
aprs_id[3] = gpx->frame_bytes[pos_SN+3];
fprintf(stdout, ", \"aprsid\": \"ME%02X%1X%02X%02X\"", aprs_id[0], aprs_id[1], aprs_id[2], aprs_id[3]);
fprintf(stdout, ", \"batt\": %.2f", gpx->batV);
// temperature (and humidity)
if (gpx->option.ptu) {
if (gpx->T > -273.0) fprintf(stdout, ", \"temp\": %.1f", gpx->T);
if (gpx->option.vbs >= 2) {
if (gpx->_RH > -0.5) fprintf(stdout, ", \"humidity\": %.1f", gpx->_RH);
}
}
fprintf(stdout, ", \"rawid\": \"M10_%02X%02X%02X%02X%02X\"", gpx->frame_bytes[pos_SN], gpx->frame_bytes[pos_SN+1],
gpx->frame_bytes[pos_SN+2], gpx->frame_bytes[pos_SN+3], gpx->frame_bytes[pos_SN+4]); // gpx->type
fprintf(stdout, ", \"subtype\": \"0x%02X\"", gpx->type);
if (gpx->jsn_freq > 0) {
fprintf(stdout, ", \"freq\": %d", gpx->jsn_freq);
}
// Reference time/position (M10 time ref UTC only for json)
fprintf(stdout, ", \"ref_datetime\": \"%s\"", "UTC" ); // {"GPS", "UTC"} GPS-UTC=leap_sec
fprintf(stdout, ", \"ref_position\": \"%s\"", "GPS" ); // {"GPS", "MSL"} GPS=ellipsoid , MSL=geoid
fprintf(stdout, ", \"gpsutc_leapsec\": %d", gpx->utc_ofs); // GPS-UTC offset, utc_s = gpx->gpssec - gpx->utc_ofs;
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif
if (ver_jsn && *ver_jsn != '\0') fprintf(stdout, ", \"version\": \"%s\"", ver_jsn);
fprintf(stdout, " }\n");
fprintf(stdout, "\n");
}
}
}
return err;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402E2B", "function_addr": 4206123, "binary_name": "dbd7436cf6a1ca8c98b79ba002a1525366ed3f2506782e26b4d7b2e609eb7753.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 70h"], [3, "mov [rbp+var_68], rdi"], [4, "mov [rbp+var_6C], esi"], [5, "mov [rbp+var_4], 0"], [6, "mov rax, [rbp+var_68]"], [7, "movzx eax, byte ptr [rax+4F3h]"], [8, "cmp al, 9Fh"], [9, "jnz short loc_402EAC"], [10, "mov rax, [rbp+var_68]"], [11, "mov rdi, rax"], [12, "call sub_401594"], [13, "or [rbp+var_4], eax"], [14, "mov rax, [rbp+var_68]"], [15, "mov rdi, rax"], [16, "call sub_401649"], [17, "or [rbp+var_4], eax"], [18, "mov rax, [rbp+var_68]"], [19, "mov rdi, rax"], [20, "call sub_40184C"], [21, "or [rbp+var_4], eax"], [22, "mov rax, [rbp+var_68]"], [23, "mov rdi, rax"], [24, "call sub_4018F9"], [25, "or [rbp+var_4], eax"], [26, "mov rax, [rbp+var_68]"], [27, "mov rdi, rax"], [28, "call sub_4019A6"], [29, "or [rbp+var_4], eax"], [30, "mov rax, [rbp+var_68]"], [31, "mov rdi, rax"], [32, "call sub_401A53"], [33, "mov [rbp+var_8], eax"], [34, "jmp short loc_402F00"], [35, "mov rax, [rbp+var_68]"], [36, "movzx eax, byte ptr [rax+4F3h]"], [37, "cmp al, 0AFh"], [38, "jnz short loc_402EF9"], [39, "mov rax, [rbp+var_68]"], [40, "mov rdi, rax"], [41, "call sub_4021CC"], [42, "or [rbp+var_4], eax"], [43, "mov rax, [rbp+var_68]"], [44, "mov rdi, rax"], [45, "call sub_4022DF"], [46, "or [rbp+var_4], eax"], [47, "mov rax, [rbp+var_68]"], [48, "mov rdi, rax"], [49, "call sub_401E07"], [50, "or [rbp+var_4], eax"], [51, "mov rax, [rbp+var_68]"], [52, "mov rdi, rax"], [53, "call sub_401FC4"], [54, "mov [rbp+var_8], eax"], [55, "jmp short loc_402F00"], [56, "mov [rbp+var_4], 0FFh"], [57, "cmp [rbp+var_4], 0"], [58, "jnz loc_403EB5"], [59, "mov rax, [rbp+var_68]"], [60, "movzx eax, byte ptr [rax+4F3h]"], [61, "cmp al, 9Fh"], [62, "jnz short loc_402F4E"], [63, "mov rax, [rbp+var_68]"], [64, "lea rdi, [rax+14h]"], [65, "mov rax, [rbp+var_68]"], [66, "lea rcx, [rax+10h]"], [67, "mov rax, [rbp+var_68]"], [68, "lea rdx, [rax+0Ch]"], [69, "mov rax, [rbp+var_68]"], [70, "mov eax, [rax+8]"], [71, "movsxd rsi, eax"], [72, "mov rax, [rbp+var_68]"], [73, "mov eax, [rax]"], [74, "cdqe"], [75, "mov r8, rdi"], [76, "mov rdi, rax"], [77, "call sub_4012F2"], [78, "mov rax, [rbp+var_68]"], [79, "mov rdi, rax"], [80, "call sub_4024F8"], [81, "movd eax, xmm0"], [82, "mov rdx, [rbp+var_68]"], [83, "mov [rdx+70h], eax"], [84, "mov rax, [rbp+var_68]"], [85, "mov rdi, rax"], [86, "call sub_402D2D"], [87, "movd eax, xmm0"], [88, "mov rdx, [rbp+var_68]"], [89, "mov [rdx+74h], eax"], [90, "mov rax, [rbp+var_68]"], [91, "mov rdi, rax"], [92, "call sub_402801"], [93, "movd eax, xmm0"], [94, "mov rdx, [rbp+var_68]"], [95, "mov [rdx+78h], eax"], [96, "mov rax, [rbp+var_68]"], [97, "mov rdi, rax"], [98, "call sub_402D7F"], [99, "cvtsd2ss xmm0, xmm0"], [100, "mov rax, [rbp+var_68]"], [101, "movss dword ptr [rax+7Ch], xmm0"], [102, "mov rax, [rbp+var_68]"], [103, "mov rdi, rax"], [104, "call sub_401CDF"], [105, "mov rax, [rbp+var_68]"], [106, "movzx eax, byte ptr [rax+4F2h]"], [107, "test al, al"], [108, "jnz loc_403805"], [109, "mov rax, [rbp+var_68]"], [110, "movzx eax, byte ptr [rax+4F0h]"], [111, "test al, al"], [112, "jz loc_403408"], [113, "mov rax, cs:stdout"], [114, "mov rcx, rax"], [115, "mov edx, 0Bh"], [116, "mov esi, 1"], [117, "mov edi, offset a385244m"], [118, "call _fwrite"], [119, "mov rax, [rbp+var_68]"], [120, "movzx eax, byte ptr [rax+4F3h]"], [121, "cmp al, 9Fh"], [122, "jnz short loc_403066"], [123, "mov rax, [rbp+var_68]"], [124, "movzx eax, byte ptr [rax+4E8h]"], [125, "cmp al, 2"], [126, "jle short loc_403039"], [127, "mov rax, [rbp+var_68]"], [128, "mov edx, [rax]"], [129, "mov rax, cs:stdout"], [130, "mov esi, offset aW38520mD385244"], [131, "mov rdi, rax"], [132, "mov eax, 0"], [133, "call _fprintf"], [134, "mov rax, [rbp+var_68]"], [135, "mov eax, [rax+18h]"], [136, "cdqe"], [137, "shl rax, 2"], [138, "lea rdx, aSun[rax]"], [139, "mov rax, cs:stdout"], [140, "mov esi, offset a38527mS385244m"], [141, "mov rdi, rax"], [142, "mov eax, 0"], [143, "call _fprintf"], [144, "mov rax, [rbp+var_68]"], [145, "movss xmm0, dword ptr [rax+24h]"], [146, "pxor xmm7, xmm7"], [147, "cvtss2sd xmm7, xmm0"], [148, "movq rsi, xmm7"], [149, "mov rax, [rbp+var_68]"], [150, "mov edi, [rax+20h]"], [151, "mov rax, [rbp+var_68]"], [152, "mov r9d, [rax+1Ch]"], [153, "mov rax, [rbp+var_68]"], [154, "mov r8d, [rax+14h]"], [155, "mov rax, [rbp+var_68]"], [156, "mov ecx, [rax+10h]"], [157, "mov rax, [rbp+var_68]"], [158, "mov edx, [rax+0Ch]"], [159, "mov rax, cs:stdout"], [160, "sub rsp, 8"], [161, "push rdi"], [162, "movq xmm0, rsi"], [163, "mov esi, offset a38594m04d02d02"], [164, "mov rdi, rax"], [165, "mov eax, 1"], [166, "call _fprintf"], [167, "add rsp, 10h"], [168, "mov rax, [rbp+var_68]"], [169, "mov rdx, [rax+28h]"], [170, "mov rax, cs:stdout"], [171, "movq xmm0, rdx"], [172, "mov esi, offset aLat38534m5f385"], [173, "mov rdi, rax"], [174, "mov eax, 1"], [175, "call _fprintf"], [176, "mov rax, [rbp+var_68]"], [177, "mov rdx, [rax+30h]"], [178, "mov rax, cs:stdout"], [179, "movq xmm0, rdx"], [180, "mov esi, offset aLon38570m5f385"], [181, "mov rdi, rax"], [182, "mov eax, 1"], [183, "call _fprintf"], [184, "mov rax, [rbp+var_68]"], [185, "mov rdx, [rax+38h]"], [186, "mov rax, cs:stdout"], [187, "movq xmm0, rdx"], [188, "mov esi, offset aAlt38582m2f385"], [189, "mov rdi, rax"], [190, "mov eax, 1"], [191, "call _fprintf"], [192, "cmp [rbp+var_8], 0"], [193, "jnz short loc_403180"], [194, "mov rax, [rbp+var_68]"], [195, "movsd xmm1, qword ptr [rax+50h]"], [196, "mov rax, [rbp+var_68]"], [197, "movsd xmm0, qword ptr [rax+48h]"], [198, "mov rax, [rbp+var_68]"], [199, "mov rdx, [rax+40h]"], [200, "mov rax, cs:stdout"], [201, "movapd xmm2, xmm1"], [202, "movapd xmm1, xmm0"], [203, "movq xmm0, rdx"], [204, "mov esi, offset aVh38536m1f3852"], [205, "mov rdi, rax"], [206, "mov eax, 3"], [207, "call _fprintf"], [208, "mov rax, [rbp+var_68]"], [209, "movzx eax, byte ptr [rax+4E8h]"], [210, "cmp al, 1"], [211, "jle short loc_4031B3"], [212, "mov rax, [rbp+var_68]"], [213, "lea rdx, [rax+82h]"], [214, "mov rax, cs:stdout"], [215, "mov esi, offset aSn38558mS38524"], [216, "mov rdi, rax"], [217, "mov eax, 0"], [218, "call _fprintf"], [219, "mov rax, [rbp+var_68]"], [220, "movzx eax, byte ptr [rax+4E8h]"], [221, "cmp al, 1"], [222, "jle short loc_403224"], [223, "mov rax, cs:stdout"], [224, "mov rcx, rax"], [225, "mov edx, 4"], [226, "mov esi, 1"], [227, "mov edi, offset asc_40F1AC"], [228, "call _fwrite"], [229, "cmp [rbp+var_6C], 0"], [230, "jz short loc_403206"], [231, "mov rax, cs:stdout"], [232, "mov rcx, rax"], [233, "mov edx, 19h"], [234, "mov esi, 1"], [235, "mov edi, offset a3852mOk385244m"], [236, "call _fwrite"], [237, "jmp short loc_403224"], [238, "mov rax, cs:stdout"], [239, "mov rcx, rax"], [240, "mov edx, 19h"], [241, "mov esi, 1"], [242, "mov edi, offset a3851mNo385244m"], [243, "call _fwrite"], [244, "mov rax, [rbp+var_68]"], [245, "movzx eax, byte ptr [rax+4EDh]"], [246, "test al, al"], [247, "jz loc_40339C"], [248, "cmp [rbp+var_6C], 0"], [249, "jz loc_40339C"], [250, "mov rax, [rbp+var_68]"], [251, "movss xmm0, dword ptr [rax+70h]"], [252, "comiss xmm0, cs:dword_40F7F0"], [253, "jbe short loc_403287"], [254, "mov rax, [rbp+var_68]"], [255, "movss xmm0, dword ptr [rax+70h]"], [256, "pxor xmm6, xmm6"], [257, "cvtss2sd xmm6, xmm0"], [258, "movq rdx, xmm6"], [259, "mov rax, cs:stdout"], [260, "movq xmm0, rdx"], [261, "mov esi, offset aT1fc"], [262, "mov rdi, rax"], [263, "mov eax, 1"], [264, "call _fprintf"], [265, "mov rax, [rbp+var_68]"], [266, "movzx eax, byte ptr [rax+4E8h]"], [267, "cmp al, 1"], [268, "jle short loc_4032DC"], [269, "mov rax, [rbp+var_68]"], [270, "movss xmm0, dword ptr [rax+74h]"], [271, "comiss xmm0, cs:dword_40F7F4"], [272, "jbe short loc_4032DC"], [273, "mov rax, [rbp+var_68]"], [274, "movss xmm0, dword ptr [rax+74h]"], [275, "pxor xmm7, xmm7"], [276, "cvtss2sd xmm7, xmm0"], [277, "movq rdx, xmm7"], [278, "mov rax, cs:stdout"], [279, "movq xmm0, rdx"], [280, "mov esi, offset aRh0f"], [281, "mov rdi, rax"], [282, "mov eax, 1"], [283, "call _fprintf"], [284, "mov rax, [rbp+var_68]"], [285, "movzx eax, byte ptr [rax+4E8h]"], [286, "cmp al, 2"], [287, "jle loc_40339C"], [288, "mov rax, [rbp+var_68]"], [289, "mov rdi, rax"], [290, "call sub_4028A0"], [291, "movd eax, xmm0"], [292, "mov [rbp+var_2C], eax"], [293, "mov rax, [rbp+var_68]"], [294, "mov rdi, rax"], [295, "call sub_402BB7"], [296, "movd eax, xmm0"], [297, "mov [rbp+var_30], eax"], [298, "mov rax, [rbp+var_68]"], [299, "movss xmm0, dword ptr [rax+78h]"], [300, "pxor xmm3, xmm3"], [301, "cvtss2sd xmm3, xmm0"], [302, "movq rdx, xmm3"], [303, "mov rax, cs:stdout"], [304, "movq xmm0, rdx"], [305, "mov esi, offset aTi1fc"], [306, "mov rdi, rax"], [307, "mov eax, 1"], [308, "call _fprintf"], [309, "movss xmm0, [rbp+var_2C]"], [310, "comiss xmm0, cs:dword_40F7F0"], [311, "jbe short loc_40339C"], [312, "pxor xmm0, xmm0"], [313, "cvtss2sd xmm0, [rbp+var_30]"], [314, "movsd xmm1, cs:qword_40F6E8"], [315, "divsd xmm0, xmm1"], [316, "pxor xmm4, xmm4"], [317, "cvtss2sd xmm4, [rbp+var_2C]"], [318, "movq rdx, xmm4"], [319, "mov rax, cs:stdout"], [320, "movapd xmm1, xmm0"], [321, "movq xmm0, rdx"], [322, "mov esi, offset aT21fc3fkhz"], [323, "mov rdi, rax"], [324, "mov eax, 2"], [325, "call _fprintf"], [326, "mov rax, [rbp+var_68]"], [327, "movzx eax, byte ptr [rax+4E8h]"], [328, "cmp al, 2"], [329, "jle short loc_4033E5"], [330, "cmp [rbp+var_6C], 0"], [331, "jz short loc_4033E5"], [332, "mov rax, [rbp+var_68]"], [333, "movss xmm0, dword ptr [rax+7Ch]"], [334, "pxor xmm5, xmm5"], [335, "cvtss2sd xmm5, xmm0"], [336, "movq rdx, xmm5"], [337, "mov rax, cs:stdout"], [338, "movq xmm0, rdx"], [339, "mov esi, offset aBat2fv"], [340, "mov rdi, rax"], [341, "mov eax, 1"], [342, "call _fprintf"], [343, "mov rax, cs:stdout"], [344, "mov rcx, rax"], [345, "mov edx, 4"], [346, "mov esi, 1"], [347, "mov edi, offset a0m"], [348, "call _fwrite"], [349, "jmp loc_4037F1"], [350, "mov rax, [rbp+var_68]"], [351, "movzx eax, byte ptr [rax+4F3h]"], [352, "cmp al, 9Fh"], [353, "jnz short loc_403472"], [354, "mov rax, [rbp+var_68]"], [355, "movzx eax, byte ptr [rax+4E8h]"], [356, "cmp al, 2"], [357, "jle short loc_403445"], [358, "mov rax, [rbp+var_68]"], [359, "mov edx, [rax]"], [360, "mov rax, cs:stdout"], [361, "mov esi, offset aWD"], [362, "mov rdi, rax"], [363, "mov eax, 0"], [364, "call _fprintf"], [365, "mov rax, [rbp+var_68]"], [366, "mov eax, [rax+18h]"], [367, "cdqe"], [368, "shl rax, 2"], [369, "lea rdx, aSun[rax]"], [370, "mov rax, cs:stdout"], [371, "mov esi, offset aS"], [372, "mov rdi, rax"], [373, "mov eax, 0"], [374, "call _fprintf"], [375, "mov rax, [rbp+var_68]"], [376, "movss xmm0, dword ptr [rax+24h]"], [377, "pxor xmm6, xmm6"], [378, "cvtss2sd xmm6, xmm0"], [379, "movq rsi, xmm6"], [380, "mov rax, [rbp+var_68]"], [381, "mov edi, [rax+20h]"], [382, "mov rax, [rbp+var_68]"], [383, "mov r9d, [rax+1Ch]"], [384, "mov rax, [rbp+var_68]"], [385, "mov r8d, [rax+14h]"], [386, "mov rax, [rbp+var_68]"], [387, "mov ecx, [rax+10h]"], [388, "mov rax, [rbp+var_68]"], [389, "mov edx, [rax+0Ch]"], [390, "mov rax, cs:stdout"], [391, "sub rsp, 8"], [392, "push rdi"], [393, "movq xmm0, rsi"], [394, "mov esi, offset a04d02d02d02d02"], [395, "mov rdi, rax"], [396, "mov eax, 1"], [397, "call _fprintf"], [398, "add rsp, 10h"], [399, "mov rax, [rbp+var_68]"], [400, "mov rdx, [rax+28h]"], [401, "mov rax, cs:stdout"], [402, "movq xmm0, rdx"], [403, "mov esi, offset aLat5f"], [404, "mov rdi, rax"], [405, "mov eax, 1"], [406, "call _fprintf"], [407, "mov rax, [rbp+var_68]"], [408, "mov rdx, [rax+30h]"], [409, "mov rax, cs:stdout"], [410, "movq xmm0, rdx"], [411, "mov esi, offset aLon5f"], [412, "mov rdi, rax"], [413, "mov eax, 1"], [414, "call _fprintf"], [415, "mov rax, [rbp+var_68]"], [416, "mov rdx, [rax+38h]"], [417, "mov rax, cs:stdout"], [418, "movq xmm0, rdx"], [419, "mov esi, offset aAlt2f"], [420, "mov rdi, rax"], [421, "mov eax, 1"], [422, "call _fprintf"], [423, "cmp [rbp+var_8], 0"], [424, "jnz short loc_40358C"], [425, "mov rax, [rbp+var_68]"], [426, "movsd xmm1, qword ptr [rax+50h]"], [427, "mov rax, [rbp+var_68]"], [428, "movsd xmm0, qword ptr [rax+48h]"], [429, "mov rax, [rbp+var_68]"], [430, "mov rdx, [rax+40h]"], [431, "mov rax, cs:stdout"], [432, "movapd xmm2, xmm1"], [433, "movapd xmm1, xmm0"], [434, "movq xmm0, rdx"], [435, "mov esi, offset aVh1fD1fVv1f"], [436, "mov rdi, rax"], [437, "mov eax, 3"], [438, "call _fprintf"], [439, "mov rax, [rbp+var_68]"], [440, "movzx eax, byte ptr [rax+4E8h]"], [441, "cmp al, 1"], [442, "jle short loc_4035BF"], [443, "mov rax, [rbp+var_68]"], [444, "lea rdx, [rax+82h]"], [445, "mov rax, cs:stdout"], [446, "mov esi, offset aSnS"], [447, "mov rdi, rax"], [448, "mov eax, 0"], [449, "call _fprintf"], [450, "mov rax, [rbp+var_68]"], [451, "movzx eax, byte ptr [rax+4E8h]"], [452, "cmp al, 1"], [453, "jle short loc_403630"], [454, "mov rax, cs:stdout"], [455, "mov rcx, rax"], [456, "mov edx, 4"], [457, "mov esi, 1"], [458, "mov edi, offset asc_40F1AC"], [459, "call _fwrite"], [460, "cmp [rbp+var_6C], 0"], [461, "jz short loc_403612"], [462, "mov rax, cs:stdout"], [463, "mov rcx, rax"], [464, "mov edx, 5"], [465, "mov esi, 1"], [466, "mov edi, offset aOk"], [467, "call _fwrite"], [468, "jmp short loc_403630"], [469, "mov rax, cs:stdout"], [470, "mov rcx, rax"], [471, "mov edx, 5"], [472, "mov esi, 1"], [473, "mov edi, offset aNo"], [474, "call _fwrite"], [475, "mov rax, [rbp+var_68]"], [476, "movzx eax, byte ptr [rax+4EDh]"], [477, "test al, al"], [478, "jz loc_4037A8"], [479, "cmp [rbp+var_6C], 0"], [480, "jz loc_4037A8"], [481, "mov rax, [rbp+var_68]"], [482, "movss xmm0, dword ptr [rax+70h]"], [483, "comiss xmm0, cs:dword_40F7F0"], [484, "jbe short loc_403693"], [485, "mov rax, [rbp+var_68]"], [486, "movss xmm0, dword ptr [rax+70h]"], [487, "pxor xmm7, xmm7"], [488, "cvtss2sd xmm7, xmm0"], [489, "movq rdx, xmm7"], [490, "mov rax, cs:stdout"], [491, "movq xmm0, rdx"], [492, "mov esi, offset aT1fc"], [493, "mov rdi, rax"], [494, "mov eax, 1"], [495, "call _fprintf"], [496, "mov rax, [rbp+var_68]"], [497, "movzx eax, byte ptr [rax+4E8h]"], [498, "cmp al, 1"], [499, "jle short loc_4036E8"], [500, "mov rax, [rbp+var_68]"], [501, "movss xmm0, dword ptr [rax+74h]"], [502, "comiss xmm0, cs:dword_40F7F4"], [503, "jbe short loc_4036E8"], [504, "mov rax, [rbp+var_68]"], [505, "movss xmm0, dword ptr [rax+74h]"], [506, "pxor xmm3, xmm3"], [507, "cvtss2sd xmm3, xmm0"], [508, "movq rdx, xmm3"], [509, "mov rax, cs:stdout"], [510, "movq xmm0, rdx"], [511, "mov esi, offset aRh0f"], [512, "mov rdi, rax"], [513, "mov eax, 1"], [514, "call _fprintf"], [515, "mov rax, [rbp+var_68]"], [516, "movzx eax, byte ptr [rax+4E8h]"], [517, "cmp al, 2"], [518, "jle loc_4037A8"], [519, "mov rax, [rbp+var_68]"], [520, "mov rdi, rax"], [521, "call sub_4028A0"], [522, "movd eax, xmm0"], [523, "mov [rbp+var_24], eax"], [524, "mov rax, [rbp+var_68]"], [525, "mov rdi, rax"], [526, "call sub_402BB7"], [527, "movd eax, xmm0"], [528, "mov [rbp+var_28], eax"], [529, "mov rax, [rbp+var_68]"], [530, "movss xmm0, dword ptr [rax+78h]"], [531, "pxor xmm4, xmm4"], [532, "cvtss2sd xmm4, xmm0"], [533, "movq rdx, xmm4"], [534, "mov rax, cs:stdout"], [535, "movq xmm0, rdx"], [536, "mov esi, offset aTi1fc"], [537, "mov rdi, rax"], [538, "mov eax, 1"], [539, "call _fprintf"], [540, "movss xmm0, [rbp+var_24]"], [541, "comiss xmm0, cs:dword_40F7F0"], [542, "jbe short loc_4037A8"], [543, "pxor xmm0, xmm0"], [544, "cvtss2sd xmm0, [rbp+var_28]"], [545, "movsd xmm1, cs:qword_40F6E8"], [546, "divsd xmm0, xmm1"], [547, "pxor xmm5, xmm5"], [548, "cvtss2sd xmm5, [rbp+var_24]"], [549, "movq rdx, xmm5"], [550, "mov rax, cs:stdout"], [551, "movapd xmm1, xmm0"], [552, "movq xmm0, rdx"], [553, "mov esi, offset aT21fc3fkhz"], [554, "mov rdi, rax"], [555, "mov eax, 2"], [556, "call _fprintf"], [557, "mov rax, [rbp+var_68]"], [558, "movzx eax, byte ptr [rax+4E8h]"], [559, "cmp al, 2"], [560, "jle short loc_4037F1"], [561, "cmp [rbp+var_6C], 0"], [562, "jz short loc_4037F1"], [563, "mov rax, [rbp+var_68]"], [564, "movss xmm0, dword ptr [rax+7Ch]"], [565, "pxor xmm6, xmm6"], [566, "cvtss2sd xmm6, xmm0"], [567, "movq rdx, xmm6"], [568, "mov rax, cs:stdout"], [569, "movq xmm0, rdx"], [570, "mov esi, offset aBat2fv"], [571, "mov rdi, rax"], [572, "mov eax, 1"], [573, "call _fprintf"], [574, "mov rax, cs:stdout"], [575, "mov rsi, rax"], [576, "mov edi, 0Ah"], [577, "call _fputc"], [578, "mov rax, [rbp+var_68]"], [579, "movzx eax, byte ptr [rax+4F1h]"], [580, "test al, al"], [581, "jz loc_403EB5"], [582, "cmp [rbp+var_6C], 0"], [583, "jz loc_403EB5"], [584, "mov [rbp+var_38], 0"], [585, "mov [rbp+var_50], 2D30314Dh"], [586, "mov [rbp+var_48], 0"], [587, "mov rax, [rbp+var_68]"], [588, "mov eax, [rax]"], [589, "pxor xmm1, xmm1"], [590, "cvtsi2sd xmm1, eax"], [591, "movsd xmm0, cs:qword_40F7F8"], [592, "mulsd xmm1, xmm0"], [593, "mov rax, [rbp+var_68]"], [594, "mov eax, [rax+4]"], [595, "pxor xmm0, xmm0"], [596, "cvtsi2sd xmm0, eax"], [597, "movsd xmm2, cs:qword_40F6E8"], [598, "divsd xmm0, xmm2"], [599, "addsd xmm0, xmm1"], [600, "movsd [rbp+var_40], xmm0"], [601, "mov rax, [rbp+var_68]"], [602, "mov edx, [rax+8]"], [603, "mov rax, [rbp+var_68]"], [604, "movzx eax, byte ptr [rax+81h]"], [605, "movzx ecx, al"], [606, "mov eax, edx"], [607, "sub eax, ecx"], [608, "mov [rbp+var_10], eax"], [609, "mov rax, [rbp+var_68]"], [610, "mov eax, [rax]"], [611, "mov [rbp+var_14], eax"], [612, "cmp [rbp+var_10], 0"], [613, "jns short loc_4038AE"], [614, "sub [rbp+var_14], 1"], [615, "add [rbp+var_10], 93A80h"], [616, "mov rax, [rbp+var_68]"], [617, "movzx eax, byte ptr [rax+4F3h]"], [618, "cmp al, 9Fh"], [619, "jnz loc_4039EB"], [620, "mov eax, [rbp+var_10]"], [621, "movsxd rsi, eax"], [622, "mov eax, [rbp+var_14]"], [623, "cdqe"], [624, "lea rdi, [rbp+var_60]"], [625, "lea rcx, [rbp+var_5C]"], [626, "lea rdx, [rbp+var_58]"], [627, "mov r8, rdi"], [628, "mov rdi, rax"], [629, "call sub_4012F2"], [630, "mov eax, [rbp+var_10]"], [631, "movsxd rdx, eax"], [632, "imul rdx, 0FFFFFFFFC22E4507h"], [633, "shr rdx, 20h"], [634, "add edx, eax"], [635, "sar edx, 10h"], [636, "mov ecx, eax"], [637, "sar ecx, 1Fh"], [638, "sub edx, ecx"], [639, "imul edx, 15180h"], [640, "sub eax, edx"], [641, "mov [rbp+var_10], eax"], [642, "mov eax, [rbp+var_10]"], [643, "movsxd rdx, eax"], [644, "imul rdx, 0FFFFFFFF91A2B3C5h"], [645, "shr rdx, 20h"], [646, "add edx, eax"], [647, "sar edx, 0Bh"], [648, "sar eax, 1Fh"], [649, "mov ecx, eax"], [650, "mov eax, edx"], [651, "sub eax, ecx"], [652, "mov [rbp+var_18], eax"], [653, "mov edx, [rbp+var_10]"], [654, "movsxd rax, edx"], [655, "imul rax, 0FFFFFFFF91A2B3C5h"], [656, "shr rax, 20h"], [657, "add eax, edx"], [658, "sar eax, 0Bh"], [659, "mov ecx, edx"], [660, "sar ecx, 1Fh"], [661, "sub eax, ecx"], [662, "imul ecx, eax, 0E10h"], [663, "mov eax, edx"], [664, "sub eax, ecx"], [665, "movsxd rdx, eax"], [666, "imul rdx, 0FFFFFFFF88888889h"], [667, "shr rdx, 20h"], [668, "add edx, eax"], [669, "sar edx, 5"], [670, "sar eax, 1Fh"], [671, "mov ecx, eax"], [672, "mov eax, edx"], [673, "sub eax, ecx"], [674, "mov [rbp+var_1C], eax"], [675, "mov eax, [rbp+var_10]"], [676, "movsxd rdx, eax"], [677, "imul rdx, 0FFFFFFFF88888889h"], [678, "shr rdx, 20h"], [679, "add edx, eax"], [680, "sar edx, 5"], [681, "mov ecx, eax"], [682, "sar ecx, 1Fh"], [683, "sub edx, ecx"], [684, "imul ecx, edx, 3Ch "], [685, "sub eax, ecx"], [686, "mov edx, eax"], [687, "pxor xmm1, xmm1"], [688, "cvtsi2sd xmm1, edx"], [689, "mov rax, [rbp+var_68]"], [690, "mov eax, [rax+4]"], [691, "movsxd rdx, eax"], [692, "imul rdx, 10624DD3h"], [693, "shr rdx, 20h"], [694, "sar edx, 6"], [695, "mov ecx, eax"], [696, "sar ecx, 1Fh"], [697, "sub edx, ecx"], [698, "imul ecx, edx, 3E8h"], [699, "sub eax, ecx"], [700, "mov edx, eax"], [701, "pxor xmm0, xmm0"], [702, "cvtsi2sd xmm0, edx"], [703, "movsd xmm2, cs:qword_40F6E8"], [704, "divsd xmm0, xmm2"], [705, "addsd xmm0, xmm1"], [706, "cvtsd2ss xmm0, xmm0"], [707, "movss [rbp+var_20], xmm0"], [708, "jmp short loc_403A2B"], [709, "mov rax, [rbp+var_68]"], [710, "mov eax, [rax+0Ch]"], [711, "mov [rbp+var_58], eax"], [712, "mov rax, [rbp+var_68]"], [713, "mov eax, [rax+10h]"], [714, "mov [rbp+var_5C], eax"], [715, "mov rax, [rbp+var_68]"], [716, "mov eax, [rax+14h]"], [717, "mov [rbp+var_60], eax"], [718, "mov rax, [rbp+var_68]"], [719, "mov eax, [rax+1Ch]"], [720, "mov [rbp+var_18], eax"], [721, "mov rax, [rbp+var_68]"], [722, "mov eax, [rax+20h]"], [723, "mov [rbp+var_1C], eax"], [724, "mov rax, [rbp+var_68]"], [725, "movss xmm0, dword ptr [rax+24h]"], [726, "movss [rbp+var_20], xmm0"], [727, "mov rax, [rbp+var_68]"], [728, "lea rcx, [rax+82h]"], [729, "lea rax, [rbp+var_50]"], [730, "add rax, 4"], [731, "mov edx, 0Ch"], [732, "mov rsi, rcx"], [733, "mov rdi, rax"], [734, "call _strncpy"], [735, "mov byte ptr [rbp+var_48+7], 0"], [736, "mov [rbp+var_C], 0"], [737, "jmp short loc_403A77"], [738, "mov eax, [rbp+var_C]"], [739, "cdqe"], [740, "movzx eax, byte ptr [rbp+rax+var_50]"], [741, "cmp al, 20h "], [742, "jnz short loc_403A73"], [743, "mov eax, [rbp+var_C]"], [744, "cdqe"], [745, "mov byte ptr [rbp+rax+var_50], 2Dh "], [746, "add [rbp+var_C], 1"], [747, "mov eax, [rbp+var_C]"], [748, "cdqe"], [749, "movzx eax, byte ptr [rbp+rax+var_50]"], [750, "test al, al"], [751, "jnz short loc_403A5B"], [752, "mov rax, cs:stdout"], [753, "mov edx, offset aM10"], [754, "mov esi, offset aTypeS"], [755, "mov rdi, rax"], [756, "mov eax, 0"], [757, "call _fprintf"], [758, "movsd xmm1, [rbp+var_40]"], [759, "movsd xmm0, cs:qword_40F800"], [760, "addsd xmm0, xmm1"], [761, "comisd xmm0, cs:qword_40F808"], [762, "jnb short loc_403AC5"], [763, "cvttsd2si rax, xmm0"], [764, "jmp short loc_403AE3"], [765, "movsd xmm1, cs:qword_40F808"], [766, "subsd xmm0, xmm1"], [767, "cvttsd2si rax, xmm0"], [768, "mov rdx, 8000000000000000h"], [769, "xor rax, rdx"], [770, "mov rcx, cs:stdout"], [771, "mov rdx, rax"], [772, "mov esi, offset aFrameLu"], [773, "mov rdi, rcx"], [774, "mov eax, 0"], [775, "call _fprintf"], [776, "mov rax, [rbp+var_68]"], [777, "movsd xmm5, qword ptr [rax+50h]"], [778, "mov rax, [rbp+var_68]"], [779, "movsd xmm4, qword ptr [rax+48h]"], [780, "mov rax, [rbp+var_68]"], [781, "movsd xmm3, qword ptr [rax+40h]"], [782, "mov rax, [rbp+var_68]"], [783, "movsd xmm2, qword ptr [rax+38h]"], [784, "mov rax, [rbp+var_68]"], [785, "movsd xmm1, qword ptr [rax+30h]"], [786, "mov rax, [rbp+var_68]"], [787, "movsd xmm0, qword ptr [rax+28h]"], [788, "pxor xmm7, xmm7"], [789, "cvtss2sd xmm7, [rbp+var_20]"], [790, "movq rsi, xmm7"], [791, "mov r9d, [rbp+var_60]"], [792, "mov r8d, [rbp+var_5C]"], [793, "mov ecx, [rbp+var_58]"], [794, "mov rax, cs:stdout"], [795, "lea rdx, [rbp+var_50]"], [796, "mov edi, [rbp+var_1C]"], [797, "push rdi"], [798, "mov edi, [rbp+var_18]"], [799, "push rdi"], [800, "movapd xmm6, xmm5"], [801, "movapd xmm5, xmm4"], [802, "movapd xmm4, xmm3"], [803, "movapd xmm3, xmm2"], [804, "movapd xmm2, xmm1"], [805, "movapd xmm1, xmm0"], [806, "movq xmm0, rsi"], [807, "mov esi, offset aIdSDatetime04d"], [808, "mov rdi, rax"], [809, "mov eax, 7"], [810, "call _fprintf"], [811, "add rsp, 10h"], [812, "mov rax, [rbp+var_68]"], [813, "movzx eax, byte ptr [rax+4F3h]"], [814, "cmp al, 9Fh"], [815, "jnz short loc_403BCA"], [816, "mov rax, [rbp+var_68]"], [817, "movzx eax, byte ptr [rax+80h]"], [818, "movzx edx, al"], [819, "mov rax, cs:stdout"], [820, "mov esi, offset aSatsD"], [821, "mov rdi, rax"], [822, "mov eax, 0"], [823, "call _fprintf"], [824, "mov rax, [rbp+var_68]"], [825, "movzx eax, byte ptr [rax+0F2h]"], [826, "mov [rbp+var_54], al"], [827, "mov rax, [rbp+var_68]"], [828, "movzx eax, byte ptr [rax+0F0h]"], [829, "and eax, 0Fh"], [830, "mov [rbp+var_53], al"], [831, "mov rax, [rbp+var_68]"], [832, "movzx eax, byte ptr [rax+0F4h]"], [833, "mov [rbp+var_52], al"], [834, "mov rax, [rbp+var_68]"], [835, "movzx eax, byte ptr [rax+0F3h]"], [836, "mov [rbp+var_51], al"], [837, "movzx eax, [rbp+var_51]"], [838, "movzx edi, al"], [839, "movzx eax, [rbp+var_52]"], [840, "movzx esi, al"], [841, "movzx eax, [rbp+var_53]"], [842, "movzx ecx, al"], [843, "movzx eax, [rbp+var_54]"], [844, "movzx edx, al"], [845, "mov rax, cs:stdout"], [846, "mov r9d, edi"], [847, "mov r8d, esi"], [848, "mov esi, offset aAprsidMe02x1x0"], [849, "mov rdi, rax"], [850, "mov eax, 0"], [851, "call _fprintf"], [852, "mov rax, [rbp+var_68]"], [853, "movss xmm0, dword ptr [rax+7Ch]"], [854, "pxor xmm3, xmm3"], [855, "cvtss2sd xmm3, xmm0"], [856, "movq rdx, xmm3"], [857, "mov rax, cs:stdout"], [858, "movq xmm0, rdx"], [859, "mov esi, offset aBatt2f"], [860, "mov rdi, rax"], [861, "mov eax, 1"], [862, "call _fprintf"], [863, "mov rax, [rbp+var_68]"], [864, "movzx eax, byte ptr [rax+4EDh]"], [865, "test al, al"], [866, "jz loc_403D22"], [867, "mov rax, [rbp+var_68]"], [868, "movss xmm0, dword ptr [rax+70h]"], [869, "comiss xmm0, cs:dword_40F810"], [870, "jbe short loc_403CCD"], [871, "mov rax, [rbp+var_68]"], [872, "movss xmm0, dword ptr [rax+70h]"], [873, "pxor xmm4, xmm4"], [874, "cvtss2sd xmm4, xmm0"], [875, "movq rdx, xmm4"], [876, "mov rax, cs:stdout"], [877, "movq xmm0, rdx"], [878, "mov esi, offset aTemp1f"], [879, "mov rdi, rax"], [880, "mov eax, 1"], [881, "call _fprintf"], [882, "mov rax, [rbp+var_68]"], [883, "movzx eax, byte ptr [rax+4E8h]"], [884, "cmp al, 1"], [885, "jle short loc_403D22"], [886, "mov rax, [rbp+var_68]"], [887, "movss xmm0, dword ptr [rax+74h]"], [888, "comiss xmm0, cs:dword_40F7F4"], [889, "jbe short loc_403D22"], [890, "mov rax, [rbp+var_68]"], [891, "movss xmm0, dword ptr [rax+74h]"], [892, "pxor xmm5, xmm5"], [893, "cvtss2sd xmm5, xmm0"], [894, "movq rdx, xmm5"], [895, "mov rax, cs:stdout"], [896, "movq xmm0, rdx"], [897, "mov esi, offset aHumidity1f"], [898, "mov rdi, rax"], [899, "mov eax, 1"], [900, "call _fprintf"], [901, "mov rax, [rbp+var_68]"], [902, "movzx eax, byte ptr [rax+0F4h]"], [903, "movzx esi, al"], [904, "mov rax, [rbp+var_68]"], [905, "movzx eax, byte ptr [rax+0F3h]"], [906, "movzx r8d, al"], [907, "mov rax, [rbp+var_68]"], [908, "movzx eax, byte ptr [rax+0F2h]"], [909, "movzx edi, al"], [910, "mov rax, [rbp+var_68]"], [911, "movzx eax, byte ptr [rax+0F1h]"], [912, "movzx ecx, al"], [913, "mov rax, [rbp+var_68]"], [914, "movzx eax, byte ptr [rax+0F0h]"], [915, "movzx edx, al"], [916, "mov rax, cs:stdout"], [917, "sub rsp, 8"], [918, "push rsi"], [919, "mov r9d, r8d"], [920, "mov r8d, edi"], [921, "mov esi, offset aRawidM1002x02x"], [922, "mov rdi, rax"], [923, "mov eax, 0"], [924, "call _fprintf"], [925, "add rsp, 10h"], [926, "mov rax, [rbp+var_68]"], [927, "movzx eax, byte ptr [rax+4F3h]"], [928, "movzx edx, al"], [929, "mov rax, cs:stdout"], [930, "mov esi, offset aSubtype0x02x"], [931, "mov rdi, rax"], [932, "mov eax, 0"], [933, "call _fprintf"], [934, "mov rax, [rbp+var_68]"], [935, "mov eax, [rax+4E4h]"], [936, "test eax, eax"], [937, "jle short loc_403DE9"], [938, "mov rax, [rbp+var_68]"], [939, "mov edx, [rax+4E4h]"], [940, "mov rax, cs:stdout"], [941, "mov esi, offset aFreqD"], [942, "mov rdi, rax"], [943, "mov eax, 0"], [944, "call _fprintf"], [945, "mov rax, cs:stdout"], [946, "mov edx, offset aUtc"], [947, "mov esi, offset aRefDatetimeS"], [948, "mov rdi, rax"], [949, "mov eax, 0"], [950, "call _fprintf"], [951, "mov rax, cs:stdout"], [952, "mov edx, offset aGps"], [953, "mov esi, offset aRefPositionS"], [954, "mov rdi, rax"], [955, "mov eax, 0"], [956, "call _fprintf"], [957, "mov rax, [rbp+var_68]"], [958, "movzx eax, byte ptr [rax+81h]"], [959, "movzx edx, al"], [960, "mov rax, cs:stdout"], [961, "mov esi, offset aGpsutcLeapsecD"], [962, "mov rdi, rax"], [963, "mov eax, 0"], [964, "call _fprintf"], [965, "mov [rbp+var_38], offset a161"], [966, "cmp [rbp+var_38], 0"], [967, "jz short loc_403E83"], [968, "mov rax, [rbp+var_38]"], [969, "movzx eax, byte ptr [rax]"], [970, "test al, al"], [971, "jz short loc_403E83"], [972, "mov rax, cs:stdout"], [973, "mov rdx, [rbp+var_38]"], [974, "mov esi, offset aVersionS"], [975, "mov rdi, rax"], [976, "mov eax, 0"], [977, "call _fprintf"], [978, "mov rax, cs:stdout"], [979, "mov rcx, rax"], [980, "mov edx, 3"], [981, "mov esi, 1"], [982, "mov edi, offset asc_40F486"], [983, "call _fwrite"], [984, "mov rax, cs:stdout"], [985, "mov rsi, rax"], [986, "mov edi, 0Ah"], [987, "call _fputc"], [988, "mov eax, [rbp+var_4]"], [989, "leave"], [990, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 8], [10, 3], [11, 10], [13, 12], [13, 5], [14, 3], [15, 14], [17, 13], [17, 16], [18, 3], [19, 18], [21, 17], [21, 20], [22, 3], [23, 22], [25, 24], [25, 21], [26, 3], [27, 26], [29, 25], [29, 28], [30, 3], [31, 30], [33, 32], [35, 3], [36, 35], [37, 36], [38, 37], [39, 3], [40, 39], [42, 5], [42, 41], [43, 3], [44, 43], [46, 45], [46, 42], [47, 3], [48, 47], [50, 46], [50, 49], [51, 3], [52, 51], [54, 53], [57, 50], [57, 29], [57, 56], [58, 57], [59, 3], [60, 59], [61, 60], [62, 61], [63, 3], [64, 52], [64, 63], [64, 31], [65, 3], [66, 65], [67, 3], [68, 67], [69, 3], [70, 69], [71, 70], [72, 3], [73, 72], [75, 64], [76, 73], [78, 3], [79, 78], [82, 3], [83, 81], [83, 82], [84, 3], [85, 84], [88, 3], [89, 88], [89, 87], [90, 3], [91, 90], [94, 3], [95, 93], [95, 94], [96, 3], [97, 96], [100, 3], [101, 100], [101, 99], [102, 3], [103, 102], [105, 3], [106, 101], [106, 105], [107, 106], [108, 107], [109, 3], [110, 109], [110, 89], [110, 83], [110, 101], [110, 95], [111, 110], [112, 111], [114, 113], [119, 3], [120, 83], [120, 101], [120, 119], [120, 95], [120, 89], [121, 120], [122, 121], [123, 3], [124, 123], [124, 89], [124, 83], [124, 101], [124, 95], [125, 124], [126, 125], [127, 3], [128, 83], [128, 101], [128, 127], [128, 95], [128, 89], [131, 129], [134, 3], [135, 89], [135, 134], [135, 83], [135, 101], [135, 95], [137, 135], [138, 128], [138, 115], [141, 139], [144, 3], [145, 89], [145, 144], [145, 83], [145, 101], [145, 95], [147, 146], [147, 145], [148, 147], [149, 3], [150, 149], [150, 83], [150, 101], [150, 95], [150, 89], [151, 3], [152, 101], [152, 95], [152, 151], [152, 89], [152, 83], [153, 3], [154, 95], [154, 89], [154, 153], [154, 83], [154, 101], [155, 3], [156, 89], [156, 83], [156, 101], [156, 95], [156, 155], [157, 3], [158, 157], [158, 83], [158, 101], [158, 95], [158, 89], [160, 2], [161, 150], [162, 148], [164, 159], [167, 160], [168, 3], [169, 83], [169, 101], [169, 95], [169, 168], [169, 89], [171, 169], [173, 170], [176, 3], [177, 176], [177, 101], [177, 95], [177, 89], [177, 83], [179, 177], [181, 178], [184, 3], [185, 101], [185, 95], [185, 184], [185, 89], [185, 83], [187, 185], [189, 186], [192, 33], [192, 54], [193, 192], [194, 3], [195, 95], [195, 89], [195, 83], [195, 194], [195, 101], [196, 3], [197, 89], [197, 196], [197, 83], [197, 101], [197, 95], [198, 3], [199, 83], [199, 101], [199, 95], [199, 198], [199, 89], [201, 195], [202, 197], [203, 199], [205, 200], [208, 3], [209, 101], [209, 208], [209, 95], [209, 89], [209, 83], [210, 209], [211, 210], [212, 3], [213, 89], [213, 83], [213, 199], [213, 185], [213, 101], [213, 212], [213, 95], [216, 214], [219, 3], [220, 101], [220, 95], [220, 89], [220, 219], [220, 83], [221, 220], [222, 221], [224, 223], [229, 4], [230, 229], [232, 231], [239, 238], [244, 3], [245, 83], [245, 101], [245, 244], [245, 95], [245, 89], [246, 245], [247, 246], [248, 4], [249, 248], [250, 3], [251, 89], [251, 83], [251, 250], [251, 101], [251, 95], [252, 251], [253, 248], [254, 3], [255, 95], [255, 89], [255, 83], [255, 254], [255, 101], [257, 256], [257, 255], [258, 257], [260, 258], [262, 259], [265, 3], [266, 95], [266, 265], [266, 89], [266, 83], [266, 101], [267, 266], [268, 267], [269, 3], [270, 89], [270, 83], [270, 269], [270, 101], [270, 95], [271, 270], [272, 267], [273, 3], [274, 95], [274, 89], [274, 83], [274, 273], [274, 101], [276, 275], [276, 274], [277, 276], [279, 277], [281, 278], [284, 3], [285, 95], [285, 89], [285, 284], [285, 83], [285, 101], [286, 285], [287, 286], [288, 3], [289, 288], [291, 271], [291, 252], [291, 279], [291, 260], [292, 291], [293, 3], [294, 293], [296, 271], [296, 252], [296, 279], [296, 260], [297, 296], [298, 3], [299, 95], [299, 89], [299, 298], [299, 83], [299, 101], [301, 299], [301, 300], [302, 301], [304, 302], [306, 303], [309, 292], [310, 309], [311, 286], [313, 297], [313, 312], [315, 313], [315, 314], [317, 316], [317, 292], [318, 317], [320, 315], [321, 318], [323, 319], [326, 3], [327, 83], [327, 101], [327, 95], [327, 89], [327, 326], [328, 327], [329, 328], [330, 4], [331, 330], [332, 3], [333, 83], [333, 101], [333, 95], [333, 332], [333, 89], [335, 334], [335, 333], [336, 335], [338, 336], [340, 337], [344, 343], [350, 3], [351, 83], [351, 101], [351, 95], [351, 350], [351, 89], [352, 351], [353, 352], [354, 3], [355, 89], [355, 354], [355, 83], [355, 101], [355, 95], [356, 355], [357, 356], [358, 3], [359, 95], [359, 89], [359, 358], [359, 83], [359, 101], [362, 360], [365, 3], [366, 89], [366, 83], [366, 101], [366, 365], [366, 95], [368, 366], [369, 94], [369, 359], [372, 370], [375, 3], [376, 83], [376, 101], [376, 375], [376, 95], [376, 89], [378, 377], [378, 376], [379, 378], [380, 3], [381, 95], [381, 89], [381, 380], [381, 83], [381, 101], [382, 3], [383, 95], [383, 89], [383, 382], [383, 83], [383, 101], [384, 3], [385, 83], [385, 101], [385, 384], [385, 95], [385, 89], [386, 3], [387, 386], [387, 83], [387, 101], [387, 95], [387, 89], [388, 3], [389, 388], [389, 95], [389, 89], [389, 83], [389, 101], [391, 2], [392, 381], [393, 379], [395, 390], [398, 391], [399, 3], [400, 95], [400, 89], [400, 399], [400, 101], [400, 83], [402, 400], [404, 401], [407, 3], [408, 407], [408, 95], [408, 89], [408, 83], [408, 101], [410, 408], [412, 409], [415, 3], [416, 95], [416, 89], [416, 415], [416, 83], [416, 101], [418, 416], [420, 417], [423, 33], [423, 54], [424, 423], [425, 3], [426, 95], [426, 89], [426, 83], [426, 101], [426, 425], [427, 3], [428, 427], [428, 83], [428, 101], [428, 95], [428, 89], [429, 3], [430, 83], [430, 101], [430, 95], [430, 89], [430, 429], [432, 426], [433, 428], [434, 430], [436, 431], [439, 3], [440, 89], [440, 83], [440, 101], [440, 95], [440, 439], [441, 440], [442, 441], [443, 3], [444, 101], [444, 95], [444, 430], [444, 416], [444, 443], [444, 89], [444, 83], [447, 445], [450, 3], [451, 89], [451, 83], [451, 101], [451, 450], [451, 95], [452, 451], [453, 452], [455, 454], [460, 4], [461, 460], [463, 462], [470, 469], [475, 3], [476, 95], [476, 89], [476, 475], [476, 83], [476, 101], [477, 476], [478, 477], [479, 4], [480, 479], [481, 3], [482, 101], [482, 95], [482, 481], [482, 89], [482, 83], [483, 482], [484, 479], [485, 3], [486, 485], [486, 89], [486, 83], [486, 101], [486, 95], [488, 487], [488, 486], [489, 488], [491, 489], [493, 490], [496, 3], [497, 89], [497, 83], [497, 101], [497, 496], [497, 95], [498, 497], [499, 498], [500, 3], [501, 101], [501, 500], [501, 95], [501, 89], [501, 83], [502, 501], [503, 498], [504, 3], [505, 504], [505, 89], [505, 83], [505, 101], [505, 95], [507, 506], [507, 505], [508, 507], [510, 508], [512, 509], [515, 3], [516, 89], [516, 83], [516, 515], [516, 101], [516, 95], [517, 516], [518, 517], [519, 3], [520, 519], [522, 502], [522, 483], [522, 510], [522, 491], [523, 522], [524, 3], [525, 524], [527, 502], [527, 483], [527, 510], [527, 491], [528, 527], [529, 3], [530, 89], [530, 83], [530, 529], [530, 101], [530, 95], [532, 530], [532, 531], [533, 532], [535, 533], [537, 534], [540, 523], [541, 540], [542, 517], [544, 543], [544, 528], [546, 545], [546, 544], [548, 547], [548, 523], [549, 548], [551, 546], [552, 549], [554, 550], [557, 3], [558, 101], [558, 95], [558, 89], [558, 83], [558, 557], [559, 558], [560, 559], [561, 4], [562, 561], [563, 3], [564, 83], [564, 563], [564, 101], [564, 95], [564, 89], [566, 565], [566, 564], [567, 566], [569, 567], [571, 568], [575, 574], [578, 3], [579, 89], [579, 578], [579, 83], [579, 101], [579, 95], [580, 579], [581, 580], [582, 4], [583, 582], [587, 3], [588, 95], [588, 89], [588, 587], [588, 83], [588, 101], [590, 588], [590, 589], [592, 591], [592, 590], [593, 3], [594, 95], [594, 593], [594, 89], [594, 83], [594, 101], [596, 595], [596, 594], [598, 597], [598, 596], [599, 598], [599, 592], [600, 599], [601, 3], [602, 83], [602, 101], [602, 95], [602, 601], [602, 89], [603, 3], [604, 95], [604, 89], [604, 83], [604, 101], [604, 603], [605, 604], [606, 602], [607, 606], [607, 605], [608, 607], [609, 3], [610, 101], [610, 95], [610, 89], [610, 609], [610, 83], [611, 610], [612, 608], [613, 612], [614, 611], [615, 608], [616, 3], [617, 89], [617, 83], [617, 101], [617, 95], [617, 616], [618, 617], [619, 618], [620, 615], [620, 608], [621, 620], [622, 614], [622, 611], [624, 576], [624, 103], [625, 605], [626, 602], [627, 624], [628, 622], [630, 608], [630, 615], [631, 630], [632, 631], [633, 632], [634, 630], [634, 633], [635, 634], [636, 630], [637, 636], [638, 637], [638, 635], [639, 638], [640, 630], [640, 639], [641, 640], [642, 641], [643, 642], [644, 643], [645, 644], [646, 645], [646, 642], [647, 646], [648, 642], [649, 648], [650, 647], [651, 649], [651, 650], [652, 651], [653, 641], [654, 653], [655, 654], [656, 655], [657, 656], [657, 653], [658, 657], [659, 653], [660, 659], [661, 660], [661, 658], [662, 661], [662, 660], [663, 653], [664, 663], [664, 662], [665, 664], [666, 665], [667, 666], [668, 664], [668, 667], [669, 668], [670, 664], [671, 670], [672, 669], [673, 672], [673, 671], [674, 673], [675, 641], [676, 675], [677, 676], [678, 677], [679, 675], [679, 678], [680, 679], [681, 675], [682, 681], [683, 680], [683, 682], [684, 682], [684, 683], [685, 675], [685, 684], [686, 685], [688, 687], [688, 686], [689, 3], [690, 689], [690, 101], [690, 95], [690, 89], [690, 83], [691, 690], [692, 691], [693, 692], [694, 693], [695, 690], [696, 695], [697, 696], [697, 694], [698, 697], [698, 696], [699, 698], [699, 690], [700, 699], [702, 700], [702, 701], [704, 703], [704, 702], [705, 704], [705, 688], [706, 705], [707, 706], [709, 3], [710, 95], [710, 89], [710, 83], [710, 101], [710, 709], [711, 710], [712, 3], [713, 95], [713, 89], [713, 712], [713, 83], [713, 101], [714, 713], [715, 3], [716, 715], [716, 95], [716, 89], [716, 83], [716, 101], [717, 716], [718, 3], [719, 95], [719, 718], [719, 89], [719, 83], [719, 101], [720, 719], [721, 3], [722, 83], [722, 101], [722, 95], [722, 89], [722, 721], [723, 722], [724, 3], [725, 101], [725, 724], [725, 95], [725, 89], [725, 83], [726, 725], [727, 3], [728, 698], [728, 101], [728, 95], [728, 727], [728, 89], [728, 605], [728, 83], [729, 727], [729, 585], [730, 729], [732, 728], [733, 730], [738, 746], [738, 736], [740, 745], [740, 738], [741, 740], [742, 741], [743, 746], [743, 736], [745, 743], [746, 746], [746, 736], [747, 746], [747, 736], [749, 747], [749, 745], [750, 749], [751, 750], [755, 752], [758, 600], [760, 758], [760, 759], [761, 760], [762, 750], [763, 757], [763, 761], [766, 761], [766, 765], [767, 757], [767, 766], [769, 767], [769, 768], [771, 769], [771, 763], [773, 770], [776, 3], [777, 83], [777, 776], [777, 101], [777, 95], [777, 89], [778, 3], [779, 101], [779, 95], [779, 778], [779, 89], [779, 83], [780, 3], [781, 89], [781, 83], [781, 780], [781, 101], [781, 95], [782, 3], [783, 89], [783, 83], [783, 101], [783, 95], [783, 782], [784, 3], [785, 101], [785, 784], [785, 95], [785, 89], [785, 83], [786, 3], [787, 101], [787, 95], [787, 786], [787, 89], [787, 83], [789, 788], [789, 726], [789, 707], [790, 789], [791, 717], [792, 714], [793, 711], [795, 585], [795, 771], [796, 674], [796, 723], [797, 796], [798, 652], [798, 720], [799, 798], [800, 777], [801, 779], [802, 781], [803, 783], [804, 785], [805, 787], [806, 790], [808, 794], [811, 167], [811, 398], [811, 2], [812, 3], [813, 89], [813, 83], [813, 812], [813, 101], [813, 95], [814, 813], [815, 814], [816, 3], [817, 101], [817, 95], [817, 816], [817, 89], [817, 83], [818, 817], [821, 819], [824, 3], [825, 95], [825, 824], [825, 89], [825, 83], [825, 101], [826, 825], [827, 3], [828, 101], [828, 95], [828, 89], [828, 83], [828, 827], [829, 828], [830, 829], [831, 3], [832, 83], [832, 101], [832, 831], [832, 95], [832, 89], [833, 832], [834, 3], [835, 89], [835, 83], [835, 101], [835, 95], [835, 834], [836, 835], [837, 836], [838, 837], [839, 833], [840, 839], [841, 830], [842, 841], [843, 826], [844, 843], [846, 838], [847, 840], [849, 845], [852, 3], [853, 852], [853, 95], [853, 89], [853, 83], [853, 101], [855, 854], [855, 853], [856, 855], [858, 856], [860, 857], [863, 3], [864, 83], [864, 101], [864, 95], [864, 863], [864, 89], [865, 864], [866, 865], [867, 3], [868, 867], [868, 89], [868, 83], [868, 101], [868, 95], [869, 868], [870, 865], [871, 3], [872, 101], [872, 95], [872, 871], [872, 89], [872, 83], [874, 872], [874, 873], [875, 874], [877, 875], [879, 876], [882, 3], [883, 882], [883, 95], [883, 89], [883, 83], [883, 101], [884, 883], [885, 884], [886, 3], [887, 89], [887, 83], [887, 101], [887, 886], [887, 95], [888, 887], [889, 884], [890, 3], [891, 95], [891, 890], [891, 89], [891, 83], [891, 101], [893, 891], [893, 892], [894, 893], [896, 894], [898, 895], [901, 3], [902, 901], [902, 95], [902, 89], [902, 83], [902, 101], [903, 902], [904, 3], [905, 83], [905, 101], [905, 904], [905, 95], [905, 89], [906, 905], [907, 3], [908, 907], [908, 83], [908, 101], [908, 95], [908, 89], [909, 908], [910, 3], [911, 89], [911, 83], [911, 101], [911, 910], [911, 95], [912, 911], [913, 3], [914, 913], [914, 83], [914, 101], [914, 95], [914, 89], [915, 914], [917, 811], [918, 903], [919, 906], [920, 909], [922, 916], [925, 917], [926, 3], [927, 926], [927, 83], [927, 101], [927, 95], [927, 89], [928, 927], [931, 929], [934, 3], [935, 83], [935, 101], [935, 934], [935, 95], [935, 89], [936, 935], [937, 936], [938, 3], [939, 95], [939, 89], [939, 83], [939, 101], [939, 938], [942, 940], [948, 945], [954, 951], [957, 3], [958, 89], [958, 83], [958, 101], [958, 95], [958, 957], [959, 958], [962, 960], [966, 965], [967, 966], [968, 965], [969, 95], [969, 89], [969, 968], [969, 83], [969, 101], [970, 969], [971, 970], [973, 965], [975, 972], [979, 978], [985, 984], [988, 56], [988, 50], [988, 29], [990, 988]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/dbd7436cf6a1ca8c98b79ba002a1525366ed3f2506782e26b4d7b2e609eb7753_dbd7436cf6a1ca8c98b79ba002a1525366ed3f2506782e26b4d7b2e609eb7753.jsonl.gz", "strip_func_name": "sub_402E2B", "query": "\n\n\n__int64 __fastcall sub_402E2B(unsigned int *a1, int a2, __m128i a3)\n{\nfloat v3; // xmm0_4\n__m128i v4; // xmm0\n__m128i v5; // xmm0\nfloat v6; // xmm0_4\ndouble v7; // xmm0_8\nunsigned __int64 v8; // rax\nunsigned int v10; // [rsp+10h] [rbp-60h] BYREF\nunsigned int v11; // [rsp+14h] [rbp-5Ch] BYREF\nunsigned int v12; // [rsp+18h] [rbp-58h] BYREF\nunsigned __int8 v13; // [rsp+1Ch] [rbp-54h]\nunsigned __int8 v14; // [rsp+1Dh] [rbp-53h]\nunsigned __int8 v15; // [rsp+1Eh] [rbp-52h]\nunsigned __int8 v16; // [rsp+1Fh] [rbp-51h]\n__int64 v17; // [rsp+20h] [rbp-50h] BYREF\n__int64 v18; // [rsp+28h] [rbp-48h]\ndouble v19; // [rsp+30h] [rbp-40h]\nconst char *v20; // [rsp+38h] [rbp-38h]\nfloat v21; // [rsp+40h] [rbp-30h]\nfloat v22; // [rsp+44h] [rbp-2Ch]\nfloat v23; // [rsp+48h] [rbp-28h]\nfloat v24; // [rsp+4Ch] [rbp-24h]\nfloat v25; // [rsp+50h] [rbp-20h]\nunsigned int v26; // [rsp+54h] [rbp-1Ch]\nunsigned int v27; // [rsp+58h] [rbp-18h]\nunsigned int v28; // [rsp+5Ch] [rbp-14h]\nint v29; // [rsp+60h] [rbp-10h]\nint i; // [rsp+64h] [rbp-Ch]\nint v31; // [rsp+68h] [rbp-8h]\nunsigned int v32; // [rsp+6Ch] [rbp-4h]\n\nv32 = 0;\nif ( *((_BYTE *)a1 + 1267) == 0x9F )\n{\nv32 |= sub_401594((__int64)a1);\nv32 |= sub_401649((__int64)a1);\nv32 |= sub_40184C((__int64)a1);\nv32 |= sub_4018F9((__int64)a1);\nv32 |= sub_4019A6((__int64)a1);\nv31 = sub_401A53((double *)a1);\n}\nelse if ( *((_BYTE *)a1 + 1267) == 0xAF )\n{\nv32 |= sub_4021CC((__int64)a1);\nv32 |= sub_4022DF(a1);\nv32 |= sub_401E07((double *)a1);\nv31 = sub_401FC4((double *)a1);\n}\nelse\n{\nv32 = 255;\n}\nif ( !v32 )\n{\nif ( *((_BYTE *)a1 + 1267) == 0x9F )\nsub_4012F2((int)*a1, (int)a1[2], a1 + 3, a1 + 4, a1 + 5);\n*(float *)a3.m128i_i32 = sub_4024F8((__int64)a1);\na1[28] = _mm_cvtsi128_si32(a3);\n*(float *)a3.m128i_i32 = sub_402D2D((__int64)a1, a3);\na1[29] = _mm_cvtsi128_si32(a3);\na1[30] = _mm_cvtsi128_si32(sub_402801((__int64)a1));\nv3 = sub_402D7F((__int64)a1);\n*((float *)a1 + 31) = v3;\nsub_401CDF((__int64)a1);\nif ( !*((_BYTE *)a1 + 1266) )\n{\nif ( *((_BYTE *)a1 + 1264) )\n{\nfwrite(\"\\x1B[38;5;244m\", 1uLL, 0xBuLL, stdout);\nif ( *((_BYTE *)a1 + 1267) == 0x9F )\n{\nif ( *((char *)a1 + 1256) > 2 )\nfprintf(stdout, \" (W \\x1B[38;5;20m%d\\x1B[38;5;244m) \", *a1);\nfprintf(stdout, \"\\x1B[38;5;27m%s\\x1B[38;5;244m \", &aSun[4 * a1[6]]);\n}\nfprintf(\nstdout,\n\"\\x1B[38;5;94m%04d-%02d-%02d\\x1B[38;5;244m \\x1B[38;5;27m%02d:%02d:%06.3f\\x1B[38;5;244m \",\na1[3],\na1[4],\na1[5],\na1[7],\na1[8],\n*((float *)a1 + 9));\nfprintf(stdout, \" lat: \\x1B[38;5;34m%.5f\\x1B[38;5;244m \", *((double *)a1 + 5));\nfprintf(stdout, \" lon: \\x1B[38;5;70m%.5f\\x1B[38;5;244m \", *((double *)a1 + 6));\nfprintf(stdout, \" alt: \\x1B[38;5;82m%.2f\\x1B[38;5;244m \", *((double *)a1 + 7));\nif ( !v31 )\nfprintf(\nstdout,\n\" vH: \\x1B[38;5;36m%.1f\\x1B[38;5;244m D: \\x1B[38;5;36m%.1f\\x1B[38;5;244m vV: \\x1B[38;5;36m%.1f\\x1B[38;5;244m \",\n*((double *)a1 + 8),\n*((double *)a1 + 9),\n*((double *)a1 + 10));\nif ( *((char *)a1 + 1256) > 1 )\nfprintf(stdout, \" SN: \\x1B[38;5;58m%s\\x1B[38;5;244m\", (const char *)a1 + 130);\nif ( *((char *)a1 + 1256) > 1 )\n{\nfwrite(\" # \", 1uLL, 4uLL, stdout);\nif ( a2 )\nfwrite(\" \\x1B[38;5;2m[OK]\\x1B[38;5;244m\", 1uLL, 0x19uLL, stdout);\nelse\nfwrite(\" \\x1B[38;5;1m[NO]\\x1B[38;5;244m\", 1uLL, 0x19uLL, stdout);\n}\nif ( *((_BYTE *)a1 + 1261) && a2 )\n{\nv4 = (__m128i)a1[28];\nif ( *(float *)v4.m128i_i32 > -270.0 )\n{\nv4 = (__m128i)COERCE_UNSIGNED_INT64(*((float *)a1 + 28));\nfprintf(stdout, \" T=%.1fC\", *(double *)v4.m128i_i64);\n}\nif ( *((char *)a1 + 1256) > 1 )\n{\nv4 = (__m128i)a1[29];\nif ( *(float *)v4.m128i_i32 > -0.5 )\n{\nv4 = (__m128i)COERCE_UNSIGNED_INT64(*((float *)a1 + 29));\nfprintf(stdout, \" _RH=%.0f%%\", *(double *)v4.m128i_i64);\n}\n}\nif ( *((char *)a1 + 1256) > 2 )\n{\n*(float *)v4.m128i_i32 = sub_4028A0((__int64)a1);\nv22 = COERCE_FLOAT(_mm_cvtsi128_si32(v4));\n*(float *)v4.m128i_i32 = sub_402BB7((__int64)a1);\nv21 = COERCE_FLOAT(_mm_cvtsi128_si32(v4));\nfprintf(stdout, \" (Ti:%.1fC)\", *((float *)a1 + 30));\nif ( v22 > -270.0 )\nfprintf(stdout, \" (T2:%.1fC) (%.3fkHz)\", v22, v21 / 1000.0);\n}\n}\nif ( *((char *)a1 + 1256) > 2 && a2 )\nfprintf(stdout, \" (bat:%.2fV)\", *((float *)a1 + 31));\nfwrite(\"\\x1B[0m\", 1uLL, 4uLL, stdout);\n}\nelse\n{\nif ( *((_BYTE *)a1 + 1267) == 0x9F )\n{\nif ( *((char *)a1 + 1256) > 2 )\nfprintf(stdout, \" (W %d) \", *a1);\nfprintf(stdout, \"%s \", &aSun[4 * a1[6]]);\n}\nfprintf(stdout, \"%04d-%02d-%02d %02d:%02d:%06.3f \", a1[3], a1[4], a1[5], a1[7], a1[8], *((float *)a1 + 9));\nfprintf(stdout, \" lat: %.5f \", *((double *)a1 + 5));\nfprintf(stdout, \" lon: %.5f \", *((double *)a1 + 6));\nfprintf(stdout, \" alt: %.2f \", *((double *)a1 + 7));\nif ( !v31 )\nfprintf(\nstdout,\n\" vH: %.1f D: %.1f vV: %.1f \",\n*((double *)a1 + 8),\n*((double *)a1 + 9),\n*((double *)a1 + 10));\nif ( *((char *)a1 + 1256) > 1 )\nfprintf(stdout, \" SN: %s\", (const char *)a1 + 130);\nif ( *((char *)a1 + 1256) > 1 )\n{\nfwrite(\" # \", 1uLL, 4uLL, stdout);\nif ( a2 )\nfwrite(\" [OK]\", 1uLL, 5uLL, stdout);\nelse\nfwrite(\" [NO]\", 1uLL, 5uLL, stdout);\n}\nif ( *((_BYTE *)a1 + 1261) && a2 )\n{\nv5 = (__m128i)a1[28];\nif ( *(float *)v5.m128i_i32 > -270.0 )\n{\nv5 = (__m128i)COERCE_UNSIGNED_INT64(*((float *)a1 + 28));\nfprintf(stdout, \" T=%.1fC\", *(double *)v5.m128i_i64);\n}\nif ( *((char *)a1 + 1256) > 1 )\n{\nv5 = (__m128i)a1[29];\nif ( *(float *)v5.m128i_i32 > -0.5 )\n{\nv5 = (__m128i)COERCE_UNSIGNED_INT64(*((float *)a1 + 29));\nfprintf(stdout, \" _RH=%.0f%%\", *(double *)v5.m128i_i64);\n}\n}\nif ( *((char *)a1 + 1256) > 2 )\n{\n*(float *)v5.m128i_i32 = sub_4028A0((__int64)a1);\nv24 = COERCE_FLOAT(_mm_cvtsi128_si32(v5));\n*(float *)v5.m128i_i32 = sub_402BB7((__int64)a1);\nv23 = COERCE_FLOAT(_mm_cvtsi128_si32(v5));\nfprintf(stdout, \" (Ti:%.1fC)\", *((float *)a1 + 30));\nif ( v24 > -270.0 )\nfprintf(stdout, \" (T2:%.1fC) (%.3fkHz)\", v24, v23 / 1000.0);\n}\n}\nif ( *((char *)a1 + 1256) > 2 && a2 )\nfprintf(stdout, \" (bat:%.2fV)\", *((float *)a1 + 31));\n}\nfputc(10, stdout);\n}\nif ( *((_BYTE *)a1 + 1265) && a2 )\n{\nv20 = 0LL;\nv17 = 758133069LL;\nv18 = 0LL;\nv19 = (double)(int)a1[1] / 1000.0 + (double)(int)*a1 * 604800.0;\nv29 = a1[2] - *((unsigned __int8 *)a1 + 129);\nv28 = *a1;\nif ( v29 < 0 )\n{\n--v28;\nv29 += 604800;\n}\nif ( *((_BYTE *)a1 + 1267) == 0x9F )\n{\nsub_4012F2((int)v28, v29, &v12, &v11, &v10);\nv29 %= 86400;\nv27 = v29 / 3600;\nv26 = v29 % 3600 / 60;\nv6 = (double)((int)a1[1] % 1000) / 1000.0 + (double)(v29 % 60);\nv25 = v6;\n}\nelse\n{\nv12 = a1[3];\nv11 = a1[4];\nv10 = a1[5];\nv27 = a1[7];\nv26 = a1[8];\nv25 = *((float *)a1 + 9);\n}\nstrncpy((char *)&v17 + 4, (const char *)a1 + 130, 0xCuLL);\nHIBYTE(v18) = 0;\nfor ( i = 0; *((_BYTE *)&v17 + i); ++i )\n{\nif ( *((_BYTE *)&v17 + i) == 32 )\n*((_BYTE *)&v17 + i) = 45;\n}\nfprintf(stdout, \"{ \\\"type\\\": \\\"%s\\\"\", \"M10\");\nv7 = v19 + 0.5;\nif ( v19 + 0.5 >= 9.223372036854776e18 )\nv8 = (unsigned int)(int)(v7 - 9.223372036854776e18) ^ 0x8000000000000000LL;\nelse\nv8 = (unsigned int)(int)v7;\nfprintf(stdout, \", \\\"frame\\\": %lu, \", v8);\nfprintf(\nstdout,\n\"\\\"id\\\": \\\"%s\\\", \\\"datetime\\\": \\\"%04d-%02d-%02dT%02d:%02d:%06.3fZ\\\", \\\"lat\\\": %.5f, \\\"lon\\\": %.5f, \\\"alt\\\": %.5f,\"\n\" \\\"vel_h\\\": %.5f, \\\"heading\\\": %.5f, \\\"vel_v\\\": %.5f\",\n(const char *)&v17,\nv12,\nv11,\nv10,\nv27,\nv26,\nv25,\n*((double *)a1 + 5),\n*((double *)a1 + 6),\n*((double *)a1 + 7),\n*((double *)a1 + 8),\n*((double *)a1 + 9),\n*((double *)a1 + 10));\nif ( *((_BYTE *)a1 + 1267) == 0x9F )\nfprintf(stdout, \", \\\"sats\\\": %d\", *((unsigned __int8 *)a1 + 128));\nv13 = *((_BYTE *)a1 + 242);\nv14 = a1[60] & 0xF;\nv15 = *((_BYTE *)a1 + 244);\nv16 = *((_BYTE *)a1 + 243);\nfprintf(stdout, \", \\\"aprsid\\\": \\\"ME%02X%1X%02X%02X\\\"\", v13, v14, v15, v16);\nfprintf(stdout, \", \\\"batt\\\": %.2f\", *((float *)a1 + 31));\nif ( *((_BYTE *)a1 + 1261) )\n{\nif ( *((float *)a1 + 28) > -273.0 )\nfprintf(stdout, \", \\\"temp\\\": %.1f\", *((float *)a1 + 28));\nif ( *((char *)a1 + 1256) > 1 && *((float *)a1 + 29) > -0.5 )\nfprintf(stdout, \", \\\"humidity\\\": %.1f\", *((float *)a1 + 29));\n}\nfprintf(\nstdout,\n\", \\\"rawid\\\": \\\"M10_%02X%02X%02X%02X%02X\\\"\",\n*((unsigned __int8 *)a1 + 240),\n*((unsigned __int8 *)a1 + 241),\n*((unsigned __int8 *)a1 + 242),\n*((unsigned __int8 *)a1 + 243),\n*((unsigned __int8 *)a1 + 244));\nfprintf(stdout, \", \\\"subtype\\\": \\\"0x%02X\\\"\", *((unsigned __int8 *)a1 + 1267));\nif ( (int)a1[313] > 0 )\nfprintf(stdout, \", \\\"freq\\\": %d\", a1[313]);\nfprintf(stdout, \", \\\"ref_datetime\\\": \\\"%s\\\"\", \"UTC\");\nfprintf(stdout, \", \\\"ref_position\\\": \\\"%s\\\"\", \"GPS\");\nfprintf(stdout, \", \\\"gpsutc_leapsec\\\": %d\", *((unsigned __int8 *)a1 + 129));\nv20 = \"1.6.1\";\nif ( \"1.6.1\" && *v20 )\nfprintf(stdout, \", \\\"version\\\": \\\"%s\\\"\", v20);\nfwrite(\" }\\n\", 1uLL, 3uLL, stdout);\nfputc(10, stdout);\n}\n}\nreturn v32;\n}\n\n\n\nQ:[a1,a2,v10,v11,v12,v13,v17,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v31,v32,sub_402E2B,sub_401594,sub_401649,sub_40184C,sub_4018F9,sub_4019A6,sub_401A53,sub_4021CC,sub_4022DF,sub_401E07,sub_401FC4,sub_4012F2,sub_4024F8,sub_402D2D,sub_402801,sub_402D7F,sub_401CDF,sub_4028A0,sub_402BB7,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'gpx', 'a2': 'csOK', 'v10': 'utc_tag', 'v11': 'utc_monat', 'v12': 'utc_jahr', 'v13': 'aprs_id', 'v17': 'sn_id', 'v19': 'sec_gps0', 'v20': 'ver_jsn', 'v21': 'fq555', 'v22': 't2', 'v23': 'fq555_0', 'v24': 't2_0', 'v25': 'utc_sek', 'v26': 'utc_min', 'v27': 'utc_std', 'v28': 'utc_week', 'v29': 'utc_s', 'v31': 'err2', 'v32': 'err', 'sub_402E2B': 'print_pos', 'sub_401594': 'get_GPSweek', 'sub_401649': 'get_GPStime', 'sub_40184C': 'get_GPSlat', 'sub_4018F9': 'get_GPSlon', 'sub_4019A6': 'get_GPSalt', 'sub_401A53': 'get_GPSvel', 'sub_4021CC': 'get_gtopGPStime', 'sub_4022DF': 'get_gtopGPSdate', 'sub_401E07': 'get_gtopGPSpos', 'sub_401FC4': 'get_gtopGPSvel', 'sub_4012F2': 'Gps2Date', 'sub_4024F8': 'get_Temp', 'sub_402D2D': 'get_RH', 'sub_402801': 'get_intTemp', 'sub_402D7F': 'get_BatV', 'sub_401CDF': 'get_SN', 'sub_4028A0': 'get_Tntc2', 'sub_402BB7': 'get_TLC555freq'}"} |
|
my_usr1 | cf9a12ad026865f3952a3a402c7254342c626d2dd2d8fd35d762aa375da920e1 | analogdevicesinc | linux | NA | void my_usr1(int sig, siginfo_t *si, void *u)
{
char *aa;
int err;
stack_t stk;
struct stk_data *p;
#if __s390x__
register unsigned long sp asm("%15");
#else
register unsigned long sp asm("sp");
#endif
if (sp < (unsigned long)sstack ||
sp >= (unsigned long)sstack + stack_size) {
ksft_exit_fail_msg("SP is not on sigaltstack\n");
}
/* put some data on stack. other sighandler will try to overwrite it */
aa = alloca(1024);
assert(aa);
p = (struct stk_data *)(aa + 512);
strcpy(p->msg, msg);
p->flag = 1;
ksft_print_msg("[RUN]\tsignal USR1\n");
err = sigaltstack(NULL, &stk);
if (err) {
ksft_exit_fail_msg("sigaltstack() - %s\n", strerror(errno));
exit(EXIT_FAILURE);
}
if (stk.ss_flags != SS_DISABLE)
ksft_test_result_fail("tss_flags=%x, should be SS_DISABLE\n",
stk.ss_flags);
else
ksft_test_result_pass(
"sigaltstack is disabled in sighandler\n");
swapcontext(&sc, &uc);
ksft_print_msg("%s\n", p->msg);
if (!p->flag) {
ksft_exit_fail_msg("[RUN]\tAborting\n");
exit(EXIT_FAILURE);
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4017B5", "function_addr": 4200373, "binary_name": "cf9a12ad026865f3952a3a402c7254342c626d2dd2d8fd35d762aa375da920e1.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_34], edi"], [4, "mov [rbp+var_40], rsi"], [5, "mov [rbp+var_48], rdx"], [6, "mov rdx, rsp"], [7, "mov rax, cs:qword_404120"], [8, "cmp rdx, rax"], [9, "jb short loc_4017F1"], [10, "mov eax, cs:len"], [11, "mov edx, eax"], [12, "mov rax, cs:qword_404120"], [13, "add rax, rdx"], [14, "mov rdx, rsp"], [15, "cmp rax, rdx"], [16, "ja short loc_401800"], [17, "mov edi, offset aSpIsNotOnSigal"], [18, "mov eax, 0"], [19, "call sub_4016DE"], [20, "mov eax, 10h"], [21, "sub rax, 1"], [22, "add rax, 408h"], [23, "mov ecx, 10h"], [24, "mov edx, 0"], [25, "div rcx"], [26, "imul rax, 10h"], [27, "sub rsp, rax"], [28, "mov rax, rsp"], [29, "add rax, 0Fh"], [30, "shr rax, 4"], [31, "shl rax, 4"], [32, "mov [rbp+var_8], rax"], [33, "cmp [rbp+var_8], 0"], [34, "jnz short loc_401856"], [35, "mov ecx, offset function"], [36, "mov edx, 3Dh "], [37, "mov esi, offset file"], [38, "mov edi, offset assertion"], [39, "call ___assert_fail"], [40, "mov rax, [rbp+var_8]"], [41, "add rax, 200h"], [42, "mov [rbp+dest], rax"], [43, "mov rdx, cs:needle"], [44, "mov rax, [rbp+dest]"], [45, "mov rsi, rdx"], [46, "mov rdi, rax"], [47, "call _strcpy"], [48, "mov rax, [rbp+dest]"], [49, "mov dword ptr [rax+80h], 1"], [50, "mov edi, offset aRunSignalUsr1"], [51, "mov eax, 0"], [52, "call sub_40135D"], [53, "lea rax, [rbp+var_30]"], [54, "mov rsi, rax"], [55, "mov edi, 0"], [56, "call _sigaltstack"], [57, "mov [rbp+var_14], eax"], [58, "cmp [rbp+var_14], 0"], [59, "jz short loc_4018DB"], [60, "call ___errno_location"], [61, "mov eax, [rax]"], [62, "mov edi, eax"], [63, "call _strerror"], [64, "mov rsi, rax"], [65, "mov edi, offset aSigaltstackS"], [66, "mov eax, 0"], [67, "call sub_4016DE"], [68, "mov edi, 1"], [69, "call _exit"], [70, "mov eax, [rbp+var_28]"], [71, "cmp eax, 2"], [72, "jz short loc_4018F9"], [73, "mov eax, [rbp+var_28]"], [74, "mov esi, eax"], [75, "mov edi, offset aTssFlagsXShoul"], [76, "mov eax, 0"], [77, "call sub_401509"], [78, "jmp short loc_401908"], [79, "mov edi, offset aSigaltstackIsD"], [80, "mov eax, 0"], [81, "call sub_401428"], [82, "mov esi, offset ucp"], [83, "mov edi, offset oucp"], [84, "call _swapcontext"], [85, "mov rax, [rbp+dest]"], [86, "mov rsi, rax"], [87, "mov edi, offset aS"], [88, "mov eax, 0"], [89, "call sub_40135D"], [90, "mov rax, [rbp+dest]"], [91, "mov eax, [rax+80h]"], [92, "test eax, eax"], [93, "jnz short loc_401954"], [94, "mov edi, offset aRunAborting"], [95, "mov eax, 0"], [96, "call sub_4016DE"], [97, "mov edi, 1"], [98, "call _exit"], [99, "nop"], [100, "leave"], [101, "retn"]], "data_dep": [[6, 2], [8, 6], [8, 7], [9, 8], [11, 10], [13, 11], [13, 12], [14, 2], [15, 14], [15, 13], [16, 15], [21, 20], [22, 21], [25, 23], [26, 22], [27, 2], [27, 26], [28, 27], [29, 28], [30, 29], [31, 30], [32, 31], [33, 32], [34, 33], [40, 32], [41, 40], [42, 41], [44, 42], [45, 43], [46, 44], [48, 42], [49, 48], [53, 52], [54, 53], [57, 56], [58, 57], [59, 58], [61, 49], [61, 60], [62, 61], [64, 63], [71, 70], [72, 71], [74, 73], [85, 42], [86, 85], [90, 42], [91, 49], [91, 90], [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/cf9a12ad026865f3952a3a402c7254342c626d2dd2d8fd35d762aa375da920e1_cf9a12ad026865f3952a3a402c7254342c626d2dd2d8fd35d762aa375da920e1.jsonl.gz", "strip_func_name": "sub_4017B5", "query": "\n\n\n__int64 __fastcall sub_4017B5(int a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\nvoid *v6; // rsp\nchar *v7; // rsi\n__int64 v8; // rdx\n__int64 v9; // rcx\n__int64 v10; // r8\n__int64 v11; // r9\n__int64 v12; // rdx\n__int64 v13; // rcx\n__int64 v14; // r8\n__int64 v15; // r9\nint *v16; // rax\nchar *v17; // rax\n__int64 v18; // rdx\n__int64 v19; // rcx\n__int64 v20; // r8\n__int64 v21; // r9\nchar *v22; // rsi\n__int64 v23; // rdx\n__int64 v24; // rcx\n__int64 v25; // r8\n__int64 v26; // r9\n__int64 v27; // rdx\n__int64 v28; // rcx\n__int64 v29; // r8\n__int64 v30; // r9\n__int64 result; // rax\n__int64 v32; // [rsp+0h] [rbp-50h] BYREF\n__int64 v33[2]; // [rsp+8h] [rbp-48h] BYREF\nint v34; // [rsp+1Ch] [rbp-34h]\nstruct sigaltstack v35; // [rsp+20h] [rbp-30h] BYREF\nchar *dest; // [rsp+40h] [rbp-10h]\nunsigned __int64 v38; // [rsp+48h] [rbp-8h]\n\nv34 = a1;\nv33[1] = a2;\nv33[0] = a3;\nif ( (unsigned __int64)&v32 < qword_404120\n|| (unsigned __int64)(unsigned int)len + qword_404120 <= (unsigned __int64)&v32 )\n{\nsub_4016DE(\"SP is not on sigaltstack\\n\", a2, (__int64)&v32, a4, a5, a6);\n}\nv6 = alloca(1040LL);\nv38 = 16 * (((unsigned __int64)v33 + 7) >> 4);\nif ( !v38 )\n__assert_fail(\"aa\", \"sas.c\", 0x3Du, \"my_usr1\");\ndest = (char *)(v38 + 512);\nv7 = needle;\nstrcpy((char *)(v38 + 512), needle);\n*((_DWORD *)dest + 32) = 1;\nsub_40135D(\"[RUN]\\tsignal USR1\\n\", (__int64)v7, v8, v9, v10, v11);\nif ( sigaltstack(0LL, &v35) )\n{\nv16 = __errno_location();\nv17 = strerror(*v16);\nsub_4016DE(\"sigaltstack() - %s\\n\", (__int64)v17, v18, v19, v20, v21);\n}\nif ( v35.ss_flags == 2 )\nsub_401428(\"sigaltstack is disabled in sighandler\\n\", (__int64)&v35, v12, v13, v14, v15);\nelse\nsub_401509(\"tss_flags=%x, should be SS_DISABLE\\n\", (unsigned int)v35.ss_flags, v12, v13, v14, v15);\nswapcontext(&oucp, &ucp);\nv22 = dest;\nsub_40135D(\"%s\\n\", (__int64)dest, v23, v24, v25, v26);\nresult = *((unsigned int *)dest + 32);\nif ( !(_DWORD)result )\nsub_4016DE(\"[RUN]\\tAborting\\n\", (__int64)v22, v27, v28, v29, v30);\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v22,v8,v33,v34,v35,dest,v38,sub_4017B5,sub_4016DE,sub_40135D,sub_401428,sub_401509,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'u', 'a1': 'sig', 'a2': 'si_0', 'v22': 'si_0', 'v8': 'u', 'v33': 'ua', 'v34': 'siga', 'v35': 'stk', 'dest': 'p', 'v38': 'aa', 'sub_4017B5': 'my_usr1', 'sub_4016DE': 'ksft_exit_fail_msg', 'sub_40135D': 'ksft_print_msg', 'sub_401428': 'ksft_test_result_pass', 'sub_401509': 'ksft_test_result_fail'}"} |
|
_doSetFixedOutputState | c554d64d8507512ec7c5460397d7e8fd60edb662d620824236cdfae536ce1f50 | sraoss | pgsql-ivm | NA | static void
_doSetFixedOutputState(ArchiveHandle *AH)
{
RestoreOptions *ropt = AH->public.ropt;
/*
* Disable timeouts to allow for slow commands, idle parallel workers, etc
*/
ahprintf(AH, "SET statement_timeout = 0;\n");
ahprintf(AH, "SET lock_timeout = 0;\n");
ahprintf(AH, "SET idle_in_transaction_session_timeout = 0;\n");
/* Select the correct character set encoding */
ahprintf(AH, "SET client_encoding = '%s';\n",
pg_encoding_to_char(AH->public.encoding));
/* Select the correct string literal syntax */
ahprintf(AH, "SET standard_conforming_strings = %s;\n",
AH->public.std_strings ? "on" : "off");
/* Select the role to be used during restore */
if (ropt && ropt->use_role)
ahprintf(AH, "SET ROLE %s;\n", fmtId(ropt->use_role));
/* Select the dump-time search_path */
if (AH->public.searchpath)
ahprintf(AH, "%s", AH->public.searchpath);
/* Make sure function checking is disabled */
ahprintf(AH, "SET check_function_bodies = false;\n");
/* Ensure that all valid XML data will be accepted */
ahprintf(AH, "SET xmloption = content;\n");
/* Avoid annoying notices etc */
ahprintf(AH, "SET client_min_messages = warning;\n");
if (!AH->public.std_strings)
ahprintf(AH, "SET escape_string_warning = off;\n");
/* Adjust row-security state */
if (ropt && ropt->enable_row_security)
ahprintf(AH, "SET row_security = on;\n");
else
ahprintf(AH, "SET row_security = off;\n");
ahprintf(AH, "\n");
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_440795", "function_addr": 4458389, "binary_name": "c554d64d8507512ec7c5460397d7e8fd60edb662d620824236cdfae536ce1f50.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+8]"], [6, "mov [rbp+var_8], rax"], [7, "mov rax, [rbp+var_18]"], [8, "mov esi, offset aSetStatementTi_1"], [9, "mov rdi, rax"], [10, "mov eax, 0"], [11, "call sub_43D336"], [12, "mov rax, [rbp+var_18]"], [13, "mov esi, offset aSetLockTimeout_0"], [14, "mov rdi, rax"], [15, "mov eax, 0"], [16, "call sub_43D336"], [17, "mov rax, [rbp+var_18]"], [18, "mov esi, offset aSetIdleInTrans_0"], [19, "mov rdi, rax"], [20, "mov eax, 0"], [21, "call sub_43D336"], [22, "mov rax, [rbp+var_18]"], [23, "mov eax, [rax+40h]"], [24, "mov edi, eax"], [25, "call pg_encoding_to_char"], [26, "mov rdx, rax"], [27, "mov rax, [rbp+var_18]"], [28, "mov esi, offset aSetClientEncod_0"], [29, "mov rdi, rax"], [30, "mov eax, 0"], [31, "call sub_43D336"], [32, "mov rax, [rbp+var_18]"], [33, "movzx eax, byte ptr [rax+44h]"], [34, "test al, al"], [35, "jz short loc_440829"], [36, "mov edx, offset aOn_2"], [37, "jmp short loc_44082E"], [38, "mov edx, offset aOff_1"], [39, "mov rax, [rbp+var_18]"], [40, "mov esi, offset aSetStandardCon_0"], [41, "mov rdi, rax"], [42, "mov eax, 0"], [43, "call sub_43D336"], [44, "cmp [rbp+var_8], 0"], [45, "jz short loc_440881"], [46, "mov rax, [rbp+var_8]"], [47, "mov rax, [rax+20h]"], [48, "test rax, rax"], [49, "jz short loc_440881"], [50, "mov rax, [rbp+var_8]"], [51, "mov rax, [rax+20h]"], [52, "mov rdi, rax"], [53, "call sub_44A799"], [54, "mov rdx, rax"], [55, "mov rax, [rbp+var_18]"], [56, "mov esi, offset aSetRoleS_0"], [57, "mov rdi, rax"], [58, "mov eax, 0"], [59, "call sub_43D336"], [60, "mov rax, [rbp+var_18]"], [61, "mov rax, [rax+48h]"], [62, "test rax, rax"], [63, "jz short loc_4408AC"], [64, "mov rax, [rbp+var_18]"], [65, "mov rdx, [rax+48h]"], [66, "mov rax, [rbp+var_18]"], [67, "mov esi, offset aS_24"], [68, "mov rdi, rax"], [69, "mov eax, 0"], [70, "call sub_43D336"], [71, "mov rax, [rbp+var_18]"], [72, "mov esi, offset aSetCheckFuncti"], [73, "mov rdi, rax"], [74, "mov eax, 0"], [75, "call sub_43D336"], [76, "mov rax, [rbp+var_18]"], [77, "mov esi, offset aSetXmloptionCo"], [78, "mov rdi, rax"], [79, "mov eax, 0"], [80, "call sub_43D336"], [81, "mov rax, [rbp+var_18]"], [82, "mov esi, offset aSetClientMinMe"], [83, "mov rdi, rax"], [84, "mov eax, 0"], [85, "call sub_43D336"], [86, "mov rax, [rbp+var_18]"], [87, "movzx eax, byte ptr [rax+44h]"], [88, "xor eax, 1"], [89, "test al, al"], [90, "jz short loc_440913"], [91, "mov rax, [rbp+var_18]"], [92, "mov esi, offset aSetEscapeStrin"], [93, "mov rdi, rax"], [94, "mov eax, 0"], [95, "call sub_43D336"], [96, "cmp [rbp+var_8], 0"], [97, "jz short loc_440940"], [98, "mov rax, [rbp+var_8]"], [99, "mov eax, [rax+180h]"], [100, "test eax, eax"], [101, "jz short loc_440940"], [102, "mov rax, [rbp+var_18]"], [103, "mov esi, offset aSetRowSecurity_1"], [104, "mov rdi, rax"], [105, "mov eax, 0"], [106, "call sub_43D336"], [107, "jmp short loc_440956"], [108, "mov rax, [rbp+var_18]"], [109, "mov esi, offset aSetRowSecurity_2"], [110, "mov rdi, rax"], [111, "mov eax, 0"], [112, "call sub_43D336"], [113, "mov rax, [rbp+var_18]"], [114, "mov esi, offset asc_467AF1"], [115, "mov rdi, rax"], [116, "mov eax, 0"], [117, "call sub_43D336"], [118, "nop"], [119, "leave"], [120, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 3], [9, 7], [12, 3], [14, 12], [17, 3], [19, 17], [22, 3], [23, 22], [24, 23], [26, 25], [27, 3], [29, 27], [32, 3], [33, 32], [34, 33], [35, 34], [39, 3], [41, 39], [44, 6], [45, 44], [46, 6], [47, 46], [48, 47], [49, 48], [50, 6], [51, 50], [52, 51], [54, 53], [55, 3], [57, 55], [60, 3], [61, 60], [62, 61], [63, 62], [64, 3], [65, 64], [66, 3], [68, 66], [71, 3], [73, 71], [76, 3], [78, 76], [81, 3], [83, 81], [86, 3], [87, 86], [88, 87], [89, 88], [90, 89], [91, 3], [93, 91], [96, 6], [97, 96], [98, 6], [99, 98], [100, 99], [101, 100], [102, 3], [104, 102], [108, 3], [110, 108], [113, 3], [115, 113], [120, 117]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c554d64d8507512ec7c5460397d7e8fd60edb662d620824236cdfae536ce1f50_c554d64d8507512ec7c5460397d7e8fd60edb662d620824236cdfae536ce1f50.jsonl.gz", "strip_func_name": "sub_440795", "query": "\n\n\nunsigned __int64 __fastcall sub_440795(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 v6; // rdx\n__int64 v7; // rcx\n__int64 v8; // r8\n__int64 v9; // r9\n__int64 v10; // rdx\n__int64 v11; // rcx\n__int64 v12; // r8\n__int64 v13; // r9\n__int64 v14; // rax\n__int64 v15; // rcx\n__int64 v16; // r8\n__int64 v17; // r9\n__int64 v18; // rcx\n__int64 v19; // r8\n__int64 v20; // r9\nconst char *v21; // rdx\n__int64 v22; // rdx\n__int64 v23; // rcx\n__int64 v24; // r8\n__int64 v25; // r9\n__int64 v26; // rax\n__int64 v27; // rcx\n__int64 v28; // r8\n__int64 v29; // r9\n__int64 v30; // rdx\n__int64 v31; // rcx\n__int64 v32; // r8\n__int64 v33; // r9\n__int64 v34; // rdx\n__int64 v35; // rcx\n__int64 v36; // r8\n__int64 v37; // r9\n__int64 v38; // rdx\n__int64 v39; // rcx\n__int64 v40; // r8\n__int64 v41; // r9\n__int64 v42; // rdx\n__int64 v43; // rcx\n__int64 v44; // r8\n__int64 v45; // r9\n__int64 v47; // [rsp+18h] [rbp-8h]\n\nv47 = *(_QWORD *)(a1 + 8);\nsub_43D336(a1, (__int64)\"SET statement_timeout = 0;\\n\", a3, a4, a5, a6);\nsub_43D336(a1, (__int64)\"SET lock_timeout = 0;\\n\", v6, v7, v8, v9);\nsub_43D336(a1, (__int64)\"SET idle_in_transaction_session_timeout = 0;\\n\", v10, v11, v12, v13);\nv14 = pg_encoding_to_char(*(unsigned int *)(a1 + 64));\nsub_43D336(a1, (__int64)\"SET client_encoding = '%s';\\n\", v14, v15, v16, v17);\nif ( *(_BYTE *)(a1 + 68) )\nv21 = \"on\";\nelse\nv21 = \"off\";\nsub_43D336(a1, (__int64)\"SET standard_conforming_strings = %s;\\n\", (__int64)v21, v18, v19, v20);\nif ( v47 && *(_QWORD *)(v47 + 32) )\n{\nv26 = sub_44A799(*(_QWORD *)(v47 + 32));\nsub_43D336(a1, (__int64)\"SET ROLE %s;\\n\", v26, v27, v28, v29);\n}\nif ( *(_QWORD *)(a1 + 72) )\nsub_43D336(a1, (__int64)\"%s\", *(_QWORD *)(a1 + 72), v23, v24, v25);\nsub_43D336(a1, (__int64)\"SET check_function_bodies = false;\\n\", v22, v23, v24, v25);\nsub_43D336(a1, (__int64)\"SET xmloption = content;\\n\", v30, v31, v32, v33);\nsub_43D336(a1, (__int64)\"SET client_min_messages = warning;\\n\", v34, v35, v36, v37);\nif ( *(_BYTE *)(a1 + 68) != 1 )\nsub_43D336(a1, (__int64)\"SET escape_string_warning = off;\\n\", v38, v39, v40, v41);\nif ( v47 && *(_DWORD *)(v47 + 384) )\nsub_43D336(a1, (__int64)\"SET row_security = on;\\n\", v38, v39, v40, v41);\nelse\nsub_43D336(a1, (__int64)\"SET row_security = off;\\n\", v38, v39, v40, v41);\nreturn sub_43D336(a1, (__int64)\"\\n\", v42, v43, v44, v45);\n}\n\n\n\nQ:[a1,v47,sub_440795,sub_43D336,sub_44A799,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'AH_0', 'v47': 'ropt', 'sub_440795': '_doSetFixedOutputState', 'sub_43D336': 'ahprintf', 'sub_44A799': 'fmtId'}"} |
|
p2p_update_peer_vendor_elems | 8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f | sonic-net | sonic-buildimage | NA | static void p2p_update_peer_vendor_elems(struct p2p_device *dev, const u8 *ies,
size_t ies_len)
{
const u8 *pos, *end;
u8 id, len;
wpabuf_free(dev->info.vendor_elems);
dev->info.vendor_elems = NULL;
end = ies + ies_len;
for (pos = ies; end - pos > 1; pos += len) {
id = *pos++;
len = *pos++;
if (len > end - pos)
break;
if (id != WLAN_EID_VENDOR_SPECIFIC || len < 3)
continue;
if (len >= 4) {
u32 type = WPA_GET_BE32(pos);
if (type == WPA_IE_VENDOR_TYPE ||
type == WMM_IE_VENDOR_TYPE ||
type == WPS_IE_VENDOR_TYPE ||
type == P2P_IE_VENDOR_TYPE ||
type == WFD_IE_VENDOR_TYPE)
continue;
}
/* Unknown vendor element - make raw IE data available */
if (wpabuf_resize(&dev->info.vendor_elems, 2 + len) < 0)
break;
wpabuf_put_data(dev->info.vendor_elems, pos - 2, 2 + len);
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A66C", "function_addr": 4236908, "binary_name": "8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov rax, [rbp+var_28]"], [7, "mov rax, [rax+1F0h]"], [8, "mov rdi, rax"], [9, "call sub_440FFE"], [10, "mov rax, [rbp+var_28]"], [11, "mov qword ptr [rax+1F0h], 0"], [12, "mov rdx, [rbp+var_30]"], [13, "mov rax, [rbp+var_38]"], [14, "add rax, rdx"], [15, "mov [rbp+var_10], rax"], [16, "mov rax, [rbp+var_30]"], [17, "mov [rbp+var_8], rax"], [18, "jmp loc_40A7A6"], [19, "mov rax, [rbp+var_8]"], [20, "lea rdx, [rax+1]"], [21, "mov [rbp+var_8], rdx"], [22, "movzx eax, byte ptr [rax]"], [23, "mov [rbp+var_11], al"], [24, "mov rax, [rbp+var_8]"], [25, "lea rdx, [rax+1]"], [26, "mov [rbp+var_8], rdx"], [27, "movzx eax, byte ptr [rax]"], [28, "mov [rbp+var_12], al"], [29, "movzx edx, [rbp+var_12]"], [30, "mov rax, [rbp+var_10]"], [31, "sub rax, [rbp+var_8]"], [32, "cmp rdx, rax"], [33, "jg loc_40A7BA"], [34, "cmp [rbp+var_11], 0DDh"], [35, "jnz loc_40A79A"], [36, "cmp [rbp+var_12], 2"], [37, "jbe loc_40A79A"], [38, "cmp [rbp+var_12], 3"], [39, "jbe short loc_40A74D"], [40, "mov rax, [rbp+var_8]"], [41, "mov rdi, rax"], [42, "call sub_408CCC"], [43, "mov [rbp+var_18], eax"], [44, "cmp [rbp+var_18], 50F201h"], [45, "jz short loc_40A79D"], [46, "cmp [rbp+var_18], 50F202h"], [47, "jz short loc_40A79D"], [48, "cmp [rbp+var_18], 50F204h"], [49, "jz short loc_40A79D"], [50, "cmp [rbp+var_18], 506F9A09h"], [51, "jz short loc_40A79D"], [52, "cmp [rbp+var_18], 506F9A0Ah"], [53, "jz short loc_40A79D"], [54, "movzx eax, [rbp+var_12]"], [55, "add eax, 2"], [56, "cdqe"], [57, "mov rdx, [rbp+var_28]"], [58, "add rdx, 1F0h"], [59, "mov rsi, rax"], [60, "mov rdi, rdx"], [61, "call sub_440D16"], [62, "test eax, eax"], [63, "js short loc_40A7BD"], [64, "movzx eax, [rbp+var_12]"], [65, "add eax, 2"], [66, "movsxd rdx, eax"], [67, "mov rax, [rbp+var_8]"], [68, "lea rcx, [rax-2]"], [69, "mov rax, [rbp+var_28]"], [70, "mov rax, [rax+1F0h]"], [71, "mov rsi, rcx"], [72, "mov rdi, rax"], [73, "call sub_408E62"], [74, "jmp short loc_40A79E"], [75, "nop"], [76, "jmp short loc_40A79E"], [77, "nop"], [78, "movzx eax, [rbp+var_12]"], [79, "add [rbp+var_8], rax"], [80, "mov rax, [rbp+var_10]"], [81, "sub rax, [rbp+var_8]"], [82, "cmp rax, 1"], [83, "jg loc_40A6BE"], [84, "jmp short loc_40A7BE"], [85, "nop"], [86, "jmp short loc_40A7BE"], [87, "nop"], [88, "nop"], [89, "leave"], [90, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [10, 3], [11, 10], [12, 4], [13, 5], [14, 13], [14, 12], [15, 14], [16, 4], [17, 16], [19, 79], [19, 17], [20, 29], [20, 19], [20, 12], [20, 66], [20, 11], [21, 20], [22, 19], [22, 11], [23, 22], [24, 21], [25, 11], [25, 20], [25, 24], [26, 25], [27, 24], [27, 11], [28, 27], [29, 28], [30, 15], [31, 26], [31, 30], [32, 29], [32, 31], [33, 32], [34, 23], [35, 34], [36, 28], [37, 36], [38, 28], [39, 38], [40, 26], [41, 40], [43, 42], [44, 43], [45, 44], [46, 43], [47, 46], [48, 43], [49, 48], [50, 43], [51, 50], [52, 43], [53, 52], [54, 28], [55, 54], [57, 3], [58, 57], [59, 55], [60, 58], [62, 61], [63, 62], [64, 28], [65, 64], [66, 65], [67, 26], [68, 11], [68, 68], [68, 67], [69, 3], [70, 11], [70, 69], [71, 68], [72, 70], [78, 28], [79, 26], [79, 78], [80, 15], [81, 80], [81, 79], [81, 17], [82, 81], [83, 82], [90, 81], [90, 62], [90, 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/8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f_8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f.jsonl.gz", "strip_func_name": "sub_40A66C", "query": "\n\n\n__int64 __fastcall sub_40A66C(__int64 a1, _BYTE *a2, __int64 a3)\n{\nunsigned __int8 *v3; // rax\n__int64 result; // rax\nint v6; // [rsp+28h] [rbp-18h]\nunsigned __int8 v7; // [rsp+2Eh] [rbp-12h]\nchar v8; // [rsp+2Fh] [rbp-11h]\n_BYTE *v9; // [rsp+30h] [rbp-10h]\n_BYTE *i; // [rsp+38h] [rbp-8h]\nunsigned int *v11; // [rsp+38h] [rbp-8h]\n\nsub_440FFE(*(_QWORD *)(a1 + 496));\n*(_QWORD *)(a1 + 496) = 0LL;\nv9 = &a2[a3];\nfor ( i = a2; ; i = (char *)v11 + v7 )\n{\nresult = v9 - i;\nif ( v9 - i <= 1 )\nbreak;\nv8 = *i;\nv3 = i + 1;\nv11 = (unsigned int *)(i + 2);\nv7 = *v3;\nresult = v9 - (_BYTE *)v11;\nif ( v7 > v9 - (_BYTE *)v11 )\nbreak;\nif ( v8 == -35 && v7 > 2u )\n{\nif ( v7 <= 3u\n|| (v6 = sub_408CCC(v11), v6 != 5304833)\n&& v6 != 5304834\n&& v6 != 5304836\n&& v6 != 1349491209\n&& v6 != 1349491210 )\n{\nresult = sub_440D16(a1 + 496, v7 + 2);\nif ( (int)result < 0 )\nreturn result;\nsub_408E62(*(_QWORD *)(a1 + 496), (char *)v11 - 2, v7 + 2);\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v6,v7,v8,v9,i,sub_40A66C,sub_440FFE,sub_408CCC,sub_440D16,sub_408E62,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'ies_len', 'a1': 'dev', 'a2': 'ies', 'v6': 'type', 'v7': 'len', 'v8': 'id', 'v9': 'end', 'i': 'pos', 'sub_40A66C': 'p2p_update_peer_vendor_elems', 'sub_440FFE': 'wpabuf_free', 'sub_408CCC': 'WPA_GET_BE32', 'sub_440D16': 'wpabuf_resize', 'sub_408E62': 'wpabuf_put_data'}"} |
|
gpu_buffer_kmer_filter_get_max_queries | 2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3 | smarco | gem3-mapper | NA | uint64_t gpu_buffer_kmer_filter_get_max_queries(
gpu_buffer_kmer_filter_t* const gpu_buffer_kmer_filter) { GEM_CUDA_NOT_SUPPORTED(); return 0; } | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_431B78", "function_addr": 4397944, "binary_name": "2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "call sub_4681EB"], [5, "mov [rbp+stream], rax"], [6, "call sub_468277"], [7, "xor eax, 1"], [8, "test al, al"], [9, "jz short loc_431BE4"], [10, "mov [rbp+var_10], 0"], [11, "cmp [rbp+var_10], 0"], [12, "jz short loc_431BB2"], [13, "mov rax, [rbp+var_10]"], [14, "lea rdx, [rax+1]"], [15, "jmp short loc_431BB7"], [16, "mov edx, offset aGpuBufferKmerF"], [17, "mov rax, [rbp+stream]"], [18, "mov r8d, offset aGpuBufferKmerF_3"], [19, "mov ecx, 160h"], [20, "mov esi, offset aGemFatalerrorS_51"], [21, "mov rdi, rax"], [22, "mov eax, 0"], [23, "call _fprintf"], [24, "mov rax, [rbp+stream]"], [25, "mov rdi, rax"], [26, "call _fflush"], [27, "mov eax, 0"], [28, "call sub_4681C8"], [29, "mov rdx, [rbp+stream]"], [30, "mov rdi, rdx"], [31, "call rax"], [32, "call sub_420130"], [33, "mov edi, 1"], [34, "call _exit"]], "data_dep": [[5, 4], [7, 6], [8, 7], [9, 8], [11, 10], [12, 11], [13, 10], [14, 13], [17, 5], [21, 17], [24, 5], [25, 24], [29, 5], [30, 29], [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/2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3_2628714fc89bbd06927f17c35c7cc10c3c4f3a82276ea56c58894e172e8f25b3.jsonl.gz", "strip_func_name": "sub_431B78", "query": "\n\n\nvoid __fastcall __noreturn sub_431B78(FILE *a1)\n{\nvoid (__fastcall *v1)(FILE *); // rax\nFILE *stream; // [rsp+18h] [rbp-8h]\n\nstream = (FILE *)sub_4681EB(a1);\nif ( (unsigned __int8)sub_468277(a1) != 1 )\n{\nfprintf(\nstream,\n\"GEM::FatalError (%s:%d,%s)\\n No CUDA support detected\\n\",\n\"gpu_buffer_kmer_filter.c\",\n352LL,\n\"gpu_buffer_kmer_filter_get_max_queries\");\na1 = stream;\nfflush(stream);\n}\nv1 = (void (__fastcall *)(FILE *))sub_4681C8(a1);\nv1(stream);\nsub_420130();\nexit(1);\n}\n\n\n\nQ:[a1,stream,sub_431B78,sub_4681EB,sub_468277,sub_4681C8,sub_420130,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'gpu_buffer_kmer_filter', 'stream': 'gem_stream', 'sub_431B78': 'gpu_buffer_kmer_filter_get_max_queries', 'sub_4681EB': 'gem_error_get_stream', 'sub_468277': 'gem_is_mute_error_stream', 'sub_4681C8': 'gem_error_get_report_function', 'sub_420130': 'gem_print_stack_trace'}"} |
|
hci_le_rm_white_list | 89a56c46f037f898ed5be52119007206f2226613e013c90a587db00e358dc334 | IanHarvey | bluepy | NA | int hci_le_rm_white_list(int dd, const bdaddr_t *bdaddr, uint8_t type, int to)
{
struct hci_request rq;
le_remove_device_from_white_list_cp cp;
uint8_t status;
memset(&cp, 0, sizeof(cp));
cp.bdaddr_type = type;
bacpy(&cp.bdaddr, bdaddr);
memset(&rq, 0, sizeof(rq));
rq.ogf = OGF_LE_CTL;
rq.ocf = OCF_LE_REMOVE_DEVICE_FROM_WHITE_LIST;
rq.cparam = &cp;
rq.clen = LE_REMOVE_DEVICE_FROM_WHITE_LIST_CP_SIZE;
rq.rparam = &status;
rq.rlen = 1;
if (hci_send_req(dd, &rq, to) < 0)
return -1;
if (status) {
errno = EIO;
return -1;
}
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40C892", "function_addr": 4245650, "binary_name": "89a56c46f037f898ed5be52119007206f2226613e013c90a587db00e358dc334.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_44], edi"], [4, "mov [rbp+var_50], rsi"], [5, "mov eax, edx"], [6, "mov [rbp+var_54], ecx"], [7, "mov [rbp+var_48], al"], [8, "lea rax, [rbp+s]"], [9, "mov edx, 7"], [10, "mov esi, 0"], [11, "mov rdi, rax"], [12, "call _memset"], [13, "movzx eax, [rbp+var_48]"], [14, "mov [rbp+s], al"], [15, "mov rax, [rbp+var_50]"], [16, "lea rdx, [rbp+s]"], [17, "add rdx, 1"], [18, "mov rsi, rax"], [19, "mov rdi, rdx"], [20, "call sub_40ABCC"], [21, "lea rax, [rbp+var_30]"], [22, "mov edx, 28h "], [23, "mov esi, 0"], [24, "mov rdi, rax"], [25, "call _memset"], [26, "mov [rbp+var_30], 8"], [27, "mov [rbp+var_2E], 12h"], [28, "lea rax, [rbp+s]"], [29, "mov [rbp+var_28], rax"], [30, "mov [rbp+var_20], 7"], [31, "lea rax, [rbp+var_38]"], [32, "mov [rbp+var_18], rax"], [33, "mov [rbp+var_10], 1"], [34, "mov edx, [rbp+var_54]"], [35, "lea rcx, [rbp+var_30]"], [36, "mov eax, [rbp+var_44]"], [37, "mov rsi, rcx"], [38, "mov edi, eax"], [39, "call sub_40C022"], [40, "test eax, eax"], [41, "jns short loc_40C93C"], [42, "mov eax, 0FFFFFFFFh"], [43, "jmp short locret_40C95B"], [44, "movzx eax, [rbp+var_38]"], [45, "test al, al"], [46, "jz short loc_40C956"], [47, "call ___errno_location"], [48, "mov dword ptr [rax], 5"], [49, "mov eax, 0FFFFFFFFh"], [50, "jmp short locret_40C95B"], [51, "mov eax, 0"], [52, "leave"], [53, "retn"]], "data_dep": [[7, 5], [8, 5], [11, 8], [13, 7], [14, 13], [15, 4], [16, 9], [16, 14], [17, 16], [18, 15], [19, 17], [21, 20], [24, 21], [28, 14], [28, 25], [29, 28], [31, 28], [32, 31], [34, 6], [35, 26], [36, 3], [37, 35], [38, 36], [40, 39], [41, 40], [45, 44], [46, 45], [48, 47], [53, 49], [53, 42], [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/89a56c46f037f898ed5be52119007206f2226613e013c90a587db00e358dc334_89a56c46f037f898ed5be52119007206f2226613e013c90a587db00e358dc334.jsonl.gz", "strip_func_name": "sub_40C892", "query": "\n\n\n__int64 __fastcall sub_40C892(int a1, const void *a2, char a3, int a4)\n{\nchar v7; // [rsp+28h] [rbp-38h] BYREF\nchar s; // [rsp+29h] [rbp-37h] BYREF\n_BYTE v9[6]; // [rsp+2Ah] [rbp-36h] BYREF\n__int16 v10[4]; // [rsp+30h] [rbp-30h] BYREF\nchar *v11; // [rsp+38h] [rbp-28h]\nint v12; // [rsp+40h] [rbp-20h]\nchar *v13; // [rsp+48h] [rbp-18h]\nint v14; // [rsp+50h] [rbp-10h]\n\nmemset(&s, 0, 7uLL);\ns = a3;\nsub_40ABCC(v9, a2);\nmemset(v10, 0, 0x28uLL);\nv10[0] = 8;\nv10[1] = 18;\nv11 = &s;\nv12 = 7;\nv13 = &v7;\nv14 = 1;\nif ( (int)sub_40C022(a1, (__int64)v10, a4) < 0 )\nreturn 0xFFFFFFFFLL;\nif ( !v7 )\nreturn 0LL;\n*__errno_location() = 5;\nreturn 0xFFFFFFFFLL;\n}\n\n\n\nQ:[a3,a4,a1,a2,v7,s,v10,sub_40C892,sub_40ABCC,sub_40C022,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'type', 'a4': 'to', 'a1': 'dd', 'a2': 'bdaddr', 'v7': 'status', 's': 'cp', 'v10': 'rq', 'sub_40C892': 'hci_le_rm_white_list', 'sub_40ABCC': 'bacpy_0', 'sub_40C022': 'hci_send_req'}"} |
|
printhtml | db330a8c15274a231c3d1ac6f95cffb359ecf6dfe24af5984df0564fa5ae9d74 | mingodad | squilu | NA | static void
printhtml(Line *t, MMIOT *f)
{
int blanks;
for ( blanks=0; t ; t = t->next )
if ( S(t->text) ) {
for ( ; blanks; --blanks )
Qchar('\n', f);
Qwrite(T(t->text), S(t->text), f);
Qchar('\n', f);
}
else
blanks++;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40ACDA", "function_addr": 4238554, "binary_name": "db330a8c15274a231c3d1ac6f95cffb359ecf6dfe24af5984df0564fa5ae9d74.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_4], 0"], [6, "jmp short loc_40AD5A"], [7, "mov rax, [rbp+var_18]"], [8, "mov eax, [rax+8]"], [9, "test eax, eax"], [10, "jz short loc_40AD4A"], [11, "jmp short loc_40AD15"], [12, "mov rax, [rbp+var_20]"], [13, "mov rsi, rax"], [14, "mov edi, 0Ah"], [15, "call sub_406B98"], [16, "sub [rbp+var_4], 1"], [17, "cmp [rbp+var_4], 0"], [18, "jnz short loc_40AD00"], [19, "mov rax, [rbp+var_18]"], [20, "mov ecx, [rax+8]"], [21, "mov rax, [rbp+var_18]"], [22, "mov rax, [rax]"], [23, "mov rdx, [rbp+var_20]"], [24, "mov esi, ecx"], [25, "mov rdi, rax"], [26, "call sub_406DE4"], [27, "mov rax, [rbp+var_20]"], [28, "mov rsi, rax"], [29, "mov edi, 0Ah"], [30, "call sub_406B98"], [31, "jmp short loc_40AD4E"], [32, "add [rbp+var_4], 1"], [33, "mov rax, [rbp+var_18]"], [34, "mov rax, [rax+10h]"], [35, "mov [rbp+var_18], rax"], [36, "cmp [rbp+var_18], 0"], [37, "jnz short loc_40ACF3"], [38, "nop"], [39, "nop"], [40, "leave"], [41, "retn"]], "data_dep": [[7, 35], [7, 3], [8, 7], [9, 8], [10, 9], [12, 4], [13, 12], [16, 32], [16, 16], [16, 5], [17, 5], [17, 32], [17, 16], [18, 17], [19, 3], [19, 35], [20, 19], [21, 3], [21, 35], [22, 21], [23, 4], [24, 20], [25, 22], [27, 4], [28, 27], [32, 5], [32, 32], [32, 16], [33, 35], [33, 3], [34, 33], [35, 34], [36, 3], [36, 35], [37, 36], [41, 34]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/db330a8c15274a231c3d1ac6f95cffb359ecf6dfe24af5984df0564fa5ae9d74_db330a8c15274a231c3d1ac6f95cffb359ecf6dfe24af5984df0564fa5ae9d74.jsonl.gz", "strip_func_name": "sub_40ACDA", "query": "\n\n\n__int64 __fastcall sub_40ACDA(__int64 a1, __int64 a2)\n{\n__int64 result; // rax\nint v4; // [rsp+1Ch] [rbp-4h]\n\nv4 = 0;\nwhile ( a1 )\n{\nif ( *(_DWORD *)(a1 + 8) )\n{\nwhile ( v4 )\n{\nsub_406B98(10, a2);\n--v4;\n}\nsub_406DE4(*(char **)a1, *(_DWORD *)(a1 + 8), a2);\nsub_406B98(10, a2);\n}\nelse\n{\n++v4;\n}\nresult = *(_QWORD *)(a1 + 16);\na1 = result;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v4,sub_40ACDA,sub_406B98,sub_406DE4,]\nAssistant: ", "hints": "[]", "response": "{'a1': 't', 'a2': 'f', 'v4': 'blanks', 'sub_40ACDA': 'printhtml', 'sub_406B98': 'Qchar', 'sub_406DE4': 'Qwrite'}"} |
|
mulntt_ct_rev2std_naive | 7ee3673bf8033074c0974f596dc2bf0fe1fafd3fae15ae6387a5b222d1161264 | SRI-CSL | Bliss | NA | void mulntt_ct_rev2std_naive(int32_t *a, uint32_t n, const uint16_t *p, int32_t q) {
uint32_t j, s, t;
int32_t x, w;
for (t=1; t<n; t <<= 1) {
/*
* Each iteration processes n/t blocks of size t
* to produce n/2t blocks of size 2t
*
* For round t:
* w_t = omega^(n/2t)
* psi_t = psi^(n/2t)
* For a given j between 0 and t-1:
* w_t,j = psi_t * w_t^j
*/
for (j=0; j<t; j++) {
w = p[t + j]; // w = psi_t * w_t^j
for (s=j; s<n; s += t + t) {
// x = (a[s + t] * w) % Q;
x = a[s + t] * w;
a[s + t] = (a[s] - x) % q;
a[s] = (a[s] + x) % q;
}
}
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402B20", "function_addr": 4205344, "binary_name": "7ee3673bf8033074c0974f596dc2bf0fe1fafd3fae15ae6387a5b222d1161264.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_28], rdi"], [3, "mov [rbp+var_2C], esi"], [4, "mov [rbp+var_38], rdx"], [5, "mov [rbp+var_30], ecx"], [6, "mov [rbp+var_C], 1"], [7, "jmp loc_402C29"], [8, "mov [rbp+var_4], 0"], [9, "jmp loc_402C1A"], [10, "mov edx, [rbp+var_C]"], [11, "mov eax, [rbp+var_4]"], [12, "add eax, edx"], [13, "mov eax, eax"], [14, "lea rdx, [rax+rax]"], [15, "mov rax, [rbp+var_38]"], [16, "add rax, rdx"], [17, "movzx eax, word ptr [rax]"], [18, "movzx eax, ax"], [19, "mov [rbp+var_10], eax"], [20, "mov eax, [rbp+var_4]"], [21, "mov [rbp+var_8], eax"], [22, "jmp loc_402C0A"], [23, "mov edx, [rbp+var_8]"], [24, "mov eax, [rbp+var_C]"], [25, "add eax, edx"], [26, "mov eax, eax"], [27, "lea rdx, ds:0[rax*4]"], [28, "mov rax, [rbp+var_28]"], [29, "add rax, rdx"], [30, "mov eax, [rax]"], [31, "mov edx, [rbp+var_10]"], [32, "imul eax, edx"], [33, "mov [rbp+var_14], eax"], [34, "mov eax, [rbp+var_8]"], [35, "lea rdx, ds:0[rax*4]"], [36, "mov rax, [rbp+var_28]"], [37, "add rax, rdx"], [38, "mov eax, [rax]"], [39, "sub eax, [rbp+var_14]"], [40, "mov ecx, [rbp+var_8]"], [41, "mov edx, [rbp+var_C]"], [42, "add edx, ecx"], [43, "mov edx, edx"], [44, "lea rcx, ds:0[rdx*4]"], [45, "mov rdx, [rbp+var_28]"], [46, "add rcx, rdx"], [47, "cdq"], [48, "idiv [rbp+var_30]"], [49, "mov eax, edx"], [50, "mov [rcx], eax"], [51, "mov eax, [rbp+var_8]"], [52, "lea rdx, ds:0[rax*4]"], [53, "mov rax, [rbp+var_28]"], [54, "add rax, rdx"], [55, "mov edx, [rax]"], [56, "mov eax, [rbp+var_14]"], [57, "add eax, edx"], [58, "mov edx, [rbp+var_8]"], [59, "lea rcx, ds:0[rdx*4]"], [60, "mov rdx, [rbp+var_28]"], [61, "add rcx, rdx"], [62, "cdq"], [63, "idiv [rbp+var_30]"], [64, "mov eax, edx"], [65, "mov [rcx], eax"], [66, "mov eax, [rbp+var_C]"], [67, "add eax, eax"], [68, "add [rbp+var_8], eax"], [69, "mov eax, [rbp+var_8]"], [70, "cmp eax, [rbp+var_2C]"], [71, "jb loc_402B73"], [72, "add [rbp+var_4], 1"], [73, "mov eax, [rbp+var_4]"], [74, "cmp eax, [rbp+var_C]"], [75, "jb loc_402B4A"], [76, "shl [rbp+var_C], 1"], [77, "mov eax, [rbp+var_C]"], [78, "cmp eax, [rbp+var_2C]"], [79, "jb loc_402B3E"], [80, "nop"], [81, "nop"], [82, "pop rbp"], [83, "retn"]], "data_dep": [[10, 6], [10, 76], [11, 8], [11, 72], [12, 10], [12, 11], [13, 12], [14, 13], [14, 65], [14, 10], [14, 50], [15, 4], [16, 15], [16, 14], [17, 16], [17, 50], [17, 65], [18, 17], [19, 18], [20, 8], [20, 72], [21, 20], [23, 68], [23, 21], [24, 76], [24, 6], [25, 23], [25, 24], [26, 25], [27, 23], [28, 2], [29, 27], [29, 28], [30, 50], [30, 29], [30, 65], [31, 19], [32, 30], [32, 31], [33, 32], [34, 21], [34, 68], [35, 31], [36, 2], [37, 35], [37, 36], [38, 50], [38, 65], [38, 37], [39, 33], [39, 38], [40, 68], [40, 21], [41, 76], [41, 6], [42, 41], [42, 40], [43, 42], [44, 40], [45, 2], [46, 45], [46, 44], [48, 63], [48, 5], [49, 45], [50, 49], [50, 46], [51, 68], [51, 21], [52, 45], [53, 2], [54, 53], [54, 52], [55, 50], [55, 54], [56, 33], [57, 56], [57, 55], [58, 21], [58, 68], [59, 46], [60, 2], [61, 60], [61, 59], [63, 48], [64, 60], [65, 61], [65, 64], [66, 6], [66, 76], [67, 66], [68, 68], [68, 67], [68, 21], [69, 21], [69, 68], [70, 3], [70, 69], [71, 70], [72, 8], [72, 72], [73, 8], [73, 72], [74, 73], [74, 6], [74, 76], [75, 74], [76, 6], [76, 76], [77, 76], [77, 6], [78, 77], [78, 3], [79, 78], [82, 0], [83, 77]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/7ee3673bf8033074c0974f596dc2bf0fe1fafd3fae15ae6387a5b222d1161264_7ee3673bf8033074c0974f596dc2bf0fe1fafd3fae15ae6387a5b222d1161264.jsonl.gz", "strip_func_name": "sub_402B20", "query": "\n\n\n__int64 __fastcall sub_402B20(__int64 a1, unsigned int a2, __int64 a3, int a4)\n{\n__int64 result; // rax\nint v5; // [rsp+24h] [rbp-14h]\nint v6; // [rsp+28h] [rbp-10h]\nunsigned int i; // [rsp+2Ch] [rbp-Ch]\nunsigned int k; // [rsp+30h] [rbp-8h]\nunsigned int j; // [rsp+34h] [rbp-4h]\n\nfor ( i = 1; ; i *= 2 )\n{\nresult = i;\nif ( i >= a2 )\nbreak;\nfor ( j = 0; j < i; ++j )\n{\nv6 = *(unsigned __int16 *)(2LL * (i + j) + a3);\nfor ( k = j; k < a2; k += 2 * i )\n{\nv5 = v6 * *(_DWORD *)(4LL * (k + i) + a1);\n*(_DWORD *)(a1 + 4LL * (k + i)) = (*(_DWORD *)(4LL * k + a1) - v5) % a4;\n*(_DWORD *)(a1 + 4LL * k) = (*(_DWORD *)(4LL * k + a1) + v5) % a4;\n}\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v5,v6,i,k,sub_402B20,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'p', 'a4': 'q', 'a1': 'a', 'a2': 'n', 'v5': 'x', 'v6': 'w', 'i': 't', 'k': 's', 'sub_402B20': 'mulntt_ct_rev2std_naive'}"} |
|
JSON_Page | 4c203109843f8da4148d01ce8f9e54fd81ce3fc82864f2211a1aaeb59256f803 | cyring | CoreFreq | NA | void JSON_Page(char *inStr, int outSize)
{
double integral, fractional;
unsigned char *pLast = (unsigned char *) &inStr[outSize],
*pFirst= (unsigned char *) &inStr[0], *pChr;
time_t now;
time(&now);
fractional = modf(difftime(now, Dump.StartedAt), &integral);
fprintf(Dump.Handle, "[%lld.%lld, \"o\", \"",
(signed long long) integral,
(signed long long) fractional);
for (pChr = pFirst; pChr < pLast; pChr++) {
switch (*pChr) {
case 0x1b:
fprintf(Dump.Handle, "\\u001b");
break;
case 0xc2:
fprintf(Dump.Handle, "\\u00%x", *(++pChr));
break;
case 0xc3:
fprintf(Dump.Handle, "\\u00%x", *(++pChr) ^ 0x40);
break;
case '\\':
fprintf(Dump.Handle, "\\u005c");
break;
default:
fputc((*pChr), Dump.Handle);
break;
}
}
fprintf(Dump.Handle, "\"]\n");
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4823B7", "function_addr": 4727735, "binary_name": "4c203109843f8da4148d01ce8f9e54fd81ce3fc82864f2211a1aaeb59256f803.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_3C], esi"], [5, "mov eax, [rbp+var_3C]"], [6, "movsxd rdx, eax"], [7, "mov rax, [rbp+var_38]"], [8, "add rax, rdx"], [9, "mov [rbp+var_10], rax"], [10, "mov rax, [rbp+var_38]"], [11, "mov [rbp+var_18], rax"], [12, "lea rax, [rbp+timer]"], [13, "mov rdi, rax"], [14, "call _time"], [15, "mov rdx, cs:time0"], [16, "mov rax, [rbp+timer]"], [17, "mov rsi, rdx"], [18, "mov rdi, rax"], [19, "call _difftime"], [20, "movq rax, xmm0"], [21, "lea rdx, [rbp+iptr]"], [22, "mov rdi, rdx"], [23, "movq xmm0, rax"], [24, "call _modf"], [25, "movq rax, xmm0"], [26, "mov [rbp+var_20], rax"], [27, "movsd xmm0, [rbp+var_20]"], [28, "cvttsd2si rcx, xmm0"], [29, "movsd xmm0, [rbp+iptr]"], [30, "cvttsd2si rdx, xmm0"], [31, "mov rax, cs:stream"], [32, "mov esi, offset aLldLldO"], [33, "mov rdi, rax"], [34, "mov eax, 0"], [35, "call _fprintf"], [36, "mov rax, [rbp+var_18]"], [37, "mov [rbp+var_8], rax"], [38, "jmp loc_482552"], [39, "mov rax, [rbp+var_8]"], [40, "movzx eax, byte ptr [rax]"], [41, "movzx eax, al"], [42, "cmp eax, 0C3h"], [43, "jz short loc_4824E4"], [44, "cmp eax, 0C3h"], [45, "jg loc_482531"], [46, "cmp eax, 0C2h"], [47, "jz short loc_4824BA"], [48, "cmp eax, 0C2h"], [49, "jg loc_482531"], [50, "cmp eax, 1Bh"], [51, "jz short loc_482497"], [52, "cmp eax, 5Ch "], [53, "jz short loc_482511"], [54, "jmp loc_482531"], [55, "mov rax, cs:stream"], [56, "mov rcx, rax"], [57, "mov edx, 6"], [58, "mov esi, 1"], [59, "mov edi, offset aU001b"], [60, "call _fwrite"], [61, "jmp loc_48254D"], [62, "add [rbp+var_8], 1"], [63, "mov rax, [rbp+var_8]"], [64, "movzx eax, byte ptr [rax]"], [65, "movzx edx, al"], [66, "mov rax, cs:stream"], [67, "mov esi, offset aU00X"], [68, "mov rdi, rax"], [69, "mov eax, 0"], [70, "call _fprintf"], [71, "jmp short loc_48254D"], [72, "add [rbp+var_8], 1"], [73, "mov rax, [rbp+var_8]"], [74, "movzx eax, byte ptr [rax]"], [75, "xor eax, 40h"], [76, "movzx edx, al"], [77, "mov rax, cs:stream"], [78, "mov esi, offset aU00X"], [79, "mov rdi, rax"], [80, "mov eax, 0"], [81, "call _fprintf"], [82, "jmp short loc_48254D"], [83, "mov rax, cs:stream"], [84, "mov rcx, rax"], [85, "mov edx, 6"], [86, "mov esi, 1"], [87, "mov edi, offset aU005c"], [88, "call _fwrite"], [89, "jmp short loc_48254D"], [90, "mov rdx, cs:stream"], [91, "mov rax, [rbp+var_8]"], [92, "movzx eax, byte ptr [rax]"], [93, "movzx eax, al"], [94, "mov rsi, rdx"], [95, "mov edi, eax"], [96, "call _fputc"], [97, "nop"], [98, "add [rbp+var_8], 1"], [99, "mov rax, [rbp+var_8]"], [100, "cmp rax, [rbp+var_10]"], [101, "jb loc_48245A"], [102, "mov rax, cs:stream"], [103, "mov rcx, rax"], [104, "mov edx, 3"], [105, "mov esi, 1"], [106, "mov edi, offset asc_496C63"], [107, "call _fwrite"], [108, "nop"], [109, "leave"], [110, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [8, 6], [8, 7], [9, 8], [10, 3], [11, 10], [12, 10], [13, 12], [17, 15], [18, 16], [21, 15], [22, 21], [23, 20], [25, 23], [26, 25], [27, 26], [28, 27], [30, 21], [30, 29], [33, 31], [36, 11], [37, 36], [39, 98], [39, 37], [40, 39], [41, 40], [42, 41], [43, 42], [44, 41], [45, 44], [46, 41], [47, 46], [48, 41], [49, 48], [50, 41], [51, 50], [52, 41], [53, 52], [56, 55], [62, 37], [62, 98], [63, 62], [64, 63], [65, 64], [68, 66], [72, 98], [72, 37], [73, 72], [74, 73], [75, 74], [76, 75], [79, 77], [84, 83], [91, 98], [91, 37], [92, 91], [93, 92], [94, 90], [95, 93], [98, 98], [98, 37], [98, 72], [98, 62], [99, 98], [99, 37], [100, 9], [100, 99], [101, 100], [103, 102], [110, 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/4c203109843f8da4148d01ce8f9e54fd81ce3fc82864f2211a1aaeb59256f803_4c203109843f8da4148d01ce8f9e54fd81ce3fc82864f2211a1aaeb59256f803.jsonl.gz", "strip_func_name": "sub_4823B7", "query": "\n\n\nsize_t __fastcall sub_4823B7(unsigned __int8 *a1, int a2)\n{\ndouble v2; // xmm0_8\nint v3; // eax\ntime_t timer; // [rsp+10h] [rbp-30h] BYREF\ndouble iptr; // [rsp+18h] [rbp-28h] BYREF\ndouble v7; // [rsp+20h] [rbp-20h]\nunsigned __int8 *v8; // [rsp+28h] [rbp-18h]\nunsigned __int64 v9; // [rsp+30h] [rbp-10h]\nunsigned __int8 *i; // [rsp+38h] [rbp-8h]\n\nv9 = (unsigned __int64)&a1[a2];\nv8 = a1;\ntime(&timer);\nv2 = difftime(timer, time0);\nv7 = modf(v2, &iptr);\nfprintf(stream, \"[%lld.%lld, \\\"o\\\", \\\"\", (unsigned int)(int)iptr, (unsigned int)(int)v7);\nfor ( i = v8; (unsigned __int64)i < v9; ++i )\n{\nv3 = *i;\nif ( v3 == 195 )\n{\nfprintf(stream, \"\\\\u00%x\", *++i ^ 0x40u);\n}\nelse\n{\nif ( *i > 0xC3u )\ngoto LABEL_12;\nswitch ( v3 )\n{\ncase 194:\nfprintf(stream, \"\\\\u00%x\", *++i);\ncontinue;\ncase 27:\nfwrite(\"\\\\u001b\", 1uLL, 6uLL, stream);\ncontinue;\ncase 92:\nfwrite(\"\\\\u005c\", 1uLL, 6uLL, stream);\nbreak;\ndefault:\nLABEL_12:\nfputc(*i, stream);\nbreak;\n}\n}\n}\nreturn fwrite(\"\\\"]\\n\", 1uLL, 3uLL, stream);\n}\n\n\n\nQ:[a1,a2,timer,iptr,v7,v8,v9,i,sub_4823B7,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'inStr', 'a2': 'outSize', 'timer': 'now', 'iptr': 'integral', 'v7': 'fractional', 'v8': 'pFirst', 'v9': 'pLast', 'i': 'pChr', 'sub_4823B7': 'JSON_Page'}"} |
|
ICYReadString | 71be51c2f85ea3ab34e654fb6cf4736d90e26a6c9bf9212e26d17216cc13a637 | ColumPaget | Movgrab | NA | void ICYReadString(STREAM *Con, char **Title)
{
int len, remaining, result;
uint8_t icysize;
char *Tempstr=NULL, *Name=NULL, *Value=NULL, *ptr;
result=STREAMReadBytes(Con,&icysize,1);
if (icysize > 0)
{
len=icysize * 16;
remaining=len;
Tempstr=SetStrLen(Tempstr, len);
len=0;
while (remaining > 0)
{
result=STREAMReadBytes(Con,Tempstr + len, remaining);
if (result==EOF) break;
remaining-=result;
len+=result;
}
Name=CopyStr(Name,"");
ptr=GetNameValuePair(Tempstr, ";", "=", &Name, &Value);
while (ptr)
{
if (strcasecmp(Name,"StreamTitle")==0) *Title=CopyStr(*Title, Value);
ptr=GetNameValuePair(ptr, ";", "=", &Name, &Value);
}
}
Destroy(Tempstr);
Destroy(Name);
Destroy(Value);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40C8FE", "function_addr": 4245758, "binary_name": "71be51c2f85ea3ab34e654fb6cf4736d90e26a6c9bf9212e26d17216cc13a637.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_40], rsi"], [5, "mov [rbp+var_10], 0"], [6, "mov [rbp+s1], 0"], [7, "mov [rbp+var_30], 0"], [8, "lea rcx, [rbp+var_1D]"], [9, "mov rax, [rbp+var_38]"], [10, "mov edx, 1"], [11, "mov rsi, rcx"], [12, "mov rdi, rax"], [13, "call sub_414718"], [14, "mov [rbp+var_1C], eax"], [15, "movzx eax, [rbp+var_1D]"], [16, "test al, al"], [17, "jz loc_40CA60"], [18, "movzx eax, [rbp+var_1D]"], [19, "movzx eax, al"], [20, "shl eax, 4"], [21, "mov [rbp+var_4], eax"], [22, "mov eax, [rbp+var_4]"], [23, "mov [rbp+var_8], eax"], [24, "mov eax, [rbp+var_4]"], [25, "movsxd rdx, eax"], [26, "mov rax, [rbp+var_10]"], [27, "mov rsi, rdx"], [28, "mov rdi, rax"], [29, "call sub_40EE53"], [30, "mov [rbp+var_10], rax"], [31, "mov [rbp+var_4], 0"], [32, "jmp short loc_40C9B7"], [33, "mov eax, [rbp+var_4]"], [34, "movsxd rdx, eax"], [35, "mov rax, [rbp+var_10]"], [36, "lea rcx, [rdx+rax]"], [37, "mov edx, [rbp+var_8]"], [38, "mov rax, [rbp+var_38]"], [39, "mov rsi, rcx"], [40, "mov rdi, rax"], [41, "call sub_414718"], [42, "mov [rbp+var_1C], eax"], [43, "cmp [rbp+var_1C], 0FFFFFFFFh"], [44, "jz short loc_40C9BF"], [45, "mov eax, [rbp+var_1C]"], [46, "sub [rbp+var_8], eax"], [47, "mov eax, [rbp+var_1C]"], [48, "add [rbp+var_4], eax"], [49, "cmp [rbp+var_8], 0"], [50, "jg short loc_40C982"], [51, "jmp short loc_40C9C0"], [52, "nop"], [53, "mov rax, [rbp+s1]"], [54, "mov esi, offset unk_43EC8E"], [55, "mov rdi, rax"], [56, "call sub_40EFFE"], [57, "mov [rbp+s1], rax"], [58, "lea rcx, [rbp+var_30]"], [59, "lea rdx, [rbp+s1]"], [60, "mov rax, [rbp+var_10]"], [61, "mov r8, rcx"], [62, "mov rcx, rdx"], [63, "mov edx, offset asc_43EC8F"], [64, "mov esi, offset asc_43EC91"], [65, "mov rdi, rax"], [66, "call sub_4258D4"], [67, "mov [rbp+var_18], rax"], [68, "jmp short loc_40CA59"], [69, "mov rax, [rbp+s1]"], [70, "mov esi, offset aStreamtitle"], [71, "mov rdi, rax"], [72, "call _strcasecmp"], [73, "test eax, eax"], [74, "jnz short loc_40CA31"], [75, "mov rdx, [rbp+var_30]"], [76, "mov rax, [rbp+var_40]"], [77, "mov rax, [rax]"], [78, "mov rsi, rdx"], [79, "mov rdi, rax"], [80, "call sub_40EFFE"], [81, "mov rdx, [rbp+var_40]"], [82, "mov [rdx], rax"], [83, "lea rcx, [rbp+var_30]"], [84, "lea rdx, [rbp+s1]"], [85, "mov rax, [rbp+var_18]"], [86, "mov r8, rcx"], [87, "mov rcx, rdx"], [88, "mov edx, offset asc_43EC8F"], [89, "mov esi, offset asc_43EC91"], [90, "mov rdi, rax"], [91, "call sub_4258D4"], [92, "mov [rbp+var_18], rax"], [93, "cmp [rbp+var_18], 0"], [94, "jnz short loc_40C9FF"], [95, "mov rax, [rbp+var_10]"], [96, "mov rdi, rax"], [97, "call sub_40EE25"], [98, "mov rax, [rbp+s1]"], [99, "mov rdi, rax"], [100, "call sub_40EE25"], [101, "mov rax, [rbp+var_30]"], [102, "mov rdi, rax"], [103, "call sub_40EE25"], [104, "nop"], [105, "leave"], [106, "retn"]], "data_dep": [[9, 3], [11, 8], [12, 9], [14, 13], [16, 15], [17, 16], [19, 18], [20, 19], [21, 20], [22, 21], [23, 22], [24, 21], [25, 24], [26, 5], [27, 25], [28, 26], [30, 29], [33, 31], [33, 48], [34, 33], [35, 30], [36, 36], [36, 8], [36, 35], [37, 23], [37, 46], [38, 3], [39, 36], [40, 38], [42, 41], [43, 42], [44, 43], [45, 42], [46, 45], [46, 23], [46, 46], [47, 42], [48, 47], [48, 31], [48, 48], [49, 23], [49, 46], [50, 49], [53, 6], [55, 53], [57, 56], [58, 7], [58, 36], [58, 8], [59, 57], [59, 37], [59, 25], [60, 30], [61, 58], [62, 59], [65, 60], [67, 66], [69, 57], [71, 69], [73, 72], [74, 73], [75, 7], [76, 4], [77, 76], [77, 82], [78, 75], [79, 77], [81, 4], [82, 81], [82, 80], [83, 87], [83, 62], [83, 7], [84, 63], [84, 88], [84, 81], [84, 57], [85, 67], [85, 92], [86, 83], [87, 84], [90, 85], [92, 91], [93, 67], [93, 92], [94, 93], [95, 30], [95, 5], [96, 95], [98, 57], [98, 6], [99, 98], [101, 7], [102, 101], [106, 103]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/71be51c2f85ea3ab34e654fb6cf4736d90e26a6c9bf9212e26d17216cc13a637_71be51c2f85ea3ab34e654fb6cf4736d90e26a6c9bf9212e26d17216cc13a637.jsonl.gz", "strip_func_name": "sub_40C8FE", "query": "\n\n\n__int64 __fastcall sub_40C8FE(__int64 a1, _QWORD *a2)\n{\n__int64 v3; // [rsp+10h] [rbp-30h] BYREF\nchar *s1; // [rsp+18h] [rbp-28h] BYREF\nunsigned __int8 v5; // [rsp+23h] [rbp-1Dh] BYREF\nint v6; // [rsp+24h] [rbp-1Ch]\n__int64 j; // [rsp+28h] [rbp-18h]\n__int64 v8; // [rsp+30h] [rbp-10h]\nunsigned int v9; // [rsp+38h] [rbp-8h]\nunsigned int i; // [rsp+3Ch] [rbp-4h]\n\nv8 = 0LL;\ns1 = 0LL;\nv3 = 0LL;\nv6 = sub_414718(a1, &v5, 1LL);\nif ( v5 )\n{\ni = 16 * v5;\nv9 = i;\nv8 = sub_40EE53(v8, (int)i);\nfor ( i = 0; (int)v9 > 0; i += v6 )\n{\nv6 = sub_414718(a1, (int)i + v8, v9);\nif ( v6 == -1 )\nbreak;\nv9 -= v6;\n}\ns1 = (char *)sub_40EFFE(s1, &unk_43EC8E);\nfor ( j = sub_4258D4(v8, \";\", \"=\", &s1, &v3); j; j = sub_4258D4(j, \";\", \"=\", &s1, &v3) )\n{\nif ( !strcasecmp(s1, \"StreamTitle\") )\n*a2 = sub_40EFFE(*a2, v3);\n}\n}\nsub_40EE25(v8);\nsub_40EE25(s1);\nreturn sub_40EE25(v3);\n}\n\n\n\nQ:[a1,a2,v3,s1,v5,v6,j,v8,v9,i,sub_40C8FE,sub_414718,sub_40EE53,sub_40EFFE,sub_4258D4,sub_40EE25,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'Con', 'a2': 'Title', 'v3': 'Value', 's1': 'Name', 'v5': 'icysize', 'v6': 'result', 'j': 'ptr', 'v8': 'Tempstr', 'v9': 'remaining', 'i': 'len', 'sub_40C8FE': 'ICYReadString', 'sub_414718': 'STREAMReadBytes', 'sub_40EE53': 'SetStrLen', 'sub_40EFFE': 'CopyStr', 'sub_4258D4': 'GetNameValuePair', 'sub_40EE25': 'Destroy'}"} |
|
stk500v2_cmd | d5cac42be9875efcb6972b80950aacef186fc23bb0003aa70f675eb5be5bf40c | GBert | misc | NA | static int
stk500v2_cmd(uint16_t msgsize)
{
int16_t rc;
int r = STK_RETRY;
DPRINT("%s()\n", __func__);
while (1) {
rc = stk500v2_send(msgsize);
if (rc < 0)
break;
rc = stk500v2_recv(STK_SEQTEST);
if (--r && rc == -ETIMEDOUT) {
/*
* Resend the command.
*
* This will occur should the MCT232 driver on Linux
* decide to eat a packet.
*
* It will also occur after opening a connection to
* an Arduino with a bootloader that both becomes
* active on serial port open (DTR reset).
*/
printf("%s: command timed out, resending ...\n", __func__);
continue;
}
break;
}
return rc;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41C6DC", "function_addr": 4310748, "binary_name": "d5cac42be9875efcb6972b80950aacef186fc23bb0003aa70f675eb5be5bf40c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov eax, edi"], [4, "mov [rbp+var_14], ax"], [5, "mov [rbp+var_8], 5"], [6, "movzx eax, [rbp+var_14]"], [7, "mov edi, eax"], [8, "call sub_41C5BF"], [9, "mov [rbp+var_2], ax"], [10, "cmp [rbp+var_2], 0"], [11, "js short loc_41C73C"], [12, "mov edi, 1"], [13, "call sub_41C2D4"], [14, "mov [rbp+var_2], ax"], [15, "sub [rbp+var_8], 1"], [16, "cmp [rbp+var_8], 0"], [17, "jz short loc_41C73F"], [18, "cmp [rbp+var_2], 0FF92h"], [19, "jnz short loc_41C73F"], [20, "mov esi, offset aStk500v2Cmd"], [21, "mov edi, offset aSCommandTimedO"], [22, "mov eax, 0"], [23, "call _printf"], [24, "jmp short loc_41C6F1"], [25, "nop"], [26, "jmp short loc_41C740"], [27, "nop"], [28, "movsx eax, [rbp+var_2]"], [29, "leave"], [30, "retn"]], "data_dep": [[4, 3], [6, 4], [7, 6], [9, 8], [10, 9], [11, 10], [14, 13], [15, 5], [15, 15], [16, 15], [17, 16], [18, 14], [19, 18], [28, 9], [28, 14], [30, 28]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d5cac42be9875efcb6972b80950aacef186fc23bb0003aa70f675eb5be5bf40c_d5cac42be9875efcb6972b80950aacef186fc23bb0003aa70f675eb5be5bf40c.jsonl.gz", "strip_func_name": "sub_41C6DC", "query": "\n\n\n__int64 __fastcall sub_41C6DC(unsigned __int16 a1)\n{\nint v2; // [rsp+18h] [rbp-8h]\n__int16 v3; // [rsp+1Eh] [rbp-2h]\n\nv2 = 5;\nwhile ( 1 )\n{\nv3 = sub_41C5BF(a1);\nif ( v3 < 0 )\nbreak;\nv3 = sub_41C2D4(1);\nif ( !--v2 || v3 != -110 )\nbreak;\nprintf(\"%s: command timed out, resending ...\\n\", \"stk500v2_cmd\");\n}\nreturn (unsigned int)v3;\n}\n\n\n\nQ:[a1,v2,v3,sub_41C6DC,sub_41C5BF,sub_41C2D4,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'msgsize', 'v2': 'r', 'v3': 'rc', 'sub_41C6DC': 'stk500v2_cmd', 'sub_41C5BF': 'stk500v2_send', 'sub_41C2D4': 'stk500v2_recv'}"} |
|
HUF_compress4X_wksp | 8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05 | soedinglab | MMseqs2 | NA | size_t HUF_compress4X_wksp (void* dst, size_t dstSize,
const void* src, size_t srcSize,
unsigned maxSymbolValue, unsigned huffLog,
void* workSpace, size_t wkspSize)
{
return HUF_compress_internal(dst, dstSize, src, srcSize,
maxSymbolValue, huffLog, HUF_fourStreams,
workSpace, wkspSize,
NULL, NULL, 0, 0 /*bmi2*/);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4961FB", "function_addr": 4809211, "binary_name": "8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov qword ptr [rbp+var_8], rdi"], [4, "mov qword ptr [rbp+var_10], rsi"], [5, "mov qword ptr [rbp+var_18], rdx"], [6, "mov qword ptr [rbp+var_20], rcx"], [7, "mov [rbp+var_24], r8d"], [8, "mov [rbp+var_28], r9d"], [9, "mov r8d, [rbp+var_28]"], [10, "mov edi, [rbp+var_24]"], [11, "mov rcx, qword ptr [rbp+var_20]"], [12, "mov rdx, qword ptr [rbp+var_18]"], [13, "mov rsi, qword ptr [rbp+var_10]"], [14, "mov rax, qword ptr [rbp+var_8]"], [15, "sub rsp, 8"], [16, "push 0"], [17, "push 0"], [18, "push 0"], [19, "push 0"], [20, "push [rbp+arg_8]"], [21, "push [rbp+arg_0]"], [22, "push 1"], [23, "mov r9d, r8d"], [24, "mov r8d, edi"], [25, "mov rdi, rax"], [26, "call sub_495C6B"], [27, "add rsp, 40h"], [28, "leave"], [29, "retn"]], "data_dep": [[9, 8], [10, 7], [11, 6], [12, 5], [13, 4], [14, 3], [15, 2], [20, 3], [23, 9], [24, 10], [25, 14], [27, 15], [29, 26]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05_8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05.jsonl.gz", "strip_func_name": "sub_4961FB", "query": "\n\n\n__int64 __fastcall sub_4961FB(__int16 *a1, unsigned __int64 a2, unsigned int *a3, unsigned __int64 a4, unsigned int a5, unsigned int a6, __int64 a7, __int64 a8)\n{\nreturn sub_495C6B(a1, a2, a3, a4, a5, a6, 1, a7, a8, 0LL, 0LL, 0, 0);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,a8,sub_4961FB,sub_495C6B,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'src', 'a4': 'srcSize', 'a1': 'dst', 'a2': 'dstSize', 'a5': 'maxSymbolValue', 'a6': 'huffLog', 'a7': 'workSpace', 'a8': 'wkspSize', 'sub_4961FB': 'HUF_compress4X_wksp', 'sub_495C6B': 'HUF_compress_internal'}"} |
|
SHA224_256ProcessMessageBlock | d0ebaa77558783765df381826c961e95c83338e285011d501a62bea474e93451 | michaelrsweet | pdfio | NA | static void SHA224_256ProcessMessageBlock(_pdfio_sha256_t *context)
{
/* Constants defined in FIPS 180-3, section 4.2.2 */
static const uint32_t K[64] = {
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,
0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,
0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,
0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,
0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,
0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,
0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,
0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,
0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,
0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
};
int t, t4; /* Loop counter */
uint32_t temp1, temp2; /* Temporary word value */
uint32_t W[64]; /* Word sequence */
uint32_t A, B, C, D, E, F, G, H; /* Word buffers */
/*
* Initialize the first 16 words in the array W
*/
for (t = t4 = 0; t < 16; t++, t4 += 4)
W[t] = (((uint32_t)context->Message_Block[t4]) << 24) |
(((uint32_t)context->Message_Block[t4 + 1]) << 16) |
(((uint32_t)context->Message_Block[t4 + 2]) << 8) |
(((uint32_t)context->Message_Block[t4 + 3]));
for (t = 16; t < 64; t++)
W[t] = SHA256_sigma1(W[t-2]) + W[t-7] +
SHA256_sigma0(W[t-15]) + W[t-16];
A = context->Intermediate_Hash[0];
B = context->Intermediate_Hash[1];
C = context->Intermediate_Hash[2];
D = context->Intermediate_Hash[3];
E = context->Intermediate_Hash[4];
F = context->Intermediate_Hash[5];
G = context->Intermediate_Hash[6];
H = context->Intermediate_Hash[7];
for (t = 0; t < 64; t++) {
temp1 = H + SHA256_SIGMA1(E) + SHA_Ch(E,F,G) + K[t] + W[t];
temp2 = SHA256_SIGMA0(A) + SHA_Maj(A,B,C);
H = G;
G = F;
F = E;
E = D + temp1;
D = C;
C = B;
B = A;
A = temp1 + temp2;
}
context->Intermediate_Hash[0] += A;
context->Intermediate_Hash[1] += B;
context->Intermediate_Hash[2] += C;
context->Intermediate_Hash[3] += D;
context->Intermediate_Hash[4] += E;
context->Intermediate_Hash[5] += F;
context->Intermediate_Hash[6] += G;
context->Intermediate_Hash[7] += H;
context->Message_Block_Index = 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_417809", "function_addr": 4290569, "binary_name": "d0ebaa77558783765df381826c961e95c83338e285011d501a62bea474e93451.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0C0h"], [3, "mov [rbp+var_138], rdi"], [4, "mov [rbp+var_8], 0"], [5, "mov eax, [rbp+var_8]"], [6, "mov [rbp+var_4], eax"], [7, "jmp loc_4178AD"], [8, "mov rdx, [rbp+var_138]"], [9, "mov eax, [rbp+var_8]"], [10, "cdqe"], [11, "movzx eax, byte ptr [rdx+rax+2Ch]"], [12, "movzx eax, al"], [13, "shl eax, 18h"], [14, "mov ecx, eax"], [15, "mov eax, [rbp+var_8]"], [16, "add eax, 1"], [17, "mov rdx, [rbp+var_138]"], [18, "cdqe"], [19, "movzx eax, byte ptr [rdx+rax+2Ch]"], [20, "movzx eax, al"], [21, "shl eax, 10h"], [22, "or ecx, eax"], [23, "mov eax, [rbp+var_8]"], [24, "add eax, 2"], [25, "mov rdx, [rbp+var_138]"], [26, "cdqe"], [27, "movzx eax, byte ptr [rdx+rax+2Ch]"], [28, "movzx eax, al"], [29, "shl eax, 8"], [30, "or ecx, eax"], [31, "mov eax, [rbp+var_8]"], [32, "add eax, 3"], [33, "mov rdx, [rbp+var_138]"], [34, "cdqe"], [35, "movzx eax, byte ptr [rdx+rax+2Ch]"], [36, "movzx eax, al"], [37, "or ecx, eax"], [38, "mov edx, ecx"], [39, "mov eax, [rbp+var_4]"], [40, "cdqe"], [41, "mov [rbp+rax*4+var_130], edx"], [42, "add [rbp+var_4], 1"], [43, "add [rbp+var_8], 4"], [44, "cmp [rbp+var_4], 0Fh"], [45, "jle loc_41782D"], [46, "mov [rbp+var_4], 10h"], [47, "jmp loc_41796F"], [48, "mov eax, [rbp+var_4]"], [49, "sub eax, 2"], [50, "cdqe"], [51, "mov eax, [rbp+rax*4+var_130]"], [52, "rol eax, 0Fh"], [53, "mov edx, eax"], [54, "mov eax, [rbp+var_4]"], [55, "sub eax, 2"], [56, "cdqe"], [57, "mov eax, [rbp+rax*4+var_130]"], [58, "rol eax, 0Dh"], [59, "xor edx, eax"], [60, "mov eax, [rbp+var_4]"], [61, "sub eax, 2"], [62, "cdqe"], [63, "mov eax, [rbp+rax*4+var_130]"], [64, "shr eax, 0Ah"], [65, "xor edx, eax"], [66, "mov eax, [rbp+var_4]"], [67, "sub eax, 7"], [68, "cdqe"], [69, "mov eax, [rbp+rax*4+var_130]"], [70, "add edx, eax"], [71, "mov eax, [rbp+var_4]"], [72, "sub eax, 0Fh"], [73, "cdqe"], [74, "mov eax, [rbp+rax*4+var_130]"], [75, "ror eax, 7"], [76, "mov ecx, eax"], [77, "mov eax, [rbp+var_4]"], [78, "sub eax, 0Fh"], [79, "cdqe"], [80, "mov eax, [rbp+rax*4+var_130]"], [81, "rol eax, 0Eh"], [82, "xor ecx, eax"], [83, "mov eax, [rbp+var_4]"], [84, "sub eax, 0Fh"], [85, "cdqe"], [86, "mov eax, [rbp+rax*4+var_130]"], [87, "shr eax, 3"], [88, "xor eax, ecx"], [89, "add edx, eax"], [90, "mov eax, [rbp+var_4]"], [91, "sub eax, 10h"], [92, "cdqe"], [93, "mov eax, [rbp+rax*4+var_130]"], [94, "add edx, eax"], [95, "mov eax, [rbp+var_4]"], [96, "cdqe"], [97, "mov [rbp+rax*4+var_130], edx"], [98, "add [rbp+var_4], 1"], [99, "cmp [rbp+var_4], 3Fh "], [100, "jle loc_4178C3"], [101, "mov rax, [rbp+var_138]"], [102, "mov eax, [rax]"], [103, "mov [rbp+var_C], eax"], [104, "mov rax, [rbp+var_138]"], [105, "mov eax, [rax+4]"], [106, "mov [rbp+var_10], eax"], [107, "mov rax, [rbp+var_138]"], [108, "mov eax, [rax+8]"], [109, "mov [rbp+var_14], eax"], [110, "mov rax, [rbp+var_138]"], [111, "mov eax, [rax+0Ch]"], [112, "mov [rbp+var_18], eax"], [113, "mov rax, [rbp+var_138]"], [114, "mov eax, [rax+10h]"], [115, "mov [rbp+var_1C], eax"], [116, "mov rax, [rbp+var_138]"], [117, "mov eax, [rax+14h]"], [118, "mov [rbp+var_20], eax"], [119, "mov rax, [rbp+var_138]"], [120, "mov eax, [rax+18h]"], [121, "mov [rbp+var_24], eax"], [122, "mov rax, [rbp+var_138]"], [123, "mov eax, [rax+1Ch]"], [124, "mov [rbp+var_28], eax"], [125, "mov [rbp+var_4], 0"], [126, "jmp loc_417AA6"], [127, "mov eax, [rbp+var_1C]"], [128, "ror eax, 6"], [129, "mov edx, eax"], [130, "mov eax, [rbp+var_1C]"], [131, "ror eax, 0Bh"], [132, "xor edx, eax"], [133, "mov eax, [rbp+var_1C]"], [134, "rol eax, 7"], [135, "xor edx, eax"], [136, "mov eax, [rbp+var_28]"], [137, "add edx, eax"], [138, "mov eax, [rbp+var_20]"], [139, "xor eax, [rbp+var_24]"], [140, "and eax, [rbp+var_1C]"], [141, "xor eax, [rbp+var_24]"], [142, "add edx, eax"], [143, "mov eax, [rbp+var_4]"], [144, "cdqe"], [145, "mov eax, ds:dword_430CA0[rax*4]"], [146, "add edx, eax"], [147, "mov eax, [rbp+var_4]"], [148, "cdqe"], [149, "mov eax, [rbp+rax*4+var_130]"], [150, "add eax, edx"], [151, "mov [rbp+var_2C], eax"], [152, "mov eax, [rbp+var_C]"], [153, "ror eax, 2"], [154, "mov edx, eax"], [155, "mov eax, [rbp+var_C]"], [156, "ror eax, 0Dh"], [157, "xor edx, eax"], [158, "mov eax, [rbp+var_C]"], [159, "rol eax, 0Ah"], [160, "mov ecx, edx"], [161, "xor ecx, eax"], [162, "mov eax, [rbp+var_10]"], [163, "or eax, [rbp+var_14]"], [164, "and eax, [rbp+var_C]"], [165, "mov edx, eax"], [166, "mov eax, [rbp+var_10]"], [167, "and eax, [rbp+var_14]"], [168, "or eax, edx"], [169, "add eax, ecx"], [170, "mov [rbp+var_30], eax"], [171, "mov eax, [rbp+var_24]"], [172, "mov [rbp+var_28], eax"], [173, "mov eax, [rbp+var_20]"], [174, "mov [rbp+var_24], eax"], [175, "mov eax, [rbp+var_1C]"], [176, "mov [rbp+var_20], eax"], [177, "mov edx, [rbp+var_18]"], [178, "mov eax, [rbp+var_2C]"], [179, "add eax, edx"], [180, "mov [rbp+var_1C], eax"], [181, "mov eax, [rbp+var_14]"], [182, "mov [rbp+var_18], eax"], [183, "mov eax, [rbp+var_10]"], [184, "mov [rbp+var_14], eax"], [185, "mov eax, [rbp+var_C]"], [186, "mov [rbp+var_10], eax"], [187, "mov edx, [rbp+var_2C]"], [188, "mov eax, [rbp+var_30]"], [189, "add eax, edx"], [190, "mov [rbp+var_C], eax"], [191, "add [rbp+var_4], 1"], [192, "cmp [rbp+var_4], 3Fh "], [193, "jle loc_4179EC"], [194, "mov rax, [rbp+var_138]"], [195, "mov edx, [rax]"], [196, "mov eax, [rbp+var_C]"], [197, "add edx, eax"], [198, "mov rax, [rbp+var_138]"], [199, "mov [rax], edx"], [200, "mov rax, [rbp+var_138]"], [201, "mov edx, [rax+4]"], [202, "mov eax, [rbp+var_10]"], [203, "add edx, eax"], [204, "mov rax, [rbp+var_138]"], [205, "mov [rax+4], edx"], [206, "mov rax, [rbp+var_138]"], [207, "mov edx, [rax+8]"], [208, "mov eax, [rbp+var_14]"], [209, "add edx, eax"], [210, "mov rax, [rbp+var_138]"], [211, "mov [rax+8], edx"], [212, "mov rax, [rbp+var_138]"], [213, "mov edx, [rax+0Ch]"], [214, "mov eax, [rbp+var_18]"], [215, "add edx, eax"], [216, "mov rax, [rbp+var_138]"], [217, "mov [rax+0Ch], edx"], [218, "mov rax, [rbp+var_138]"], [219, "mov edx, [rax+10h]"], [220, "mov eax, [rbp+var_1C]"], [221, "add edx, eax"], [222, "mov rax, [rbp+var_138]"], [223, "mov [rax+10h], edx"], [224, "mov rax, [rbp+var_138]"], [225, "mov edx, [rax+14h]"], [226, "mov eax, [rbp+var_20]"], [227, "add edx, eax"], [228, "mov rax, [rbp+var_138]"], [229, "mov [rax+14h], edx"], [230, "mov rax, [rbp+var_138]"], [231, "mov edx, [rax+18h]"], [232, "mov eax, [rbp+var_24]"], [233, "add edx, eax"], [234, "mov rax, [rbp+var_138]"], [235, "mov [rax+18h], edx"], [236, "mov rax, [rbp+var_138]"], [237, "mov edx, [rax+1Ch]"], [238, "mov eax, [rbp+var_28]"], [239, "add edx, eax"], [240, "mov rax, [rbp+var_138]"], [241, "mov [rax+1Ch], edx"], [242, "mov rax, [rbp+var_138]"], [243, "mov dword ptr [rax+28h], 0"], [244, "nop"], [245, "leave"], [246, "retn"]], "data_dep": [[5, 4], [6, 5], [8, 3], [9, 43], [9, 4], [11, 9], [12, 11], [13, 12], [14, 13], [15, 43], [15, 4], [16, 15], [17, 3], [19, 16], [20, 19], [21, 20], [22, 14], [22, 21], [23, 43], [23, 4], [24, 23], [25, 3], [27, 24], [28, 27], [29, 28], [30, 22], [30, 29], [31, 43], [31, 4], [32, 31], [33, 3], [35, 32], [36, 35], [37, 30], [37, 36], [38, 37], [39, 42], [39, 6], [41, 39], [41, 38], [42, 6], [42, 42], [43, 43], [43, 4], [44, 42], [44, 6], [45, 44], [48, 98], [48, 46], [49, 48], [51, 49], [51, 41], [51, 97], [52, 51], [53, 52], [54, 46], [54, 98], [55, 54], [57, 97], [57, 55], [57, 41], [58, 57], [59, 58], [59, 53], [60, 46], [60, 98], [61, 60], [63, 61], [63, 97], [63, 41], [64, 63], [65, 64], [65, 59], [66, 98], [66, 46], [67, 66], [69, 67], [69, 41], [69, 97], [70, 65], [70, 69], [71, 98], [71, 46], [72, 71], [74, 97], [74, 41], [74, 72], [75, 74], [76, 75], [77, 98], [77, 46], [78, 77], [80, 41], [80, 97], [80, 78], [81, 80], [82, 81], [82, 76], [83, 98], [83, 46], [84, 83], [86, 84], [86, 41], [86, 97], [87, 86], [88, 87], [88, 82], [89, 70], [89, 88], [90, 46], [90, 98], [91, 90], [93, 41], [93, 97], [93, 91], [94, 89], [94, 93], [95, 98], [95, 46], [97, 95], [97, 94], [98, 46], [98, 98], [99, 98], [99, 46], [100, 99], [101, 3], [102, 101], [103, 102], [104, 3], [105, 104], [106, 105], [107, 3], [108, 107], [109, 108], [110, 3], [111, 110], [112, 111], [113, 3], [114, 113], [115, 114], [116, 3], [117, 116], [118, 117], [119, 3], [120, 119], [121, 120], [122, 3], [123, 122], [124, 123], [127, 180], [127, 115], [128, 127], [129, 128], [130, 115], [130, 180], [131, 130], [132, 131], [132, 129], [133, 115], [133, 180], [134, 133], [135, 132], [135, 134], [136, 124], [136, 172], [137, 135], [137, 136], [138, 118], [138, 176], [139, 121], [139, 138], [139, 174], [140, 139], [140, 115], [140, 180], [141, 174], [141, 140], [141, 121], [142, 137], [142, 141], [143, 191], [143, 125], [146, 142], [146, 145], [147, 125], [147, 191], [149, 147], [149, 41], [149, 97], [150, 149], [150, 146], [151, 150], [152, 103], [152, 190], [153, 152], [154, 153], [155, 190], [155, 103], [156, 155], [157, 156], [157, 154], [158, 190], [158, 103], [159, 158], [160, 157], [161, 160], [161, 159], [162, 186], [162, 106], [163, 184], [163, 109], [163, 162], [164, 103], [164, 163], [164, 190], [165, 164], [166, 106], [166, 186], [167, 166], [167, 109], [167, 184], [168, 165], [168, 167], [169, 161], [169, 168], [170, 169], [171, 174], [171, 121], [172, 171], [173, 118], [173, 176], [174, 173], [175, 115], [175, 180], [176, 175], [177, 112], [177, 182], [178, 151], [179, 178], [179, 177], [180, 179], [181, 109], [181, 184], [182, 181], [183, 186], [183, 106], [184, 183], [185, 103], [185, 190], [186, 185], [187, 151], [188, 170], [189, 188], [189, 187], [190, 189], [191, 191], [191, 125], [192, 191], [192, 125], [193, 192], [194, 3], [195, 194], [196, 190], [196, 103], [197, 196], [197, 195], [198, 3], [199, 198], [199, 197], [200, 3], [201, 199], [201, 200], [202, 186], [202, 106], [203, 202], [203, 201], [204, 3], [205, 204], [205, 203], [206, 3], [207, 206], [207, 205], [208, 109], [208, 184], [209, 208], [209, 207], [210, 3], [211, 210], [211, 209], [212, 3], [213, 212], [213, 211], [214, 182], [214, 112], [215, 214], [215, 213], [216, 3], [217, 216], [217, 215], [218, 3], [219, 218], [219, 217], [220, 115], [220, 180], [221, 219], [221, 220], [222, 3], [223, 222], [223, 221], [224, 3], [225, 224], [225, 223], [226, 176], [226, 118], [227, 226], [227, 225], [228, 3], [229, 228], [229, 227], [230, 3], [231, 230], [231, 229], [232, 121], [232, 174], [233, 232], [233, 231], [234, 3], [235, 233], [235, 234], [236, 3], [237, 236], [237, 235], [238, 172], [238, 124], [239, 238], [239, 237], [240, 3], [241, 240], [241, 239], [242, 3], [243, 242], [246, 242]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d0ebaa77558783765df381826c961e95c83338e285011d501a62bea474e93451_d0ebaa77558783765df381826c961e95c83338e285011d501a62bea474e93451.jsonl.gz", "strip_func_name": "sub_417809", "query": "\n\n\nint *__fastcall sub_417809(int *a1)\n{\nint *result; // rax\nint v2[64]; // [rsp+8h] [rbp-130h]\nint v3; // [rsp+108h] [rbp-30h]\nint v4; // [rsp+10Ch] [rbp-2Ch]\nint v5; // [rsp+110h] [rbp-28h]\nint v6; // [rsp+114h] [rbp-24h]\nint v7; // [rsp+118h] [rbp-20h]\nint v8; // [rsp+11Ch] [rbp-1Ch]\nint v9; // [rsp+120h] [rbp-18h]\nint v10; // [rsp+124h] [rbp-14h]\nint v11; // [rsp+128h] [rbp-10h]\nint v12; // [rsp+12Ch] [rbp-Ch]\nint v13; // [rsp+130h] [rbp-8h]\nint i; // [rsp+134h] [rbp-4h]\n\nv13 = 0;\ni = 0;\nwhile ( i <= 15 )\n{\nv2[i++] = HIBYTE(a1[v13 / 4u + 11]) | (BYTE2(a1[v13 / 4u + 11]) << 8) | (BYTE1(a1[v13 / 4u + 11]) << 16) | (LOBYTE(a1[v13 / 4u + 11]) << 24);\nv13 += 4;\n}\nfor ( i = 16; i <= 63; ++i )\nv2[i] = v2[i - 16]\n+ (__ROL4__(v2[i - 15], 14) ^ __ROR4__(v2[i - 15], 7) ^ ((unsigned int)v2[i - 15] >> 3))\n+ v2[i - 7]\n+ (((unsigned int)v2[i - 2] >> 10) ^ __ROL4__(v2[i - 2], 13) ^ __ROL4__(v2[i - 2], 15));\nv12 = *a1;\nv11 = a1[1];\nv10 = a1[2];\nv9 = a1[3];\nv8 = a1[4];\nv7 = a1[5];\nv6 = a1[6];\nv5 = a1[7];\nfor ( i = 0; i <= 63; ++i )\n{\nv4 = dword_430CA0[i] + (v6 ^ v8 & (v6 ^ v7)) + v5 + (__ROL4__(v8, 7) ^ __ROR4__(v8, 11) ^ __ROR4__(v8, 6)) + v2[i];\nv3 = (__ROL4__(v12, 10) ^ __ROR4__(v12, 13) ^ __ROR4__(v12, 2)) + (v12 & (v10 | v11) | v10 & v11);\nv5 = v6;\nv6 = v7;\nv7 = v8;\nv8 = v9 + v4;\nv9 = v10;\nv10 = v11;\nv11 = v12;\nv12 = v4 + v3;\n}\n*a1 += v12;\na1[1] += v11;\na1[2] += v10;\na1[3] += v9;\na1[4] += v8;\na1[5] += v7;\na1[6] += v6;\na1[7] += v5;\nresult = a1;\na1[10] = 0;\nreturn result;\n}\n\n\n\nQ:[a1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,i,sub_417809,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'context', 'v2': 'W', 'v3': 'temp2', 'v4': 'temp1', 'v5': 'H', 'v6': 'G', 'v7': 'F', 'v8': 'E', 'v9': 'D', 'v10': 'C', 'v11': 'B', 'v12': 'A', 'v13': 't4', 'i': 't', 'sub_417809': 'SHA224_256ProcessMessageBlock'}"} |
|
clearswitchlabels | 2592682ab3d2f821470f2832ab486f998eeee306142acc40683adf7919dfbec9 | lkundrak | dev86 | NA | PUBLIC void clearswitchlabels()
{
register struct symstruct *symptr;
for (symptr = namedfirst; symptr != NULL;
symptr = (struct symstruct *) symptr->type)
if (symptr->indcount == 3)
{
equlab(symptr->offset.offlabel, lowsp);
symptr->indcount = 4;
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40EFD8", "function_addr": 4255704, "binary_name": "2592682ab3d2f821470f2832ab486f998eeee306142acc40683adf7919dfbec9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 8"], [4, "mov rbx, cs:qword_42C668"], [5, "jmp short loc_40F00E"], [6, "movzx eax, byte ptr [rbx+4]"], [7, "cmp al, 3"], [8, "jnz short loc_40F00A"], [9, "mov rdx, cs:qword_42C138"], [10, "mov eax, [rbx+20h]"], [11, "mov rsi, rdx"], [12, "mov edi, eax"], [13, "call sub_401D3A"], [14, "mov byte ptr [rbx+4], 4"], [15, "mov rbx, [rbx+18h]"], [16, "test rbx, rbx"], [17, "jnz short loc_40EFEA"], [18, "nop"], [19, "nop"], [20, "mov rbx, [rbp+var_8]"], [21, "leave"], [22, "retn"]], "data_dep": [[6, 14], [6, 16], [7, 6], [8, 7], [10, 14], [10, 16], [11, 9], [12, 10], [14, 16], [15, 14], [15, 16], [16, 15], [16, 4], [17, 16], [22, 13], [22, 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/2592682ab3d2f821470f2832ab486f998eeee306142acc40683adf7919dfbec9_2592682ab3d2f821470f2832ab486f998eeee306142acc40683adf7919dfbec9.jsonl.gz", "strip_func_name": "sub_40EFD8", "query": "\n\n\n__int64 sub_40EFD8()\n{\n__int64 i; // rbx\n__int64 result; // rax\n\nfor ( i = qword_42C668; i; i = *(_QWORD *)(i + 24) )\n{\nresult = *(unsigned __int8 *)(i + 4);\nif ( (_BYTE)result == 3 )\n{\nresult = sub_401D3A(*(_DWORD *)(i + 32), qword_42C138);\n*(_BYTE *)(i + 4) = 4;\n}\n}\nreturn result;\n}\n\n\n\nQ:[sub_40EFD8,sub_401D3A,]\nAssistant: ", "hints": "[]", "response": "{'sub_40EFD8': 'clearswitchlabels', 'sub_401D3A': 'equlab'}"} |
|
lv_img_decoder_read_line | 1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a | FASTSHIFT | lv_gba_emu | NA | lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf)
{
lv_res_t res = LV_RES_INV;
if(dsc->decoder->read_line_cb) res = dsc->decoder->read_line_cb(dsc->decoder, dsc, x, y, len, buf);
return res;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44830C", "function_addr": 4489996, "binary_name": "1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov eax, ecx"], [5, "mov [rbp+var_30], r8"], [6, "mov ecx, esi"], [7, "mov [rbp+var_1C], cx"], [8, "mov [rbp+var_20], dx"], [9, "mov [rbp+var_24], ax"], [10, "mov [rbp+var_1], 0"], [11, "mov rax, [rbp+var_18]"], [12, "mov rax, [rax]"], [13, "mov rax, [rax+10h]"], [14, "test rax, rax"], [15, "jz short loc_448375"], [16, "mov rax, [rbp+var_18]"], [17, "mov rax, [rax]"], [18, "mov r10, [rax+10h]"], [19, "movsx edi, [rbp+var_24]"], [20, "movsx ecx, [rbp+var_20]"], [21, "movsx edx, [rbp+var_1C]"], [22, "mov rax, [rbp+var_18]"], [23, "mov rax, [rax]"], [24, "mov r8, [rbp+var_30]"], [25, "mov rsi, [rbp+var_18]"], [26, "mov r9, r8"], [27, "mov r8d, edi"], [28, "mov rdi, rax"], [29, "call r10"], [30, "mov [rbp+var_1], al"], [31, "movzx eax, [rbp+var_1]"], [32, "leave"], [33, "retn"]], "data_dep": [[7, 6], [9, 4], [11, 3], [12, 11], [13, 12], [14, 13], [15, 14], [16, 3], [17, 16], [18, 17], [19, 9], [20, 8], [21, 7], [22, 3], [23, 22], [24, 5], [25, 3], [26, 24], [27, 19], [28, 23], [29, 18], [30, 29], [31, 10], [31, 30], [33, 31]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a_1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a.jsonl.gz", "strip_func_name": "sub_44830C", "query": "\n\n\n__int64 __fastcall sub_44830C(_QWORD *a1, __int16 a2, __int16 a3, __int16 a4, __int64 a5)\n{\nunsigned __int8 v6; // [rsp+2Fh] [rbp-1h]\n\nv6 = 0;\nif ( *(_QWORD *)(*a1 + 16LL) )\nv6 = (*(__int64 (__fastcall **)(_QWORD, _QWORD *, _QWORD, _QWORD, _QWORD, __int64))(*a1 + 16LL))(\n*a1,\na1,\n(unsigned int)a2,\n(unsigned int)a3,\n(unsigned int)a4,\na5);\nreturn v6;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v6,sub_44830C,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'y', 'a4': 'len', 'a1': 'dsc', 'a2': 'x', 'a5': 'buf', 'v6': 'res', 'sub_44830C': 'lv_img_decoder_read_line'}"} |
|
Q_rint | c3e9f5d2263b4cdbf1aec2778e201a0c87583b1519128962b4332f3d1701a1f7 | sezero | uhexen2 | NA | vec_t Q_rint (vec_t in)
{
return (vec_t)floor(in + 0.49);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4040E4", "function_addr": 4210916, "binary_name": "c3e9f5d2263b4cdbf1aec2778e201a0c87583b1519128962b4332f3d1701a1f7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "movsd [rbp+var_8], xmm0"], [4, "movsd xmm1, [rbp+var_8]"], [5, "movsd xmm0, cs:qword_40B288"], [6, "addsd xmm1, xmm0"], [7, "movq rax, xmm1"], [8, "movq xmm0, rax"], [9, "call _floor"], [10, "movq rax, xmm0"], [11, "movq xmm0, rax"], [12, "leave"], [13, "retn"]], "data_dep": [[4, 3], [6, 5], [6, 4], [7, 6], [8, 7], [10, 8], [11, 10], [13, 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/c3e9f5d2263b4cdbf1aec2778e201a0c87583b1519128962b4332f3d1701a1f7_c3e9f5d2263b4cdbf1aec2778e201a0c87583b1519128962b4332f3d1701a1f7.jsonl.gz", "strip_func_name": "sub_4040E4", "query": "\n\n\n__int64 __fastcall sub_4040E4(double a1)\n{\nreturn floor(a1 + 0.49);\n}\n\n\n\nQ:[a1,sub_4040E4,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'in', 'sub_4040E4': 'Q_rint'}"} |
|
cpm86header | 72d06efaee45b9d12d4fa0842ca4cf741c97f8ed8a4d987d59a9948f064aabca | lkundrak | dev86 | NA | PRIVATE void cpm86header()
{
struct cpm86_exec header;
memset(&header, 0, sizeof header);
if (sepid)
{
header.ce_group[0].cg_type = CG_CODE;
u2c2(header.ce_group[0].cg_len, (15 + etextpadoff) / 16);
u2c2(header.ce_group[0].cg_min, (15 + etextpadoff) / 16);
header.ce_group[1].cg_type = CG_DATA;
u2c2(header.ce_group[1].cg_len, (15 + edataoffset) / 16);
u2c2(header.ce_group[1].cg_min, (15 + endoffset ) / 16);
u2c2(header.ce_group[1].cg_max, 0x1000);
}
else
{
header.ce_group[0].cg_type = CG_CODE;
u2c2(header.ce_group[0].cg_len, (15 + edataoffset) / 16);
u2c2(header.ce_group[0].cg_min, (15 + endoffset ) / 16);
}
if( FILEHEADERLENGTH )
writeout((char *) &header, FILEHEADERLENGTH);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40583E", "function_addr": 4216894, "binary_name": "72d06efaee45b9d12d4fa0842ca4cf741c97f8ed8a4d987d59a9948f064aabca.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "add rsp, 0FFFFFFFFFFFFFF80h"], [3, "lea rax, [rbp+s]"], [4, "mov edx, 80h"], [5, "mov esi, 0"], [6, "mov rdi, rax"], [7, "call _memset"], [8, "movzx eax, cs:byte_40BF80"], [9, "test al, al"], [10, "jz loc_405916"], [11, "mov [rbp+s], 1"], [12, "mov rax, cs:qword_40BD60"], [13, "add rax, 0Fh"], [14, "shr rax, 4"], [15, "mov edx, eax"], [16, "lea rax, [rbp+s]"], [17, "add rax, 1"], [18, "mov esi, edx"], [19, "mov rdi, rax"], [20, "call sub_403BB4"], [21, "mov rax, cs:qword_40BD60"], [22, "add rax, 0Fh"], [23, "shr rax, 4"], [24, "mov edx, eax"], [25, "lea rax, [rbp+s]"], [26, "add rax, 5"], [27, "mov esi, edx"], [28, "mov rdi, rax"], [29, "call sub_403BB4"], [30, "mov [rbp+var_77], 2"], [31, "mov rax, cs:qword_40BD48"], [32, "add rax, 0Fh"], [33, "shr rax, 4"], [34, "mov edx, eax"], [35, "lea rax, [rbp+s]"], [36, "add rax, 0Ah"], [37, "mov esi, edx"], [38, "mov rdi, rax"], [39, "call sub_403BB4"], [40, "mov rax, cs:qword_40BD50"], [41, "add rax, 0Fh"], [42, "shr rax, 4"], [43, "mov edx, eax"], [44, "lea rax, [rbp+s]"], [45, "add rax, 0Eh"], [46, "mov esi, edx"], [47, "mov rdi, rax"], [48, "call sub_403BB4"], [49, "lea rax, [rbp+s]"], [50, "add rax, 10h"], [51, "mov esi, 1000h"], [52, "mov rdi, rax"], [53, "call sub_403BB4"], [54, "jmp short loc_405960"], [55, "mov [rbp+s], 1"], [56, "mov rax, cs:qword_40BD48"], [57, "add rax, 0Fh"], [58, "shr rax, 4"], [59, "mov edx, eax"], [60, "lea rax, [rbp+s]"], [61, "add rax, 1"], [62, "mov esi, edx"], [63, "mov rdi, rax"], [64, "call sub_403BB4"], [65, "mov rax, cs:qword_40BD50"], [66, "add rax, 0Fh"], [67, "shr rax, 4"], [68, "mov edx, eax"], [69, "lea rax, [rbp+s]"], [70, "add rax, 5"], [71, "mov esi, edx"], [72, "mov rdi, rax"], [73, "call sub_403BB4"], [74, "mov eax, cs:dword_40B278"], [75, "test eax, eax"], [76, "jnz short loc_4059B0"], [77, "mov eax, cs:dword_40B278"], [78, "test eax, eax"], [79, "jnz short loc_40599D"], [80, "mov eax, cs:dword_40B280"], [81, "test eax, eax"], [82, "jnz short loc_405996"], [83, "mov eax, cs:dword_40B27C"], [84, "test eax, eax"], [85, "jz short loc_40598F"], [86, "mov eax, 10h"], [87, "jmp short loc_4059A2"], [88, "mov eax, 20h "], [89, "jmp short loc_4059A2"], [90, "mov eax, 80h"], [91, "jmp short loc_4059A2"], [92, "mov eax, 0"], [93, "lea rdx, [rbp+s]"], [94, "mov esi, eax"], [95, "mov rdi, rdx"], [96, "call sub_401F2B"], [97, "nop"], [98, "leave"], [99, "retn"]], "data_dep": [[6, 3], [9, 8], [10, 9], [13, 12], [14, 13], [15, 14], [16, 14], [16, 11], [17, 16], [18, 15], [19, 17], [22, 21], [23, 22], [24, 23], [25, 23], [25, 11], [26, 25], [27, 24], [28, 26], [32, 31], [33, 32], [34, 33], [35, 33], [35, 11], [36, 35], [37, 34], [38, 36], [41, 40], [42, 41], [43, 42], [44, 42], [44, 11], [45, 44], [46, 43], [47, 45], [49, 48], [49, 11], [50, 49], [52, 50], [57, 56], [58, 57], [59, 58], [60, 58], [60, 55], [61, 60], [62, 59], [63, 61], [66, 65], [67, 66], [68, 67], [69, 55], [69, 67], [70, 69], [71, 68], [72, 70], [75, 74], [76, 75], [78, 77], [79, 78], [81, 80], [82, 81], [84, 83], [85, 84], [93, 68], [93, 43], [93, 55], [93, 11], [94, 88], [94, 90], [94, 86], [94, 92], [95, 93], [99, 75], [99, 96]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/72d06efaee45b9d12d4fa0842ca4cf741c97f8ed8a4d987d59a9948f064aabca_72d06efaee45b9d12d4fa0842ca4cf741c97f8ed8a4d987d59a9948f064aabca.jsonl.gz", "strip_func_name": "sub_40583E", "query": "\n\n\n__int64 sub_40583E()\n{\n__int64 result; // rax\nunsigned int v1; // eax\nchar s; // [rsp+0h] [rbp-80h] BYREF\n_BYTE v3[4]; // [rsp+1h] [rbp-7Fh] BYREF\n_BYTE v4[5]; // [rsp+5h] [rbp-7Bh] BYREF\n_BYTE v5[6]; // [rsp+Ah] [rbp-76h] BYREF\n__int64 v6; // [rsp+10h] [rbp-70h] BYREF\n\nmemset(&s, 0, 0x80uLL);\ns = 1;\nif ( byte_40BF80 )\n{\nsub_403BB4((__int64)v3, (unsigned __int64)(qword_40BD60 + 15) >> 4);\nsub_403BB4((__int64)v4, (unsigned __int64)(qword_40BD60 + 15) >> 4);\nv4[4] = 2;\nsub_403BB4((__int64)v5, (unsigned __int64)(qword_40BD48 + 15) >> 4);\nsub_403BB4((__int64)&v5[4], (unsigned __int64)(qword_40BD50 + 15) >> 4);\nsub_403BB4((__int64)&v6, 4096);\n}\nelse\n{\nsub_403BB4((__int64)v3, (unsigned __int64)(qword_40BD48 + 15) >> 4);\nsub_403BB4((__int64)v4, (unsigned __int64)(qword_40BD50 + 15) >> 4);\n}\nresult = (unsigned int)dword_40B278;\nif ( !dword_40B278 )\n{\nif ( dword_40B280 )\n{\nv1 = 128;\n}\nelse if ( dword_40B27C )\n{\nv1 = 16;\n}\nelse\n{\nv1 = 32;\n}\nresult = sub_401F2B(&s, v1);\n}\nreturn result;\n}\n\n\n\nQ:[s,sub_40583E,sub_403BB4,sub_401F2B,]\nAssistant: ", "hints": "[]", "response": "{'s': 'header', 'sub_40583E': 'cpm86header', 'sub_403BB4': 'u2c2', 'sub_401F2B': 'writeout'}"} |
|
generated_int_list_does_not_repeat_values | c681eb38c30aec69de9ee360cf5cbaadc9181a4c2314bca13df8babc86210026 | h2o | h2o | NA | TEST generated_int_list_does_not_repeat_values() {
/* This test is expected to fail, with meaningful counter-examples. */
struct test_env env = { .fail = false };
struct theft_run_config cfg = {
.name = __func__,
.prop1 = prop_gen_list_unique,
.type_info = { &list_info },
.hooks = {
.trial_post = gildnrv_trial_post_hook,
.env = &env,
},
.trials = 1000,
.seed = 12345,
};
enum theft_run_res res;
res = theft_run(&cfg);
ASSERT_EQ_FMTm("should find counter-examples", THEFT_RUN_FAIL, res, "%d");
ASSERT(env.fail > 0);
PASS();
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4153F7", "function_addr": 4281335, "binary_name": "c681eb38c30aec69de9ee360cf5cbaadc9181a4c2314bca13df8babc86210026.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 140h"], [3, "mov [rbp+var_20], 0"], [4, "mov [rbp+var_18], 0"], [5, "lea rdx, [rbp+var_140]"], [6, "mov eax, 0"], [7, "mov ecx, 23h "], [8, "mov rdi, rdx"], [9, "rep stosq"], [10, "mov [rbp+var_140], offset sub_4152F6"], [11, "mov [rbp+var_108], offset off_4221C0"], [12, "mov [rbp+var_D0], offset aGeneratedIntLi_0"], [13, "mov [rbp+var_B8], 3E8h"], [14, "mov [rbp+var_B0], 3039h"], [15, "mov [rbp+var_58], offset sub_41535E"], [16, "lea rax, [rbp+var_20]"], [17, "mov [rbp+var_30], rax"], [18, "lea rax, [rbp+var_140]"], [19, "mov rdi, rax"], [20, "call sub_4013BC"], [21, "mov [rbp+var_4], eax"], [22, "mov eax, cs:dword_422424"], [23, "add eax, 1"], [24, "mov cs:dword_422424, eax"], [25, "cmp [rbp+var_4], 1"], [26, "jz loc_41554C"], [27, "mov rax, cs:stdout"], [28, "mov rcx, rax"], [29, "mov edx, 0Bh"], [30, "mov esi, 1"], [31, "mov edi, offset aExpected_4"], [32, "call _fwrite"], [33, "mov rax, cs:stdout"], [34, "mov edx, 1"], [35, "mov esi, offset aD_3"], [36, "mov rdi, rax"], [37, "mov eax, 0"], [38, "call _fprintf"], [39, "mov rax, cs:stdout"], [40, "mov rcx, rax"], [41, "mov edx, 0Bh"], [42, "mov esi, 1"], [43, "mov edi, offset aGot_4"], [44, "call _fwrite"], [45, "mov rax, cs:stdout"], [46, "mov edx, [rbp+var_4]"], [47, "mov esi, offset aD_3"], [48, "mov rdi, rax"], [49, "mov eax, 0"], [50, "call _fprintf"], [51, "mov rax, cs:stdout"], [52, "mov rsi, rax"], [53, "mov edi, 0Ah"], [54, "call _fputc"], [55, "mov cs:qword_422430, offset aTestTestTheftI"], [56, "mov cs:dword_422428, 172h"], [57, "mov cs:qword_422438, offset aShouldFindCoun_2"], [58, "mov eax, 0FFFFFFFFh"], [59, "jmp short locret_41559B"], [60, "mov eax, cs:dword_422424"], [61, "add eax, 1"], [62, "mov cs:dword_422424, eax"], [63, "mov rax, [rbp+var_18]"], [64, "test rax, rax"], [65, "jnz short loc_41558B"], [66, "mov cs:qword_422430, offset aTestTestTheftI"], [67, "mov cs:dword_422428, 173h"], [68, "mov cs:qword_422438, offset aEnvFail0"], [69, "mov eax, 0FFFFFFFFh"], [70, "jmp short locret_41559B"], [71, "mov cs:qword_422438, 0"], [72, "mov eax, 0"], [73, "leave"], [74, "retn"]], "data_dep": [[8, 5], [16, 3], [16, 6], [17, 16], [18, 10], [18, 16], [19, 18], [21, 20], [23, 22], [24, 23], [25, 21], [26, 25], [28, 27], [36, 33], [40, 39], [46, 21], [48, 45], [52, 51], [60, 24], [61, 60], [62, 61], [63, 4], [64, 63], [65, 64], [74, 58], [74, 72], [74, 69]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c681eb38c30aec69de9ee360cf5cbaadc9181a4c2314bca13df8babc86210026_c681eb38c30aec69de9ee360cf5cbaadc9181a4c2314bca13df8babc86210026.jsonl.gz", "strip_func_name": "sub_4153F7", "query": "\n\n\n__int64 sub_4153F7()\n{\n__int64 result; // rax\n__int64 v1[36]; // [rsp+0h] [rbp-140h] BYREF\n__int64 v2; // [rsp+120h] [rbp-20h] BYREF\n__int64 v3; // [rsp+128h] [rbp-18h]\nunsigned int v4; // [rsp+13Ch] [rbp-4h]\n\nv2 = 0LL;\nv3 = 0LL;\nmemset(v1, 0, 0x118uLL);\nv1[0] = (__int64)sub_4152F6;\nv1[7] = (__int64)off_4221C0;\nv1[14] = (__int64)\"generated_int_list_does_not_repeat_values\";\nv1[17] = 1000LL;\nv1[18] = 12345LL;\nv1[29] = (__int64)sub_41535E;\nv1[34] = (__int64)&v2;\nv4 = sub_4013BC((__int64)v1);\n++dword_422424;\nif ( v4 == 1 )\n{\n++dword_422424;\nif ( v3 )\n{\nqword_422438 = 0LL;\nresult = 0LL;\n}\nelse\n{\nqword_422430 = (__int64)\"test/test_theft_integration.c\";\ndword_422428 = 371;\nqword_422438 = (__int64)\"env.fail > 0\";\nresult = 0xFFFFFFFFLL;\n}\n}\nelse\n{\nfwrite(\"\\nExpected: \", 1uLL, 0xBuLL, stdout);\nfprintf(stdout, \"%d\", 1LL);\nfwrite(\"\\n Got: \", 1uLL, 0xBuLL, stdout);\nfprintf(stdout, \"%d\", v4);\nfputc(10, stdout);\nqword_422430 = (__int64)\"test/test_theft_integration.c\";\ndword_422428 = 370;\nqword_422438 = (__int64)\"should find counter-examples\";\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[v1,v2,v4,sub_4153F7,sub_4152F6,sub_41535E,sub_4013BC,]\nAssistant: ", "hints": "[]", "response": "{'v1': 'cfg', 'v2': 'env', 'v4': 'res', 'sub_4153F7': 'generated_int_list_does_not_repeat_values', 'sub_4152F6': 'prop_gen_list_unique', 'sub_41535E': 'gildnrv_trial_post_hook', 'sub_4013BC': 'theft_run'}"} |
|
get_aval | 5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99 | open-simh | simh | NA | t_stat get_aval (t_addr addr, DEVICE *dptr, UNIT *uptr)
{
int32 i;
t_value mask;
t_addr j, loc;
size_t sz;
t_stat reason = SCPE_OK;
if ((dptr == NULL) || (uptr == NULL))
return SCPE_IERR;
mask = width_mask[dptr->dwidth];
for (i = 0; i < sim_emax; i++)
sim_eval[i] = 0;
for (i = 0, j = addr; i < sim_emax; i++, j = j + dptr->aincr) {
if (dptr->examine != NULL) {
reason = dptr->examine (&sim_eval[i], j, uptr, sim_switches);
if (reason != SCPE_OK)
break;
}
else {
if (!(uptr->flags & UNIT_ATT))
return SCPE_UNATT;
if ((uptr->dynflags & UNIT_NO_FIO) ||
(uptr->fileref == NULL))
return SCPE_NOFNC;
if ((uptr->flags & UNIT_FIX) && (j >= uptr->capac)) {
reason = SCPE_NXM;
break;
}
sz = SZ_D (dptr);
loc = j / dptr->aincr;
if (uptr->flags & UNIT_BUF) {
SZ_LOAD (sz, sim_eval[i], uptr->filebuf, loc);
}
else {
if (sim_fseek (uptr->fileref, (t_addr)(sz * loc), SEEK_SET)) {
clearerr (uptr->fileref);
reason = SCPE_IOERR;
break;
}
(void)sim_fread (&sim_eval[i], sz, 1, uptr->fileref);
if ((feof (uptr->fileref)) &&
!(uptr->flags & UNIT_FIX)) {
reason = SCPE_EOF;
break;
}
else if (ferror (uptr->fileref)) {
clearerr (uptr->fileref);
reason = SCPE_IOERR;
break;
}
}
}
sim_last_val = sim_eval[i] = sim_eval[i] & mask;
}
if ((reason != SCPE_OK) && (i == 0))
return reason;
return SCPE_OK;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42CA98", "function_addr": 4377240, "binary_name": "5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_24], edi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_C], 0"], [7, "cmp [rbp+var_30], 0"], [8, "jz short loc_42CAC0"], [9, "cmp [rbp+var_38], 0"], [10, "jnz short loc_42CACA"], [11, "mov eax, 65h "], [12, "jmp locret_42CDE2"], [13, "mov rax, [rbp+var_30]"], [14, "mov eax, [rax+34h]"], [15, "mov eax, eax"], [16, "mov eax, ds:dword_496580[rax*4]"], [17, "mov [rbp+var_10], eax"], [18, "mov [rbp+var_4], 0"], [19, "jmp short loc_42CB03"], [20, "mov rdx, cs:qword_52A9C8"], [21, "mov eax, [rbp+var_4]"], [22, "cdqe"], [23, "shl rax, 2"], [24, "add rax, rdx"], [25, "mov dword ptr [rax], 0"], [26, "add [rbp+var_4], 1"], [27, "mov eax, cs:dword_4D1328"], [28, "cmp [rbp+var_4], eax"], [29, "jl short loc_42CAE6"], [30, "mov [rbp+var_4], 0"], [31, "mov eax, [rbp+var_24]"], [32, "mov [rbp+var_8], eax"], [33, "jmp loc_42CDBD"], [34, "mov rax, [rbp+var_30]"], [35, "mov rax, [rax+38h]"], [36, "test rax, rax"], [37, "jz short loc_42CB6D"], [38, "mov rax, [rbp+var_30]"], [39, "mov r8, [rax+38h]"], [40, "mov ecx, cs:dword_52A794"], [41, "mov rdx, cs:qword_52A9C8"], [42, "mov eax, [rbp+var_4]"], [43, "cdqe"], [44, "shl rax, 2"], [45, "lea rdi, [rdx+rax]"], [46, "mov rdx, [rbp+var_38]"], [47, "mov eax, [rbp+var_8]"], [48, "mov esi, eax"], [49, "call r8"], [50, "mov [rbp+var_C], eax"], [51, "cmp [rbp+var_C], 0"], [52, "jz loc_42CD7A"], [53, "jmp loc_42CDCC"], [54, "mov rax, [rbp+var_38]"], [55, "mov eax, [rax+38h]"], [56, "and eax, 10h"], [57, "test eax, eax"], [58, "jnz short loc_42CB85"], [59, "mov eax, 41h "], [60, "jmp locret_42CDE2"], [61, "mov rax, [rbp+var_38]"], [62, "mov eax, [rax+3Ch]"], [63, "and eax, 4"], [64, "test eax, eax"], [65, "jnz short loc_42CBA0"], [66, "mov rax, [rbp+var_38]"], [67, "mov rax, [rax+18h]"], [68, "test rax, rax"], [69, "jnz short loc_42CBAA"], [70, "mov eax, 59h "], [71, "jmp locret_42CDE2"], [72, "mov rax, [rbp+var_38]"], [73, "mov eax, [rax+38h]"], [74, "and eax, 4"], [75, "test eax, eax"], [76, "jz short loc_42CBD0"], [77, "mov rax, [rbp+var_38]"], [78, "mov eax, [rax+40h]"], [79, "cmp [rbp+var_8], eax"], [80, "jb short loc_42CBD0"], [81, "mov [rbp+var_C], 40h "], [82, "jmp loc_42CDCC"], [83, "mov rax, [rbp+var_30]"], [84, "mov eax, [rax+34h]"], [85, "add eax, 7"], [86, "shr eax, 3"], [87, "mov eax, eax"], [88, "mov rax, ds:size[rax*8]"], [89, "mov [rbp+var_18], rax"], [90, "mov rax, [rbp+var_30]"], [91, "mov esi, [rax+2Ch]"], [92, "mov eax, [rbp+var_8]"], [93, "mov edx, 0"], [94, "div esi"], [95, "mov [rbp+var_1C], eax"], [96, "mov rax, [rbp+var_38]"], [97, "mov eax, [rax+38h]"], [98, "and eax, 100h"], [99, "test eax, eax"], [100, "jz loc_42CCB1"], [101, "cmp [rbp+var_18], 1"], [102, "jnz short loc_42CC49"], [103, "mov rax, [rbp+var_38]"], [104, "mov rdx, [rax+20h]"], [105, "mov eax, [rbp+var_1C]"], [106, "add rax, rdx"], [107, "movzx eax, byte ptr [rax]"], [108, "mov rcx, cs:qword_52A9C8"], [109, "mov edx, [rbp+var_4]"], [110, "movsxd rdx, edx"], [111, "shl rdx, 2"], [112, "add rdx, rcx"], [113, "movzx eax, al"], [114, "mov [rdx], eax"], [115, "jmp loc_42CD7A"], [116, "cmp [rbp+var_18], 2"], [117, "jnz short loc_42CC82"], [118, "mov rax, [rbp+var_38]"], [119, "mov rdx, [rax+20h]"], [120, "mov eax, [rbp+var_1C]"], [121, "add rax, rax"], [122, "add rax, rdx"], [123, "movzx eax, word ptr [rax]"], [124, "mov rcx, cs:qword_52A9C8"], [125, "mov edx, [rbp+var_4]"], [126, "movsxd rdx, edx"], [127, "shl rdx, 2"], [128, "add rdx, rcx"], [129, "movzx eax, ax"], [130, "mov [rdx], eax"], [131, "jmp loc_42CD7A"], [132, "mov rax, [rbp+var_38]"], [133, "mov rdx, [rax+20h]"], [134, "mov eax, [rbp+var_1C]"], [135, "shl rax, 2"], [136, "add rax, rdx"], [137, "mov rcx, cs:qword_52A9C8"], [138, "mov edx, [rbp+var_4]"], [139, "movsxd rdx, edx"], [140, "shl rdx, 2"], [141, "add rdx, rcx"], [142, "mov eax, [rax]"], [143, "mov [rdx], eax"], [144, "jmp loc_42CD7A"], [145, "mov rax, [rbp+var_18]"], [146, "imul eax, [rbp+var_1C]"], [147, "mov ecx, eax"], [148, "mov rax, [rbp+var_38]"], [149, "mov rax, [rax+18h]"], [150, "mov edx, 0"], [151, "mov esi, ecx"], [152, "mov rdi, rax"], [153, "call sub_44923B"], [154, "test eax, eax"], [155, "jz short loc_42CCF2"], [156, "mov rax, [rbp+var_38]"], [157, "mov rax, [rax+18h]"], [158, "mov rdi, rax"], [159, "call _clearerr"], [160, "mov [rbp+var_C], 42h "], [161, "jmp loc_42CDCC"], [162, "mov rax, [rbp+var_38]"], [163, "mov rdx, [rax+18h]"], [164, "mov rcx, cs:qword_52A9C8"], [165, "mov eax, [rbp+var_4]"], [166, "cdqe"], [167, "shl rax, 2"], [168, "lea rdi, [rcx+rax]"], [169, "mov rax, [rbp+var_18]"], [170, "mov rcx, rdx"], [171, "mov edx, 1"], [172, "mov rsi, rax"], [173, "call sub_4487CD"], [174, "mov rax, [rbp+var_38]"], [175, "mov rax, [rax+18h]"], [176, "mov rdi, rax"], [177, "call _feof"], [178, "test eax, eax"], [179, "jz short loc_42CD4D"], [180, "mov rax, [rbp+var_38]"], [181, "mov eax, [rax+38h]"], [182, "and eax, 4"], [183, "test eax, eax"], [184, "jnz short loc_42CD4D"], [185, "mov [rbp+var_C], 51h "], [186, "jmp short loc_42CDCC"], [187, "mov rax, [rbp+var_38]"], [188, "mov rax, [rax+18h]"], [189, "mov rdi, rax"], [190, "call _ferror"], [191, "test eax, eax"], [192, "jz short loc_42CD7A"], [193, "mov rax, [rbp+var_38]"], [194, "mov rax, [rax+18h]"], [195, "mov rdi, rax"], [196, "call _clearerr"], [197, "mov [rbp+var_C], 42h "], [198, "jmp short loc_42CDCC"], [199, "mov rdx, cs:qword_52A9C8"], [200, "mov eax, [rbp+var_4]"], [201, "cdqe"], [202, "shl rax, 2"], [203, "add rax, rdx"], [204, "mov edx, [rax]"], [205, "mov rcx, cs:qword_52A9C8"], [206, "mov eax, [rbp+var_4]"], [207, "cdqe"], [208, "shl rax, 2"], [209, "add rax, rcx"], [210, "and edx, [rbp+var_10]"], [211, "mov [rax], edx"], [212, "mov eax, [rax]"], [213, "mov cs:dword_52AFBC, eax"], [214, "add [rbp+var_4], 1"], [215, "mov rax, [rbp+var_30]"], [216, "mov eax, [rax+2Ch]"], [217, "add [rbp+var_8], eax"], [218, "mov eax, cs:dword_4D1328"], [219, "cmp [rbp+var_4], eax"], [220, "jl loc_42CB20"], [221, "cmp [rbp+var_C], 0"], [222, "jz short loc_42CDDD"], [223, "cmp [rbp+var_4], 0"], [224, "jnz short loc_42CDDD"], [225, "mov eax, [rbp+var_C]"], [226, "jmp short locret_42CDE2"], [227, "mov eax, 0"], [228, "leave"], [229, "retn"]], "data_dep": [[7, 4], [8, 7], [9, 5], [10, 9], [13, 4], [14, 13], [15, 14], [17, 16], [21, 18], [21, 26], [23, 21], [24, 20], [24, 23], [25, 24], [26, 18], [26, 26], [28, 18], [28, 27], [28, 26], [29, 28], [31, 3], [32, 31], [34, 4], [35, 143], [35, 25], [35, 114], [35, 211], [35, 34], [35, 130], [36, 35], [37, 36], [38, 4], [39, 211], [39, 38], [39, 130], [39, 143], [39, 25], [39, 114], [42, 214], [42, 30], [44, 42], [45, 25], [45, 114], [45, 211], [45, 130], [45, 189], [45, 45], [45, 143], [45, 44], [46, 5], [47, 32], [47, 217], [48, 47], [49, 39], [50, 49], [51, 50], [52, 51], [54, 5], [55, 130], [55, 143], [55, 54], [55, 25], [55, 114], [55, 211], [56, 55], [57, 56], [58, 57], [61, 5], [62, 143], [62, 25], [62, 114], [62, 211], [62, 61], [62, 130], [63, 62], [64, 63], [65, 64], [66, 5], [67, 143], [67, 25], [67, 114], [67, 211], [67, 66], [67, 130], [68, 67], [69, 68], [72, 5], [73, 72], [73, 25], [73, 114], [73, 211], [73, 130], [73, 143], [74, 73], [75, 74], [76, 75], [77, 5], [78, 77], [78, 25], [78, 114], [78, 211], [78, 130], [78, 143], [79, 32], [79, 78], [79, 217], [80, 79], [83, 4], [84, 143], [84, 83], [84, 130], [84, 25], [84, 114], [84, 211], [85, 84], [86, 85], [87, 86], [89, 88], [90, 4], [91, 25], [91, 114], [91, 90], [91, 211], [91, 130], [91, 143], [92, 217], [92, 32], [94, 91], [95, 92], [96, 5], [97, 25], [97, 114], [97, 211], [97, 130], [97, 143], [97, 96], [98, 97], [99, 98], [100, 99], [101, 89], [102, 101], [103, 5], [104, 130], [104, 143], [104, 25], [104, 114], [104, 211], [104, 103], [105, 95], [106, 105], [106, 104], [107, 211], [107, 130], [107, 143], [107, 106], [107, 25], [107, 114], [109, 30], [109, 214], [110, 109], [111, 110], [112, 111], [112, 108], [113, 107], [114, 113], [114, 112], [116, 89], [117, 116], [118, 5], [119, 114], [119, 25], [119, 118], [119, 211], [119, 130], [119, 143], [120, 95], [121, 120], [122, 119], [122, 121], [123, 130], [123, 143], [123, 25], [123, 114], [123, 122], [123, 211], [125, 30], [125, 214], [126, 125], [127, 126], [128, 124], [128, 127], [129, 123], [130, 128], [130, 129], [132, 5], [133, 143], [133, 25], [133, 114], [133, 132], [133, 211], [133, 130], [134, 95], [135, 134], [136, 135], [136, 133], [138, 30], [138, 214], [139, 138], [140, 139], [141, 137], [141, 140], [142, 130], [142, 143], [142, 25], [142, 114], [142, 136], [142, 211], [143, 141], [143, 142], [145, 89], [146, 95], [146, 145], [147, 146], [148, 5], [149, 114], [149, 25], [149, 211], [149, 130], [149, 148], [149, 143], [151, 147], [152, 149], [154, 153], [155, 154], [156, 5], [157, 211], [157, 156], [157, 25], [157, 130], [157, 143], [157, 114], [158, 157], [162, 5], [163, 130], [163, 143], [163, 25], [163, 114], [163, 211], [163, 162], [165, 30], [165, 214], [167, 165], [168, 211], [168, 114], [168, 25], [168, 167], [168, 130], [168, 143], [168, 152], [169, 89], [170, 163], [172, 169], [174, 5], [175, 211], [175, 130], [175, 143], [175, 114], [175, 174], [175, 25], [176, 175], [178, 177], [179, 178], [180, 5], [181, 25], [181, 130], [181, 180], [181, 143], [181, 114], [181, 211], [182, 181], [183, 182], [184, 183], [187, 5], [188, 187], [188, 130], [188, 143], [188, 114], [188, 211], [188, 25], [189, 188], [191, 190], [192, 191], [193, 5], [194, 130], [194, 143], [194, 114], [194, 193], [194, 211], [194, 25], [195, 194], [200, 30], [200, 214], [202, 200], [203, 202], [203, 199], [204, 130], [204, 143], [204, 114], [204, 203], [204, 211], [204, 25], [206, 30], [206, 214], [208, 206], [209, 208], [209, 205], [210, 204], [210, 17], [211, 210], [211, 209], [212, 211], [212, 209], [213, 212], [214, 30], [214, 214], [215, 4], [216, 215], [216, 211], [217, 217], [217, 216], [217, 32], [219, 30], [219, 214], [219, 218], [220, 219], [221, 185], [221, 50], [221, 81], [221, 197], [221, 160], [221, 6], [222, 221], [223, 30], [223, 214], [224, 223], [225, 81], [225, 197], [225, 160], [225, 6], [225, 185], [225, 50], [229, 70], [229, 227], [229, 59], [229, 225], [229, 11]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99_5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99.jsonl.gz", "strip_func_name": "sub_42CA98", "query": "\n\n\n__int64 __fastcall sub_42CA98(unsigned int a1, __int64 a2, __int64 a3)\n{\n__int64 result; // rax\nint v4; // eax\nint *v5; // rax\nunsigned int v7; // [rsp+24h] [rbp-1Ch]\nsize_t v8; // [rsp+28h] [rbp-18h]\nint v9; // [rsp+30h] [rbp-10h]\nunsigned int v10; // [rsp+34h] [rbp-Ch]\nint i; // [rsp+3Ch] [rbp-4h]\nint j; // [rsp+3Ch] [rbp-4h]\n\nv10 = 0;\nif ( !a2 || !a3 )\nreturn 101LL;\nv9 = dword_496580[*(unsigned int *)(a2 + 52)];\nfor ( i = 0; i < dword_4D1328; ++i )\n*(_DWORD *)(qword_52A9C8 + 4LL * i) = 0;\nfor ( j = 0; j < dword_4D1328; ++j )\n{\nif ( *(_QWORD *)(a2 + 56) )\n{\nv10 = (*(__int64 (__fastcall **)(__int64, _QWORD, __int64, _QWORD))(a2 + 56))(\nqword_52A9C8 + 4LL * j,\na1,\na3,\n(unsigned int)dword_52A794);\nif ( v10 )\nbreak;\n}\nelse\n{\nif ( (*(_DWORD *)(a3 + 56) & 0x10) == 0 )\nreturn 65LL;\nif ( (*(_DWORD *)(a3 + 60) & 4) != 0 || !*(_QWORD *)(a3 + 24) )\nreturn 89LL;\nif ( (*(_DWORD *)(a3 + 56) & 4) != 0 && a1 >= *(_DWORD *)(a3 + 64) )\n{\nv10 = 64;\nbreak;\n}\nv8 = size[(unsigned int)(*(_DWORD *)(a2 + 52) + 7) >> 3];\nv7 = a1 / *(_DWORD *)(a2 + 44);\nif ( (*(_DWORD *)(a3 + 56) & 0x100) != 0 )\n{\nif ( v8 == 1 )\n{\n*(_DWORD *)(qword_52A9C8 + 4LL * j) = *(unsigned __int8 *)(*(_QWORD *)(a3 + 32) + v7);\n}\nelse\n{\nif ( v8 == 2 )\nv4 = *(unsigned __int16 *)(*(_QWORD *)(a3 + 32) + 2LL * v7);\nelse\nv4 = *(_DWORD *)(*(_QWORD *)(a3 + 32) + 4LL * v7);\n*(_DWORD *)(qword_52A9C8 + 4LL * j) = v4;\n}\n}\nelse\n{\nif ( (unsigned int)sub_44923B(*(_QWORD *)(a3 + 24), v7 * (unsigned int)v8, 0LL) )\ngoto LABEL_27;\nsub_4487CD(qword_52A9C8 + 4LL * j, v8, 1LL, *(_QWORD *)(a3 + 24));\nif ( feof(*(FILE **)(a3 + 24)) && (*(_DWORD *)(a3 + 56) & 4) == 0 )\n{\nv10 = 81;\nbreak;\n}\nif ( ferror(*(FILE **)(a3 + 24)) )\n{\nLABEL_27:\nclearerr(*(FILE **)(a3 + 24));\nv10 = 66;\nbreak;\n}\n}\n}\nv5 = (int *)(qword_52A9C8 + 4LL * j);\n*v5 &= v9;\ndword_52AFBC = *v5;\na1 += *(_DWORD *)(a2 + 44);\n}\nif ( !v10 || j )\nresult = 0LL;\nelse\nresult = v10;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v7,v8,v9,v10,sub_42CA98,sub_44923B,sub_4487CD,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'uptr', 'a1': 'addr', 'a2': 'dptr', 'v7': 'loc', 'v8': 'sz', 'v9': 'mask', 'v10': 'reason', 'sub_42CA98': 'get_aval', 'sub_44923B': 'sim_fseek', 'sub_4487CD': 'sim_fread'}"} |
|
mossdsp_conjugateqtf | 20fbbc943e3294e7c061cccb8efda6c603b6ac7e09cb63ed86eac2dc4ce799df | sonydevworld | spresense | NA | int mossdsp_conjugateqtf(mossfw_data_qtf_t * out,
const mossfw_data_qtf_t * in, unsigned int num)
{
unsigned int i;
if (out == NULL || in == NULL || num == 0)
{
return -1;
}
for (i = 0; i < num; i++)
{
conjugateqtf_element(&out[i], &in[i]);
}
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_416B4B", "function_addr": 4287307, "binary_name": "20fbbc943e3294e7c061cccb8efda6c603b6ac7e09cb63ed86eac2dc4ce799df.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 28h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_24], edx"], [6, "cmp [rbp+var_18], 0"], [7, "jz short loc_416B72"], [8, "cmp [rbp+var_20], 0"], [9, "jz short loc_416B72"], [10, "cmp [rbp+var_24], 0"], [11, "jnz short loc_416B79"], [12, "mov eax, 0FFFFFFFFh"], [13, "jmp short locret_416BD4"], [14, "mov [rbp+var_4], 0"], [15, "jmp short loc_416BC7"], [16, "mov edx, [rbp+var_4]"], [17, "mov rax, rdx"], [18, "shl rax, 2"], [19, "add rax, rdx"], [20, "shl rax, 2"], [21, "mov rdx, rax"], [22, "mov rax, [rbp+var_20]"], [23, "add rdx, rax"], [24, "mov ecx, [rbp+var_4]"], [25, "mov rax, rcx"], [26, "shl rax, 2"], [27, "add rax, rcx"], [28, "shl rax, 2"], [29, "mov rcx, rax"], [30, "mov rax, [rbp+var_18]"], [31, "add rax, rcx"], [32, "mov rsi, rdx"], [33, "mov rdi, rax"], [34, "call sub_416909"], [35, "add [rbp+var_4], 1"], [36, "mov eax, [rbp+var_4]"], [37, "cmp eax, [rbp+var_24]"], [38, "jb short loc_416B82"], [39, "mov eax, 0"], [40, "leave"], [41, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 4], [9, 8], [10, 5], [11, 10], [16, 35], [16, 14], [17, 16], [18, 17], [19, 18], [19, 16], [20, 19], [21, 20], [22, 4], [23, 22], [23, 21], [24, 14], [24, 35], [25, 24], [26, 25], [27, 24], [27, 26], [28, 27], [29, 28], [30, 3], [31, 29], [31, 30], [32, 23], [33, 31], [35, 14], [35, 35], [36, 14], [36, 35], [37, 36], [37, 5], [38, 37], [41, 12], [41, 39]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/20fbbc943e3294e7c061cccb8efda6c603b6ac7e09cb63ed86eac2dc4ce799df_20fbbc943e3294e7c061cccb8efda6c603b6ac7e09cb63ed86eac2dc4ce799df.jsonl.gz", "strip_func_name": "sub_416B4B", "query": "\n\n\n__int64 __fastcall sub_416B4B(__int64 a1, __int64 a2, unsigned int a3)\n{\nunsigned int i; // [rsp+24h] [rbp-4h]\n\nif ( !a1 || !a2 || !a3 )\nreturn 0xFFFFFFFFLL;\nfor ( i = 0; i < a3; ++i )\nsub_416909(20LL * i + a1, a2 + 20LL * i);\nreturn 0LL;\n}\n\n\n\nQ:[a3,a1,a2,sub_416B4B,sub_416909,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'num', 'a1': 'out', 'a2': 'in', 'sub_416B4B': 'mossdsp_conjugateqtf', 'sub_416909': 'conjugateqtf_element'}"} |
|
fixup_relocations | 2f5d91478cdbd733b4d2f79052ff2ac977f3977372ec6e8fe63629b020783033 | teslamotors | coreboot | NA | static void fixup_relocations(struct elf_writer *ew)
{
int i;
Elf64_Xword type;
switch (ew->ehdr.e_machine) {
case EM_386:
type = R_386_32;
break;
case EM_ARM:
type = R_ARM_ABS32;
break;
case EM_AARCH64:
type = R_AARCH64_ABS64;
break;
case EM_MIPS:
type = R_MIPS_32;
break;
case EM_RISCV:
type = R_RISCV_32;
break;
case EM_PPC64:
type = R_PPC64_ADDR32;
break;
default:
ERROR("Unable to handle relocations for e_machine %x\n",
ew->ehdr.e_machine);
return;
}
for (i = 0; i < MAX_SECTIONS; i++) {
struct elf_writer_rel *rel_sec = &ew->rel_sections[i];
struct elf_writer_section *sec = rel_sec->sec;
struct buffer writer;
size_t j;
if (sec == NULL)
continue;
/* Update section header size as well as content size. */
buffer_init(&sec->content, sec->content.name, rel_sec->rels,
rel_sec->num_entries * sec->shdr.sh_entsize);
sec->shdr.sh_size = buffer_size(&sec->content);
buffer_clone(&writer, &sec->content);
/* To make xdr happy. */
buffer_set_size(&writer, 0);
for (j = 0; j < ew->rel_sections[i].num_entries; j++) {
/* Make copy as we're overwriting backing store. */
Elf64_Rel rel = rel_sec->rels[j];
rel.r_info = ELF64_R_INFO(ELF64_R_SYM(rel.r_info),
ELF64_R_TYPE(type));
if (ew->bit64) {
ew->xdr->put64(&writer, rel.r_offset);
ew->xdr->put64(&writer, rel.r_info);
} else {
Elf32_Rel rel32;
rel32.r_offset = rel.r_offset;
rel32.r_info =
ELF32_R_INFO(ELF64_R_SYM(rel.r_info),
ELF64_R_TYPE(rel.r_info));
ew->xdr->put32(&writer, rel32.r_offset);
ew->xdr->put32(&writer, rel32.r_info);
}
}
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4064BE", "function_addr": 4220094, "binary_name": "2f5d91478cdbd733b4d2f79052ff2ac977f3977372ec6e8fe63629b020783033.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "add rsp, 0FFFFFFFFFFFFFF80h"], [3, "mov [rbp+var_78], rdi"], [4, "mov rax, [rbp+var_78]"], [5, "movzx eax, word ptr [rax+12h]"], [6, "movzx eax, ax"], [7, "cmp eax, 0F3h"], [8, "jz short loc_406539"], [9, "cmp eax, 0F3h"], [10, "jg short loc_40654D"], [11, "cmp eax, 0B7h"], [12, "jz short loc_406525"], [13, "cmp eax, 0B7h"], [14, "jg short loc_40654D"], [15, "cmp eax, 28h "], [16, "jz short loc_40651B"], [17, "cmp eax, 28h "], [18, "jg short loc_40654D"], [19, "cmp eax, 15h"], [20, "jz short loc_406543"], [21, "cmp eax, 15h"], [22, "jg short loc_40654D"], [23, "cmp eax, 3"], [24, "jz short loc_406511"], [25, "cmp eax, 8"], [26, "jz short loc_40652F"], [27, "jmp short loc_40654D"], [28, "mov [rbp+var_10], 1"], [29, "jmp short loc_406576"], [30, "mov [rbp+var_10], 2"], [31, "jmp short loc_406576"], [32, "mov [rbp+var_10], 101h"], [33, "jmp short loc_406576"], [34, "mov [rbp+var_10], 2"], [35, "jmp short loc_406576"], [36, "mov [rbp+var_10], 2"], [37, "jmp short loc_406576"], [38, "mov [rbp+var_10], 1"], [39, "jmp short loc_406576"], [40, "mov rax, [rbp+var_78]"], [41, "movzx eax, word ptr [rax+12h]"], [42, "movzx edx, ax"], [43, "mov rax, cs:stderr"], [44, "mov esi, offset aEUnableToHandl"], [45, "mov rdi, rax"], [46, "mov eax, 0"], [47, "call _fprintf"], [48, "jmp locret_40674C"], [49, "mov [rbp+var_4], 0"], [50, "jmp loc_406742"], [51, "mov eax, [rbp+var_4]"], [52, "cdqe"], [53, "shl rax, 6"], [54, "lea rdx, [rax+6D0h]"], [55, "mov rax, [rbp+var_78]"], [56, "add rax, rdx"], [57, "mov [rbp+var_20], rax"], [58, "mov rax, [rbp+var_20]"], [59, "mov rax, [rax+18h]"], [60, "mov [rbp+var_28], rax"], [61, "cmp [rbp+var_28], 0"], [62, "jz loc_40673D"], [63, "mov rax, [rbp+var_20]"], [64, "mov rdx, [rax]"], [65, "mov rax, [rbp+var_28]"], [66, "mov rax, [rax+38h]"], [67, "mov rcx, rdx"], [68, "imul rcx, rax"], [69, "mov rax, [rbp+var_20]"], [70, "mov rdx, [rax+10h]"], [71, "mov rax, [rbp+var_28]"], [72, "mov rax, [rax+40h]"], [73, "mov rsi, [rbp+var_28]"], [74, "lea rdi, [rsi+40h]"], [75, "mov rsi, rax"], [76, "call sub_403B2B"], [77, "mov rax, [rbp+var_28]"], [78, "add rax, 40h "], [79, "mov rdi, rax"], [80, "call sub_403AFE"], [81, "mov rdx, [rbp+var_28]"], [82, "mov [rdx+20h], rax"], [83, "mov rax, [rbp+var_28]"], [84, "lea rdx, [rax+40h]"], [85, "lea rax, [rbp+var_70]"], [86, "mov rsi, rdx"], [87, "mov rdi, rax"], [88, "call sub_403BD0"], [89, "lea rax, [rbp+var_70]"], [90, "mov esi, 0"], [91, "mov rdi, rax"], [92, "call sub_403B10"], [93, "mov [rbp+var_18], 0"], [94, "jmp loc_406718"], [95, "mov rax, [rbp+var_20]"], [96, "mov rdx, [rax+10h]"], [97, "mov rax, [rbp+var_18]"], [98, "shl rax, 4"], [99, "add rax, rdx"], [100, "mov rdx, [rax+8]"], [101, "mov rax, [rax]"], [102, "mov [rbp+var_40], rax"], [103, "mov [rbp+var_38], rdx"], [104, "mov rax, [rbp+var_38]"], [105, "mov rdx, 0FFFFFFFF00000000h"], [106, "and rdx, rax"], [107, "mov rax, [rbp+var_10]"], [108, "mov eax, eax"], [109, "or rax, rdx"], [110, "mov [rbp+var_38], rax"], [111, "mov rax, [rbp+var_78]"], [112, "mov eax, [rax+0B20h]"], [113, "test eax, eax"], [114, "jz short loc_4066BF"], [115, "mov rax, [rbp+var_78]"], [116, "mov rax, [rax+40h]"], [117, "mov rcx, [rax+38h]"], [118, "mov rdx, [rbp+var_40]"], [119, "lea rax, [rbp+var_70]"], [120, "mov rsi, rdx"], [121, "mov rdi, rax"], [122, "call rcx"], [123, "mov rax, [rbp+var_78]"], [124, "mov rax, [rax+40h]"], [125, "mov rcx, [rax+38h]"], [126, "mov rdx, [rbp+var_38]"], [127, "lea rax, [rbp+var_70]"], [128, "mov rsi, rdx"], [129, "mov rdi, rax"], [130, "call rcx"], [131, "jmp short loc_406713"], [132, "mov rax, [rbp+var_40]"], [133, "mov [rbp+var_48], eax"], [134, "mov rax, [rbp+var_38]"], [135, "shr rax, 20h"], [136, "shl eax, 8"], [137, "mov edx, eax"], [138, "mov rax, [rbp+var_38]"], [139, "movzx eax, al"], [140, "add eax, edx"], [141, "mov [rbp+var_44], eax"], [142, "mov rax, [rbp+var_78]"], [143, "mov rax, [rax+40h]"], [144, "mov rcx, [rax+30h]"], [145, "mov edx, [rbp+var_48]"], [146, "lea rax, [rbp+var_70]"], [147, "mov esi, edx"], [148, "mov rdi, rax"], [149, "call rcx"], [150, "mov rax, [rbp+var_78]"], [151, "mov rax, [rax+40h]"], [152, "mov rcx, [rax+30h]"], [153, "mov edx, [rbp+var_44]"], [154, "lea rax, [rbp+var_70]"], [155, "mov esi, edx"], [156, "mov rdi, rax"], [157, "call rcx"], [158, "add [rbp+var_18], 1"], [159, "mov rdx, [rbp+var_78]"], [160, "mov eax, [rbp+var_4]"], [161, "cdqe"], [162, "shl rax, 6"], [163, "add rax, rdx"], [164, "add rax, 6D0h"], [165, "mov rax, [rax]"], [166, "cmp [rbp+var_18], rax"], [167, "jb loc_406637"], [168, "jmp short loc_40673E"], [169, "nop"], [170, "add [rbp+var_4], 1"], [171, "cmp [rbp+var_4], 0Fh"], [172, "jle loc_406582"], [173, "leave"], [174, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 6], [10, 9], [11, 6], [12, 11], [13, 6], [14, 13], [15, 6], [16, 15], [17, 6], [18, 17], [19, 6], [20, 19], [21, 6], [22, 21], [23, 6], [24, 23], [25, 6], [26, 25], [40, 3], [41, 40], [42, 41], [45, 43], [51, 49], [51, 170], [53, 51], [54, 159], [54, 53], [54, 82], [54, 54], [55, 3], [56, 55], [56, 54], [57, 56], [58, 57], [59, 82], [59, 58], [60, 59], [61, 60], [62, 61], [63, 57], [64, 82], [64, 63], [65, 60], [66, 82], [66, 65], [67, 64], [68, 66], [68, 67], [69, 57], [70, 82], [70, 69], [71, 60], [72, 82], [72, 71], [73, 60], [74, 73], [74, 82], [74, 91], [74, 129], [74, 156], [75, 72], [77, 60], [78, 77], [79, 78], [81, 60], [82, 81], [82, 80], [83, 60], [84, 81], [84, 83], [84, 82], [85, 83], [86, 84], [87, 85], [89, 88], [91, 89], [95, 57], [96, 95], [96, 82], [97, 158], [97, 93], [98, 97], [99, 96], [99, 98], [100, 82], [100, 99], [101, 99], [101, 82], [102, 101], [103, 100], [104, 103], [106, 104], [106, 105], [107, 28], [107, 30], [107, 32], [107, 34], [107, 36], [107, 38], [108, 107], [109, 106], [109, 108], [110, 109], [111, 3], [112, 111], [112, 82], [113, 112], [114, 113], [115, 3], [116, 115], [116, 82], [117, 82], [117, 116], [118, 102], [119, 116], [120, 118], [121, 119], [122, 117], [123, 3], [124, 82], [124, 123], [125, 82], [125, 124], [126, 110], [127, 124], [128, 126], [129, 127], [130, 125], [132, 102], [133, 132], [134, 110], [135, 134], [136, 135], [137, 136], [138, 110], [139, 138], [140, 137], [140, 139], [141, 140], [142, 3], [143, 142], [143, 82], [144, 143], [144, 82], [145, 133], [146, 143], [147, 145], [148, 146], [149, 144], [150, 3], [151, 82], [151, 150], [152, 151], [152, 82], [153, 141], [154, 151], [155, 153], [156, 154], [157, 152], [158, 158], [158, 93], [159, 3], [160, 49], [160, 170], [162, 160], [163, 159], [163, 162], [164, 163], [165, 82], [165, 164], [166, 165], [166, 158], [166, 93], [167, 166], [170, 49], [170, 170], [171, 49], [171, 170], [172, 171], [174, 59], [174, 6], [174, 47], [174, 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/2f5d91478cdbd733b4d2f79052ff2ac977f3977372ec6e8fe63629b020783033_2f5d91478cdbd733b4d2f79052ff2ac977f3977372ec6e8fe63629b020783033.jsonl.gz", "strip_func_name": "sub_4064BE", "query": "\n\n\nint __fastcall sub_4064BE(__int64 a1)\n{\n_QWORD *v1; // rax\n__int64 v2; // rax\n__int64 *v3; // rax\n__int64 v4; // rdx\n_QWORD v6[5]; // [rsp+10h] [rbp-70h] BYREF\nint v7; // [rsp+38h] [rbp-48h]\nunsigned int v8; // [rsp+3Ch] [rbp-44h]\n__int64 v9; // [rsp+40h] [rbp-40h]\nunsigned __int64 v10; // [rsp+48h] [rbp-38h]\n_QWORD *v11; // [rsp+58h] [rbp-28h]\n_QWORD *v12; // [rsp+60h] [rbp-20h]\nunsigned __int64 j; // [rsp+68h] [rbp-18h]\n__int64 v14; // [rsp+70h] [rbp-10h]\nint i; // [rsp+7Ch] [rbp-4h]\n\nLODWORD(v1) = *(unsigned __int16 *)(a1 + 18);\nif ( (_DWORD)v1 == 243 )\n{\nv14 = 2LL;\ngoto LABEL_19;\n}\nif ( *(unsigned __int16 *)(a1 + 18) > 0xF3u )\ngoto LABEL_18;\nif ( (_DWORD)v1 == 183 )\n{\nv14 = 257LL;\ngoto LABEL_19;\n}\nif ( *(unsigned __int16 *)(a1 + 18) > 0xB7u )\ngoto LABEL_18;\nif ( (_DWORD)v1 == 40 )\n{\nv14 = 2LL;\ngoto LABEL_19;\n}\nif ( *(unsigned __int16 *)(a1 + 18) > 0x28u )\ngoto LABEL_18;\nif ( (_DWORD)v1 == 21 )\n{\nv14 = 1LL;\ngoto LABEL_19;\n}\nif ( *(unsigned __int16 *)(a1 + 18) > 0x15u )\n{\nLABEL_18:\nLODWORD(v1) = fprintf(stderr, \"E: Unable to handle relocations for e_machine %x\\n\", *(unsigned __int16 *)(a1 + 18));\nreturn (int)v1;\n}\nif ( (_DWORD)v1 == 3 )\n{\nv14 = 1LL;\n}\nelse\n{\nif ( (_DWORD)v1 != 8 )\ngoto LABEL_18;\nv14 = 2LL;\n}\nLABEL_19:\nfor ( i = 0; i <= 15; ++i )\n{\nv12 = (_QWORD *)(((__int64)i << 6) + 1744 + a1);\nv1 = (_QWORD *)v12[3];\nv11 = v1;\nif ( v1 )\n{\nsub_403B2B(v11 + 8, v11[8], v12[2], v11[7] * *v12);\nv2 = sub_403AFE((__int64)(v11 + 8));\nv11[4] = v2;\nsub_403BD0(v6, v11 + 8);\nsub_403B10((__int64)v6, 0LL);\nfor ( j = 0LL; ; ++j )\n{\nv1 = *(_QWORD **)(a1 + ((__int64)i << 6) + 1744);\nif ( j >= (unsigned __int64)v1 )\nbreak;\nv3 = (__int64 *)(v12[2] + 16 * j);\nv4 = v3[1];\nv9 = *v3;\nv10 = v4 & 0xFFFFFFFF00000000LL | (unsigned int)v14;\nif ( *(_DWORD *)(a1 + 2848) )\n{\n(*(void (__fastcall **)(_QWORD *, __int64))(*(_QWORD *)(a1 + 64) + 56LL))(v6, v9);\n(*(void (__fastcall **)(_QWORD *, unsigned __int64))(*(_QWORD *)(a1 + 64) + 56LL))(v6, v10);\n}\nelse\n{\nv7 = v9;\nv8 = (HIDWORD(v10) << 8) + (unsigned __int8)v10;\n(*(void (__fastcall **)(_QWORD *, _QWORD))(*(_QWORD *)(a1 + 64) + 48LL))(v6, (unsigned int)v9);\n(*(void (__fastcall **)(_QWORD *, _QWORD))(*(_QWORD *)(a1 + 64) + 48LL))(v6, v8);\n}\n}\n}\n}\nreturn (int)v1;\n}\n\n\n\nQ:[a1,v6,v7,v9,v11,v12,v14,sub_4064BE,sub_403B2B,sub_403AFE,sub_403BD0,sub_403B10,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ew', 'v6': 'writer', 'v7': 'rel32', 'v9': 'rel', 'v11': 'sec', 'v12': 'rel_sec', 'v14': 'type', 'sub_4064BE': 'fixup_relocations', 'sub_403B2B': 'buffer_init_0', 'sub_403AFE': 'buffer_size_0', 'sub_403BD0': 'buffer_clone_0', 'sub_403B10': 'buffer_set_size_0'}"} |
|
mossfw_ringbuff_setdata | 20fbbc943e3294e7c061cccb8efda6c603b6ac7e09cb63ed86eac2dc4ce799df | sonydevworld | spresense | NA | bool mossfw_ringbuff_setdata(mossfw_ringbuffer_t *buff, void *blk,
bool nonblock)
{
mossfw_lock_take(&buff->lock);
if (nonblock)
{
if (buff->is_stop || mossfw_ringbuff_isfull_nolock(buff))
{
mossfw_lock_give(&buff->lock);
return false;
}
}
else
{
while (!buff->is_stop && mossfw_ringbuff_isfull_nolock(buff))
{
mossfw_condition_wait(&buff->cond, &buff->lock);
}
if (buff->is_stop)
{
mossfw_lock_give(&buff->lock);
return false;
}
}
memcpy(&((char *)buff->buffer)[buff->widx], blk,
buff->block_sz);
buff->widx = increment_idx(buff, buff->widx);
buff->is_empty = false;
mossfw_condition_notice(&buff->cond);
mossfw_lock_give(&buff->lock);
return true;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_404C57", "function_addr": 4213847, "binary_name": "20fbbc943e3294e7c061cccb8efda6c603b6ac7e09cb63ed86eac2dc4ce799df.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 eax, edx"], [6, "mov [rbp+var_14], al"], [7, "mov rax, [rbp+var_8]"], [8, "add rax, 20h "], [9, "mov rdi, rax"], [10, "call _pthread_mutex_lock"], [11, "cmp [rbp+var_14], 0"], [12, "jz short loc_404CD3"], [13, "mov rax, [rbp+var_8]"], [14, "movzx eax, byte ptr [rax+19h]"], [15, "test al, al"], [16, "jnz short loc_404C9E"], [17, "mov rax, [rbp+var_8]"], [18, "mov rdi, rax"], [19, "call sub_4049D2"], [20, "test al, al"], [21, "jz short loc_404D15"], [22, "mov rax, [rbp+var_8]"], [23, "add rax, 20h "], [24, "mov rdi, rax"], [25, "call _pthread_mutex_unlock"], [26, "mov eax, 0"], [27, "jmp locret_404D8A"], [28, "mov rax, [rbp+var_8]"], [29, "lea rdx, [rax+20h]"], [30, "mov rax, [rbp+var_8]"], [31, "add rax, 48h "], [32, "mov rsi, rdx"], [33, "mov rdi, rax"], [34, "call _pthread_cond_wait"], [35, "mov rax, [rbp+var_8]"], [36, "movzx eax, byte ptr [rax+19h]"], [37, "xor eax, 1"], [38, "test al, al"], [39, "jz short loc_404CF2"], [40, "mov rax, [rbp+var_8]"], [41, "mov rdi, rax"], [42, "call sub_4049D2"], [43, "test al, al"], [44, "jnz short loc_404CB8"], [45, "mov rax, [rbp+var_8]"], [46, "movzx eax, byte ptr [rax+19h]"], [47, "test al, al"], [48, "jz short loc_404D15"], [49, "mov rax, [rbp+var_8]"], [50, "add rax, 20h "], [51, "mov rdi, rax"], [52, "call _pthread_mutex_unlock"], [53, "mov eax, 0"], [54, "jmp short locret_404D8A"], [55, "mov rax, [rbp+var_8]"], [56, "mov eax, [rax+0Ch]"], [57, "movsxd rdx, eax"], [58, "mov rax, [rbp+var_8]"], [59, "mov rcx, [rax]"], [60, "mov rax, [rbp+var_8]"], [61, "mov eax, [rax+14h]"], [62, "cdqe"], [63, "add rcx, rax"], [64, "mov rax, [rbp+src]"], [65, "mov rsi, rax"], [66, "mov rdi, rcx"], [67, "call _memcpy"], [68, "mov rax, [rbp+var_8]"], [69, "mov edx, [rax+14h]"], [70, "mov rax, [rbp+var_8]"], [71, "mov esi, edx"], [72, "mov rdi, rax"], [73, "call sub_4047F9"], [74, "mov rdx, [rbp+var_8]"], [75, "mov [rdx+14h], eax"], [76, "mov rax, [rbp+var_8]"], [77, "mov byte ptr [rax+18h], 0"], [78, "mov rax, [rbp+var_8]"], [79, "add rax, 48h "], [80, "mov rdi, rax"], [81, "call _pthread_cond_signal"], [82, "mov rax, [rbp+var_8]"], [83, "add rax, 20h "], [84, "mov rdi, rax"], [85, "call _pthread_mutex_unlock"], [86, "mov eax, 1"], [87, "leave"], [88, "retn"]], "data_dep": [[6, 5], [7, 3], [8, 7], [9, 8], [11, 6], [12, 11], [13, 3], [14, 13], [15, 14], [16, 15], [17, 3], [18, 17], [20, 19], [21, 20], [22, 3], [23, 22], [24, 23], [28, 3], [29, 29], [29, 28], [30, 3], [31, 30], [32, 29], [33, 31], [35, 3], [36, 35], [37, 36], [38, 37], [39, 38], [40, 3], [41, 40], [43, 42], [44, 43], [45, 3], [46, 45], [47, 46], [48, 47], [49, 3], [50, 49], [51, 50], [55, 3], [56, 55], [57, 56], [58, 3], [59, 58], [60, 3], [61, 60], [63, 61], [63, 59], [64, 4], [65, 64], [66, 63], [68, 3], [69, 68], [70, 3], [71, 69], [72, 70], [74, 3], [75, 74], [75, 73], [76, 3], [77, 76], [78, 3], [79, 78], [80, 79], [82, 3], [83, 82], [84, 83], [88, 26], [88, 53], [88, 86]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/20fbbc943e3294e7c061cccb8efda6c603b6ac7e09cb63ed86eac2dc4ce799df_20fbbc943e3294e7c061cccb8efda6c603b6ac7e09cb63ed86eac2dc4ce799df.jsonl.gz", "strip_func_name": "sub_404C57", "query": "\n\n\n__int64 __fastcall sub_404C57(__int64 a1, const void *a2, char a3)\n{\npthread_mutex_lock((pthread_mutex_t *)(a1 + 32));\nif ( a3 )\n{\nif ( *(_BYTE *)(a1 + 25) || sub_4049D2(a1) )\n{\nLABEL_9:\npthread_mutex_unlock((pthread_mutex_t *)(a1 + 32));\nreturn 0LL;\n}\n}\nelse\n{\nwhile ( *(_BYTE *)(a1 + 25) != 1 && sub_4049D2(a1) )\npthread_cond_wait((pthread_cond_t *)(a1 + 72), (pthread_mutex_t *)(a1 + 32));\nif ( *(_BYTE *)(a1 + 25) )\ngoto LABEL_9;\n}\nmemcpy((void *)(*(int *)(a1 + 20) + *(_QWORD *)a1), a2, *(int *)(a1 + 12));\n*(_DWORD *)(a1 + 20) = sub_4047F9(a1, *(_DWORD *)(a1 + 20));\n*(_BYTE *)(a1 + 24) = 0;\npthread_cond_signal((pthread_cond_t *)(a1 + 72));\npthread_mutex_unlock((pthread_mutex_t *)(a1 + 32));\nreturn 1LL;\n}\n\n\n\nQ:[a3,a1,a2,sub_404C57,sub_4049D2,sub_4047F9,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'nonblock', 'a1': 'buff', 'a2': 'blk', 'sub_404C57': 'mossfw_ringbuff_setdata', 'sub_4049D2': 'mossfw_ringbuff_isfull_nolock', 'sub_4047F9': 'increment_idx'}"} |
|
p2p_listen_cb | 8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f | sonic-net | sonic-buildimage | NA | void p2p_listen_cb(struct p2p_data *p2p, unsigned int freq,
unsigned int duration)
{
if (freq == p2p->pending_client_disc_freq) {
p2p_dbg(p2p, "Client discoverability remain-awake completed");
p2p->pending_client_disc_freq = 0;
return;
}
if (freq != p2p->pending_listen_freq) {
p2p_dbg(p2p, "Unexpected listen callback for freq=%u duration=%u (pending_listen_freq=%u)",
freq, duration, p2p->pending_listen_freq);
return;
}
p2p_dbg(p2p, "Starting Listen timeout(%u,%u) on freq=%u based on callback",
p2p->pending_listen_sec, p2p->pending_listen_usec,
p2p->pending_listen_freq);
p2p->in_listen = 1;
p2p->drv_in_listen = freq;
if (p2p->pending_listen_sec || p2p->pending_listen_usec) {
/*
* Add 20 msec extra wait to avoid race condition with driver
* remain-on-channel end event, i.e., give driver more time to
* complete the operation before our timeout expires.
*/
p2p_set_timeout(p2p, p2p->pending_listen_sec,
p2p->pending_listen_usec + 20000);
}
p2p->pending_listen_freq = 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_413066", "function_addr": 4272230, "binary_name": "8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_C], esi"], [5, "mov [rbp+var_10], edx"], [6, "mov rax, [rbp+var_8]"], [7, "mov eax, [rax+63Ch]"], [8, "cmp [rbp+var_C], eax"], [9, "jnz short loc_4130B0"], [10, "mov rax, [rbp+var_8]"], [11, "mov esi, offset aClientDiscover"], [12, "mov rdi, rax"], [13, "mov eax, 0"], [14, "call sub_416984"], [15, "mov rax, [rbp+var_8]"], [16, "mov dword ptr [rax+63Ch], 0"], [17, "jmp locret_413191"], [18, "mov rax, [rbp+var_8]"], [19, "mov eax, [rax+504h]"], [20, "cmp [rbp+var_C], eax"], [21, "jz short loc_4130ED"], [22, "mov rax, [rbp+var_8]"], [23, "mov esi, [rax+504h]"], [24, "mov ecx, [rbp+var_10]"], [25, "mov edx, [rbp+var_C]"], [26, "mov rax, [rbp+var_8]"], [27, "mov r8d, esi"], [28, "mov esi, offset aUnexpectedList"], [29, "mov rdi, rax"], [30, "mov eax, 0"], [31, "call sub_416984"], [32, "jmp locret_413191"], [33, "mov rax, [rbp+var_8]"], [34, "mov esi, [rax+504h]"], [35, "mov rax, [rbp+var_8]"], [36, "mov ecx, [rax+50Ch]"], [37, "mov rax, [rbp+var_8]"], [38, "mov edx, [rax+508h]"], [39, "mov rax, [rbp+var_8]"], [40, "mov r8d, esi"], [41, "mov esi, offset aStartingListen"], [42, "mov rdi, rax"], [43, "mov eax, 0"], [44, "call sub_416984"], [45, "mov rax, [rbp+var_8]"], [46, "mov dword ptr [rax+514h], 1"], [47, "mov edx, [rbp+var_C]"], [48, "mov rax, [rbp+var_8]"], [49, "mov [rax+518h], edx"], [50, "mov rax, [rbp+var_8]"], [51, "mov eax, [rax+508h]"], [52, "test eax, eax"], [53, "jnz short loc_41315B"], [54, "mov rax, [rbp+var_8]"], [55, "mov eax, [rax+50Ch]"], [56, "test eax, eax"], [57, "jz short loc_413183"], [58, "mov rax, [rbp+var_8]"], [59, "mov eax, [rax+50Ch]"], [60, "lea edx, [rax+4E20h]"], [61, "mov rax, [rbp+var_8]"], [62, "mov ecx, [rax+508h]"], [63, "mov rax, [rbp+var_8]"], [64, "mov esi, ecx"], [65, "mov rdi, rax"], [66, "call sub_409409"], [67, "mov rax, [rbp+var_8]"], [68, "mov dword ptr [rax+504h], 0"], [69, "leave"], [70, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 4], [8, 7], [9, 8], [10, 3], [12, 10], [15, 3], [16, 15], [18, 3], [19, 18], [20, 4], [20, 19], [21, 20], [22, 3], [23, 22], [24, 5], [25, 4], [26, 3], [27, 23], [29, 26], [33, 3], [34, 33], [35, 3], [36, 35], [37, 3], [38, 37], [39, 3], [40, 34], [42, 39], [45, 3], [46, 45], [47, 4], [48, 3], [49, 47], [49, 48], [50, 3], [51, 50], [51, 49], [52, 51], [53, 52], [54, 3], [55, 46], [55, 49], [55, 54], [56, 55], [57, 56], [58, 3], [59, 58], [59, 49], [59, 46], [60, 47], [60, 59], [60, 46], [60, 49], [61, 3], [62, 46], [62, 49], [62, 61], [63, 3], [64, 62], [65, 63], [67, 3], [68, 67], [70, 67], [70, 15], [70, 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/8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f_8e715adb9ba3e9187e141fcb1945d7d2ab8cdc276438b98d7e6c47e8040ec29f.jsonl.gz", "strip_func_name": "sub_413066", "query": "\n\n\n__int64 __fastcall sub_413066(_DWORD *a1, int a2, int a3, int a4, int a5, int a6)\n{\n__int64 result; // rax\n\nif ( a2 == a1[399] )\n{\nsub_416984((_DWORD)a1, (unsigned int)\"Client discoverability remain-awake completed\", a3, a4, a5, a6);\nresult = (__int64)a1;\na1[399] = 0;\n}\nelse if ( a2 == a1[321] )\n{\nsub_416984(\n(_DWORD)a1,\n(unsigned int)\"Starting Listen timeout(%u,%u) on freq=%u based on callback\",\na1[322],\na1[323],\na1[321],\na6);\na1[325] = 1;\na1[326] = a2;\nif ( a1[322] || a1[323] )\nsub_409409((__int64)a1, a1[322], a1[323] + 20000);\nresult = (__int64)a1;\na1[321] = 0;\n}\nelse\n{\nresult = sub_416984(\n(_DWORD)a1,\n(unsigned int)\"Unexpected listen callback for freq=%u duration=%u (pending_listen_freq=%u)\",\na2,\na3,\na1[321],\na6);\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_413066,sub_416984,sub_409409,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'duration', 'a1': 'p2p', 'a2': 'freq', 'sub_413066': 'p2p_listen_cb', 'sub_416984': 'p2p_dbg', 'sub_409409': 'p2p_set_timeout'}"} |
|
duk_util_tinyrandom_get_double | 3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea | creationix | dukluv | NA | DUK_INTERNAL duk_double_t duk_util_tinyrandom_get_double(duk_hthread *thr) {
duk_double_t t;
duk_small_int_t n;
duk_uint32_t rnd;
/*
* XXX: could make this a lot faster if we create the double memory
* representation directly. Feasible easily (must be uniform random).
*/
rnd = thr->heap->rnd_state;
n = 53; /* enough to cover the whole mantissa */
t = 0.0;
do {
DUK__UPDATE_RND(rnd);
t += DUK__RND_BIT(rnd);
t /= 2.0;
} while (--n);
thr->heap->rnd_state = rnd;
DUK_ASSERT(t >= (duk_double_t) 0.0);
DUK_ASSERT(t < (duk_double_t) 1.0);
return t;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4917D9", "function_addr": 4790233, "binary_name": "3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rax, [rbp+var_18]"], [5, "mov rax, [rax+48h]"], [6, "mov eax, [rax+0BCh]"], [7, "mov [rbp+var_10], eax"], [8, "mov [rbp+var_C], 35h "], [9, "pxor xmm0, xmm0"], [10, "movsd [rbp+var_8], xmm0"], [11, "mov eax, [rbp+var_10]"], [12, "imul eax, eax"], [13, "or eax, 5"], [14, "add [rbp+var_10], eax"], [15, "mov eax, [rbp+var_10]"], [16, "shr eax, 1Fh"], [17, "mov eax, eax"], [18, "test rax, rax"], [19, "js short loc_49182A"], [20, "pxor xmm0, xmm0"], [21, "cvtsi2sd xmm0, rax"], [22, "jmp short loc_491843"], [23, "mov rdx, rax"], [24, "shr rdx, 1"], [25, "and eax, 1"], [26, "or rdx, rax"], [27, "pxor xmm0, xmm0"], [28, "cvtsi2sd xmm0, rdx"], [29, "addsd xmm0, xmm0"], [30, "movsd xmm1, [rbp+var_8]"], [31, "addsd xmm0, xmm1"], [32, "movsd [rbp+var_8], xmm0"], [33, "movsd xmm0, [rbp+var_8]"], [34, "movsd xmm1, cs:qword_53BA20"], [35, "divsd xmm0, xmm1"], [36, "movsd [rbp+var_8], xmm0"], [37, "sub [rbp+var_C], 1"], [38, "cmp [rbp+var_C], 0"], [39, "jnz short loc_491806"], [40, "mov rax, [rbp+var_18]"], [41, "mov rax, [rax+48h]"], [42, "mov edx, [rbp+var_10]"], [43, "mov [rax+0BCh], edx"], [44, "movsd xmm0, [rbp+var_8]"], [45, "pxor xmm1, xmm1"], [46, "comisd xmm0, xmm1"], [47, "setnb al"], [48, "xor eax, 1"], [49, "test al, al"], [50, "jz short loc_4918A8"], [51, "mov esi, offset aAssertionFaile_6961"], [52, "mov edi, 36h "], [53, "call sub_402AA8"], [54, "movsd xmm0, cs:qword_53B988"], [55, "comisd xmm0, [rbp+var_8]"], [56, "setnbe al"], [57, "xor eax, 1"], [58, "test al, al"], [59, "jz short loc_4918CE"], [60, "mov esi, offset aAssertionFaile_6962"], [61, "mov edi, 36h "], [62, "call sub_402AA8"], [63, "movsd xmm0, [rbp+var_8]"], [64, "movq rax, xmm0"], [65, "movq xmm0, rax"], [66, "leave"], [67, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [10, 9], [11, 14], [11, 7], [12, 11], [13, 12], [14, 7], [14, 13], [14, 14], [15, 14], [16, 15], [17, 16], [18, 17], [19, 18], [21, 18], [21, 20], [23, 18], [24, 23], [25, 18], [26, 24], [26, 25], [28, 27], [28, 26], [29, 28], [30, 36], [30, 10], [31, 29], [31, 21], [31, 30], [32, 31], [33, 32], [35, 33], [35, 34], [36, 35], [37, 8], [37, 37], [38, 37], [39, 38], [40, 3], [41, 40], [42, 14], [43, 42], [43, 41], [44, 36], [46, 45], [46, 44], [47, 38], [47, 41], [48, 47], [49, 48], [50, 49], [55, 36], [55, 54], [56, 49], [57, 56], [58, 57], [59, 58], [63, 36], [64, 63], [65, 64], [67, 64]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea_3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea.jsonl.gz", "strip_func_name": "sub_4917D9", "query": "\n\n\ndouble __fastcall sub_4917D9(__int64 a1)\n{\nunsigned int v2; // [rsp+10h] [rbp-10h]\nint v3; // [rsp+14h] [rbp-Ch]\ndouble v4; // [rsp+18h] [rbp-8h]\n\nv2 = *(_DWORD *)(*(_QWORD *)(a1 + 72) + 188LL);\nv3 = 53;\nv4 = 0.0;\ndo\n{\nv2 += (v2 * v2) | 5;\nv4 = ((double)(v2 >> 31) + v4) / 2.0;\n--v3;\n}\nwhile ( v3 );\n*(_DWORD *)(*(_QWORD *)(a1 + 72) + 188LL) = v2;\nif ( v4 < 0.0 )\nsub_402AA8(54, \"assertion failed: t >= (duk_double_t) 0.0 (duk_util_tinyrandom.c:59)\");\nif ( v4 >= 1.0 )\nsub_402AA8(54, \"assertion failed: t < (duk_double_t) 1.0 (duk_util_tinyrandom.c:60)\");\nreturn v4;\n}\n\n\n\nQ:[a1,v2,v3,v4,sub_4917D9,sub_402AA8,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'thr', 'v2': 'rnd', 'v3': 'n', 'v4': 't', 'sub_4917D9': 'duk_util_tinyrandom_get_double', 'sub_402AA8': 'duk_default_panic_handler'}"} |
|
sqlite3BtreeUpdateMeta | 8efe7c3c3820e4b225da8754cc0c08714f5d3c9833a642e99478b7133b71820a | diegomacario | Poor-Fox | NA | SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree *p, int idx, u32 iMeta){
BtShared *pBt = p->pBt;
unsigned char *pP1;
int rc;
assert( idx>=1 && idx<=15 );
sqlite3BtreeEnter(p);
assert( p->inTrans==TRANS_WRITE );
assert( pBt->pPage1!=0 );
pP1 = pBt->pPage1->aData;
rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
if( rc==SQLITE_OK ){
put4byte(&pP1[36 + idx*4], iMeta);
#ifndef SQLITE_OMIT_AUTOVACUUM
if( idx==BTREE_INCR_VACUUM ){
assert( pBt->autoVacuum || iMeta==0 );
assert( iMeta==0 || iMeta==1 );
pBt->incrVacuum = (u8)iMeta;
}
#endif
}
sqlite3BtreeLeave(p);
return rc;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42C455", "function_addr": 4375637, "binary_name": "8efe7c3c3820e4b225da8754cc0c08714f5d3c9833a642e99478b7133b71820a.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_2C], esi"], [5, "mov [rbp+var_30], edx"], [6, "mov rax, [rbp+var_28]"], [7, "mov rax, [rax+8]"], [8, "mov [rbp+var_8], rax"], [9, "mov rax, [rbp+var_28]"], [10, "mov rdi, rax"], [11, "call sub_41F625"], [12, "mov rax, [rbp+var_8]"], [13, "mov rax, [rax+18h]"], [14, "mov rax, [rax+50h]"], [15, "mov [rbp+var_10], rax"], [16, "mov rax, [rbp+var_8]"], [17, "mov rax, [rax+18h]"], [18, "mov rax, [rax+70h]"], [19, "mov rdi, rax"], [20, "call sub_41A522"], [21, "mov [rbp+var_14], eax"], [22, "cmp [rbp+var_14], 0"], [23, "jnz short loc_42C4DE"], [24, "mov eax, [rbp+var_2C]"], [25, "add eax, 9"], [26, "shl eax, 2"], [27, "movsxd rdx, eax"], [28, "mov rax, [rbp+var_10]"], [29, "add rdx, rax"], [30, "mov eax, [rbp+var_30]"], [31, "mov esi, eax"], [32, "mov rdi, rdx"], [33, "call sub_40C751"], [34, "cmp [rbp+var_2C], 7"], [35, "jnz short loc_42C4DE"], [36, "mov eax, [rbp+var_30]"], [37, "mov edx, eax"], [38, "mov rax, [rbp+var_8]"], [39, "mov [rax+22h], dl"], [40, "mov rax, [rbp+var_28]"], [41, "mov rdi, rax"], [42, "call sub_41F72E"], [43, "mov eax, [rbp+var_14]"], [44, "leave"], [45, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 3], [10, 9], [12, 8], [13, 12], [14, 13], [15, 14], [16, 8], [17, 16], [18, 17], [19, 18], [21, 20], [22, 21], [23, 22], [24, 4], [25, 24], [26, 25], [27, 26], [28, 15], [29, 28], [29, 27], [30, 5], [31, 30], [32, 29], [34, 4], [35, 34], [36, 5], [37, 36], [38, 8], [39, 38], [39, 37], [40, 3], [41, 40], [43, 21], [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/8efe7c3c3820e4b225da8754cc0c08714f5d3c9833a642e99478b7133b71820a_8efe7c3c3820e4b225da8754cc0c08714f5d3c9833a642e99478b7133b71820a.jsonl.gz", "strip_func_name": "sub_42C455", "query": "\n\n\n__int64 __fastcall sub_42C455(__int64 a1, int a2, unsigned int a3)\n{\nunsigned int v5; // [rsp+1Ch] [rbp-14h]\n__int64 v6; // [rsp+20h] [rbp-10h]\n__int64 v7; // [rsp+28h] [rbp-8h]\n\nv7 = *(_QWORD *)(a1 + 8);\nsub_41F625(a1);\nv6 = *(_QWORD *)(*(_QWORD *)(v7 + 24) + 80LL);\nv5 = sub_41A522(*(_QWORD *)(*(_QWORD *)(v7 + 24) + 112LL));\nif ( !v5 )\n{\nsub_40C751((_DWORD *)(v6 + 4 * (a2 + 9)), a3);\nif ( a2 == 7 )\n*(_BYTE *)(v7 + 34) = a3;\n}\nsub_41F72E(a1);\nreturn v5;\n}\n\n\n\nQ:[a3,a1,a2,v5,v6,v7,sub_42C455,sub_41F625,sub_41A522,sub_40C751,sub_41F72E,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'iMeta', 'a1': 'p', 'a2': 'idx', 'v5': 'rc', 'v6': 'pP1', 'v7': 'pBt', 'sub_42C455': 'sqlite3BtreeUpdateMeta', 'sub_41F625': 'sqlite3BtreeEnter', 'sub_41A522': 'sqlite3PagerWrite', 'sub_40C751': 'sqlite3Put4byte', 'sub_41F72E': 'sqlite3BtreeLeave'}"} |
|
call_setter | 5221d4ac5c6be3ca70ca9c6f05f545a1bdebfe8115ffd22ebc92b53971dadcff | sunnyxx | quickjs-debug | NA | static int call_setter(JSContext *ctx, JSObject *setter,
JSValueConst this_obj, JSValue val, int flags)
{
JSValue ret, func;
if (likely(setter)) {
func = JS_MKPTR(JS_TAG_OBJECT, setter);
/* Note: the field could be removed in the setter */
func = JS_DupValue(ctx, func);
ret = JS_CallFree(ctx, func, this_obj, 1, (JSValueConst *)&val);
JS_FreeValue(ctx, val);
if (JS_IsException(ret))
return -1;
JS_FreeValue(ctx, ret);
} else {
JS_FreeValue(ctx, val);
if ((flags & JS_PROP_THROW) ||
((flags & JS_PROP_THROW_STRICT) && is_strict_mode(ctx))) {
JS_ThrowTypeError(ctx, "no setter for property");
return -1;
}
/* XXX: should return FALSE? */
}
return TRUE;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4143D1", "function_addr": 4277201, "binary_name": "5221d4ac5c6be3ca70ca9c6f05f545a1bdebfe8115ffd22ebc92b53971dadcff.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 58h"], [4, "mov [rbp+var_38], rdi"], [5, "mov [rbp+var_40], rsi"], [6, "mov [rbp+var_50], rdx"], [7, "mov [rbp+var_48], rcx"], [8, "mov [rbp+var_60], r8"], [9, "mov [rbp+var_58], r9"], [10, "cmp [rbp+var_40], 0"], [11, "setnz al"], [12, "movzx eax, al"], [13, "test rax, rax"], [14, "jz loc_4144BA"], [15, "mov rax, [rbp+var_40]"], [16, "mov [rbp+var_30], rax"], [17, "mov [rbp+var_28], 0FFFFFFFFFFFFFFFFh"], [18, "mov rcx, [rbp+var_30]"], [19, "mov rdx, [rbp+var_28]"], [20, "mov rax, [rbp+var_38]"], [21, "mov rsi, rcx"], [22, "mov rdi, rax"], [23, "call sub_403EA7"], [24, "mov [rbp+var_30], rax"], [25, "mov [rbp+var_28], rdx"], [26, "mov rcx, [rbp+var_50]"], [27, "mov r8, [rbp+var_48]"], [28, "mov rsi, [rbp+var_30]"], [29, "mov rdx, [rbp+var_28]"], [30, "mov rax, [rbp+var_38]"], [31, "sub rsp, 8"], [32, "lea rdi, [rbp+var_60]"], [33, "push rdi"], [34, "mov r9d, 1"], [35, "mov rdi, rax"], [36, "call sub_42DF56"], [37, "add rsp, 10h"], [38, "mov [rbp+var_20], rax"], [39, "mov [rbp+var_18], rdx"], [40, "mov rcx, [rbp+var_60]"], [41, "mov rdx, [rbp+var_58]"], [42, "mov rax, [rbp+var_38]"], [43, "mov rsi, rcx"], [44, "mov rdi, rax"], [45, "call sub_403DDF"], [46, "mov rdx, [rbp+var_20]"], [47, "mov rax, [rbp+var_18]"], [48, "mov rdi, rdx"], [49, "mov rsi, rax"], [50, "call sub_403D2B"], [51, "test eax, eax"], [52, "jz short loc_4144A1"], [53, "mov eax, 0FFFFFFFFh"], [54, "jmp short loc_41451B"], [55, "mov rcx, [rbp+var_20]"], [56, "mov rdx, [rbp+var_18]"], [57, "mov rax, [rbp+var_38]"], [58, "mov rsi, rcx"], [59, "mov rdi, rax"], [60, "call sub_403DDF"], [61, "jmp short loc_414516"], [62, "mov rcx, [rbp+var_60]"], [63, "mov rdx, [rbp+var_58]"], [64, "mov rax, [rbp+var_38]"], [65, "mov rsi, rcx"], [66, "mov rdi, rax"], [67, "call sub_403DDF"], [68, "mov eax, [rbp+arg_0]"], [69, "and eax, 4000h"], [70, "test eax, eax"], [71, "jnz short loc_4144F9"], [72, "mov eax, [rbp+arg_0]"], [73, "and eax, 8000h"], [74, "test eax, eax"], [75, "jz short loc_414516"], [76, "mov rax, [rbp+var_38]"], [77, "mov rdi, rax"], [78, "call sub_4058DA"], [79, "test eax, eax"], [80, "jz short loc_414516"], [81, "mov rax, [rbp+var_38]"], [82, "mov esi, offset aNoSetterForPro"], [83, "mov rdi, rax"], [84, "mov eax, 0"], [85, "call sub_410718"], [86, "mov eax, 0FFFFFFFFh"], [87, "jmp short loc_41451B"], [88, "mov eax, 1"], [89, "mov rbx, [rbp+var_8]"], [90, "leave"], [91, "retn"]], "data_dep": [[10, 5], [11, 10], [12, 11], [13, 12], [14, 13], [15, 5], [16, 15], [18, 16], [19, 17], [20, 4], [21, 18], [22, 20], [24, 23], [25, 19], [26, 6], [27, 7], [28, 24], [29, 25], [30, 4], [31, 3], [32, 8], [32, 22], [33, 32], [35, 30], [37, 31], [38, 36], [39, 29], [40, 8], [41, 9], [42, 4], [43, 40], [44, 42], [46, 38], [47, 39], [48, 46], [49, 47], [51, 50], [52, 51], [55, 38], [56, 39], [57, 4], [58, 55], [59, 57], [62, 8], [63, 9], [64, 4], [65, 62], [66, 64], [69, 68], [70, 69], [71, 70], [73, 72], [74, 73], [75, 74], [76, 4], [77, 76], [79, 78], [80, 79], [81, 4], [83, 81], [91, 86], [91, 88], [91, 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/5221d4ac5c6be3ca70ca9c6f05f545a1bdebfe8115ffd22ebc92b53971dadcff_5221d4ac5c6be3ca70ca9c6f05f545a1bdebfe8115ffd22ebc92b53971dadcff.jsonl.gz", "strip_func_name": "sub_4143D1", "query": "\n\n\n__int64 __fastcall sub_4143D1(__int64 *a1, _DWORD *a2, __int64 a3, __int64 a4, _DWORD *a5, __int64 a6, __int16 a7)\n{\n__int64 v7; // rdx\n__int64 v8; // rdx\n__int64 v10; // rdx\n__int64 v11; // rcx\n__int64 v12; // r8\n__int64 v13; // r9\n_DWORD *v14; // [rsp+0h] [rbp-60h] BYREF\n__int64 v15; // [rsp+8h] [rbp-58h]\n__int64 v16; // [rsp+10h] [rbp-50h]\n__int64 v17; // [rsp+18h] [rbp-48h]\n_DWORD *v18; // [rsp+20h] [rbp-40h]\n__int64 *v19; // [rsp+28h] [rbp-38h]\n_DWORD *v20; // [rsp+30h] [rbp-30h]\n__int64 v21; // [rsp+38h] [rbp-28h]\n_DWORD *v22; // [rsp+40h] [rbp-20h]\n__int64 v23; // [rsp+48h] [rbp-18h]\n\nv19 = a1;\nv18 = a2;\nv16 = a3;\nv17 = a4;\nv14 = a5;\nv15 = a6;\nif ( a2 )\n{\nv20 = sub_403EA7((__int64)v19, v18, 0xFFFFFFFF);\nv21 = v7;\nv22 = (_DWORD *)sub_42DF56((_DWORD)v19, (_DWORD)v20, v7, v16, v17, 1, (__int64)&v14);\nv23 = v8;\nsub_403DDF((__int64)v19, v14, v15);\nif ( sub_403D2B((__int64)v22, v23) )\nreturn 0xFFFFFFFFLL;\nsub_403DDF((__int64)v19, v22, v23);\n}\nelse\n{\nsub_403DDF((__int64)v19, v14, v15);\nif ( (a7 & 0x4000) != 0 || (a7 & 0x8000) != 0 && sub_4058DA((__int64)v19) )\n{\nsub_410718(v19, \"no setter for property\", v10, v11, v12, v13, v14, v15, v16, v17);\nreturn 0xFFFFFFFFLL;\n}\n}\nreturn 1LL;\n}\n\n\n\nQ:[a3,a1,a2,a5,a7,v10,v12,v14,v16,v18,v19,v20,sub_4143D1,sub_403EA7,sub_42DF56,sub_403DDF,sub_403D2B,sub_4058DA,sub_410718,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'this_obj', 'a1': 'ctx', 'a2': 'setter', 'a5': 'val', 'a7': 'flags', 'v10': 'this_obj', 'v12': 'val', 'v14': 'vala', 'v16': 'this_obja', 'v18': 'settera', 'v19': 'ctxa', 'v20': 'func', 'sub_4143D1': 'call_setter', 'sub_403EA7': 'JS_DupValue', 'sub_42DF56': 'JS_CallFree', 'sub_403DDF': 'JS_FreeValue', 'sub_403D2B': 'JS_IsException', 'sub_4058DA': 'is_strict_mode', 'sub_410718': 'JS_ThrowTypeError'}"} |
|
yaffs_UnpackTags2 | a21f9c667697b96c7d2e104f7d6dfaa888408e392d16c1de16759311aaa41ae6 | samdmarshall | Onlive-Source-Backup | NA | void yaffs_UnpackTags2(yaffs_ExtendedTags *t, yaffs_PackedTags2 *pt)
{
yaffs_ECCResult eccResult = YAFFS_ECC_RESULT_NO_ERROR;
if (pt->t.sequenceNumber != 0xFFFFFFFF) {
/* Page is in use */
#ifndef YAFFS_IGNORE_TAGS_ECC
{
yaffs_ECCOther ecc;
int result;
yaffs_ECCCalculateOther((unsigned char *)&pt->t,
sizeof
(yaffs_PackedTags2TagsPart),
&ecc);
result =
yaffs_ECCCorrectOther((unsigned char *)&pt->t,
sizeof
(yaffs_PackedTags2TagsPart),
&pt->ecc, &ecc);
switch (result) {
case 0:
eccResult = YAFFS_ECC_RESULT_NO_ERROR;
break;
case 1:
eccResult = YAFFS_ECC_RESULT_FIXED;
break;
case -1:
eccResult = YAFFS_ECC_RESULT_UNFIXED;
break;
default:
eccResult = YAFFS_ECC_RESULT_UNKNOWN;
}
}
#endif
}
yaffs_UnpackTags2TagsPart(t, &pt->t);
t->eccResult = eccResult;
yaffs_DumpPackedTags2(pt);
yaffs_DumpTags2(t);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403C0B", "function_addr": 4209675, "binary_name": "a21f9c667697b96c7d2e104f7d6dfaa888408e392d16c1de16759311aaa41ae6.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], 1"], [6, "mov rax, [rbp+var_30]"], [7, "mov eax, [rax]"], [8, "cmp eax, 0FFFFFFFFh"], [9, "jz short loc_403CA2"], [10, "mov rax, [rbp+var_30]"], [11, "lea rdx, [rbp+var_14]"], [12, "mov esi, 10h"], [13, "mov rdi, rax"], [14, "call sub_4016C3"], [15, "mov rax, [rbp+var_30]"], [16, "lea rsi, [rax+10h]"], [17, "mov rax, [rbp+var_30]"], [18, "lea rdx, [rbp+var_14]"], [19, "mov rcx, rdx"], [20, "mov rdx, rsi"], [21, "mov esi, 10h"], [22, "mov rdi, rax"], [23, "call sub_401760"], [24, "mov [rbp+var_8], eax"], [25, "cmp [rbp+var_8], 1"], [26, "jz short loc_403C89"], [27, "cmp [rbp+var_8], 1"], [28, "jg short loc_403C9B"], [29, "cmp [rbp+var_8], 0FFFFFFFFh"], [30, "jz short loc_403C92"], [31, "cmp [rbp+var_8], 0"], [32, "jnz short loc_403C9B"], [33, "mov [rbp+var_4], 1"], [34, "jmp short loc_403CA2"], [35, "mov [rbp+var_4], 2"], [36, "jmp short loc_403CA2"], [37, "mov [rbp+var_4], 3"], [38, "jmp short loc_403CA2"], [39, "mov [rbp+var_4], 0"], [40, "mov rdx, [rbp+var_30]"], [41, "mov rax, [rbp+var_28]"], [42, "mov rsi, rdx"], [43, "mov rdi, rax"], [44, "call sub_403A9F"], [45, "mov rax, [rbp+var_28]"], [46, "mov edx, [rbp+var_4]"], [47, "mov [rax+14h], edx"], [48, "mov rax, [rbp+var_30]"], [49, "mov rdi, rax"], [50, "call sub_40387C"], [51, "mov rax, [rbp+var_28]"], [52, "mov rdi, rax"], [53, "call sub_403897"], [54, "nop"], [55, "leave"], [56, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 7], [9, 8], [10, 4], [13, 10], [15, 4], [16, 12], [16, 15], [17, 4], [18, 11], [19, 18], [20, 16], [22, 17], [24, 23], [25, 24], [26, 25], [27, 24], [28, 27], [29, 24], [30, 29], [31, 24], [32, 31], [40, 4], [41, 3], [42, 40], [43, 41], [45, 3], [46, 33], [46, 39], [46, 5], [46, 35], [46, 37], [47, 46], [47, 45], [48, 4], [49, 48], [51, 3], [52, 51], [56, 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/a21f9c667697b96c7d2e104f7d6dfaa888408e392d16c1de16759311aaa41ae6_a21f9c667697b96c7d2e104f7d6dfaa888408e392d16c1de16759311aaa41ae6.jsonl.gz", "strip_func_name": "sub_403C0B", "query": "\n\n\nint __fastcall sub_403C0B(unsigned int *a1, unsigned __int8 *a2)\n{\nchar v3[12]; // [rsp+1Ch] [rbp-14h] BYREF\nint v4; // [rsp+28h] [rbp-8h]\nunsigned int v5; // [rsp+2Ch] [rbp-4h]\n\nv5 = 1;\nif ( *(_DWORD *)a2 != -1 )\n{\nsub_4016C3(a2, 0x10u, (__int64)v3);\nv4 = sub_401760((__int64)a2, 0x10u, (__int64)(a2 + 16), (__int64)v3);\nif ( v4 == 1 )\n{\nv5 = 2;\n}\nelse\n{\nif ( v4 > 1 )\ngoto LABEL_9;\nif ( v4 == -1 )\n{\nv5 = 3;\ngoto LABEL_10;\n}\nif ( v4 )\n{\nLABEL_9:\nv5 = 0;\ngoto LABEL_10;\n}\nv5 = 1;\n}\n}\nLABEL_10:\nsub_403A9F(a1, (unsigned int *)a2);\na1[5] = v5;\nsub_40387C((unsigned int *)a2);\nreturn sub_403897(a1);\n}\n\n\n\nQ:[a1,a2,v3,v4,v5,sub_403C0B,sub_4016C3,sub_401760,sub_403A9F,sub_40387C,sub_403897,]\nAssistant: ", "hints": "[]", "response": "{'a1': 't', 'a2': 'pt', 'v3': 'ecc', 'v4': 'result', 'v5': 'eccResult', 'sub_403C0B': 'yaffs_UnpackTags2', 'sub_4016C3': 'yaffs_ECCCalculateOther', 'sub_401760': 'yaffs_ECCCorrectOther', 'sub_403A9F': 'yaffs_UnpackTags2TagsPart', 'sub_40387C': 'yaffs_DumpPackedTags2', 'sub_403897': 'yaffs_DumpTags2'}"} |
|
sym_set_tristate_value | a4fa3fc9103c24be86b146316cf7ed9fb93db067af0251e503388696c8da6e2f | marmolak | gray486linux | NA | bool sym_set_tristate_value(struct symbol *sym, tristate val)
{
tristate oldval = sym_get_tristate_value(sym);
if (oldval != val && !sym_tristate_within_range(sym, val))
return false;
if (!(sym->flags & SYMBOL_DEF_USER)) {
sym->flags |= SYMBOL_DEF_USER;
sym_set_changed(sym);
}
/*
* setting a choice value also resets the new flag of the choice
* symbol and all other choice values.
*/
if (sym_is_choice_value(sym) && val == yes) {
struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
struct property *prop;
struct expr *e;
cs->def[S_DEF_USER].val = sym;
cs->flags |= SYMBOL_DEF_USER;
prop = sym_get_choice_prop(cs);
for (e = prop->expr; e; e = e->left.expr) {
if (e->right.sym->visible != no)
e->right.sym->flags |= SYMBOL_DEF_USER;
}
}
sym->def[S_DEF_USER].tri = val;
if (oldval != val)
sym_clear_all_valid();
return true;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_413EEE", "function_addr": 4275950, "binary_name": "a4fa3fc9103c24be86b146316cf7ed9fb93db067af0251e503388696c8da6e2f.elf_extract.pkl\n"}, "code": [[0, "sub rsp, 38h"], [1, "mov [rsp+38h+var_30], rdi"], [2, "mov [rsp+38h+var_34], esi"], [3, "mov rax, [rsp+38h+var_30]"], [4, "mov rdi, rax"], [5, "call sub_412D73"], [6, "mov [rsp+38h+var_14], eax"], [7, "mov eax, [rsp+38h+var_14]"], [8, "cmp eax, [rsp+38h+var_34]"], [9, "jz short loc_413F3A"], [10, "mov edx, [rsp+38h+var_34]"], [11, "mov rax, [rsp+38h+var_30]"], [12, "mov esi, edx"], [13, "mov rdi, rax"], [14, "call sub_413E14"], [15, "xor eax, 1"], [16, "test al, al"], [17, "jz short loc_413F3A"], [18, "mov eax, 0"], [19, "jmp loc_414054"], [20, "mov rax, [rsp+38h+var_30]"], [21, "mov eax, [rax+6Ch]"], [22, "and eax, 10000h"], [23, "test eax, eax"], [24, "jnz short loc_413F6F"], [25, "mov rax, [rsp+38h+var_30]"], [26, "mov eax, [rax+6Ch]"], [27, "or eax, 10000h"], [28, "mov edx, eax"], [29, "mov rax, [rsp+38h+var_30]"], [30, "mov [rax+6Ch], edx"], [31, "mov rax, [rsp+38h+var_30]"], [32, "mov rdi, rax"], [33, "call sub_41311F"], [34, "mov rax, [rsp+38h+var_30]"], [35, "mov rdi, rax"], [36, "call sub_412D9A"], [37, "test al, al"], [38, "jz loc_414034"], [39, "cmp [rsp+38h+var_34], 2"], [40, "jnz loc_414034"], [41, "mov rax, [rsp+38h+var_30]"], [42, "mov rdi, rax"], [43, "call sub_412E6A"], [44, "mov rdi, rax"], [45, "call sub_415D20"], [46, "mov [rsp+38h+var_20], rax"], [47, "mov rax, [rsp+38h+var_20]"], [48, "mov rdx, [rsp+38h+var_30]"], [49, "mov [rax+28h], rdx"], [50, "mov rax, [rsp+38h+var_20]"], [51, "mov eax, [rax+6Ch]"], [52, "or eax, 10000h"], [53, "mov edx, eax"], [54, "mov rax, [rsp+38h+var_20]"], [55, "mov [rax+6Ch], edx"], [56, "mov rax, [rsp+38h+var_20]"], [57, "mov rdi, rax"], [58, "call sub_412E6A"], [59, "mov [rsp+38h+var_28], rax"], [60, "mov rax, [rsp+38h+var_28]"], [61, "mov rax, [rax+28h]"], [62, "mov [rsp+38h+var_10], rax"], [63, "jmp short loc_41402C"], [64, "mov rax, [rsp+38h+var_10]"], [65, "mov rax, [rax+10h]"], [66, "mov eax, [rax+68h]"], [67, "test eax, eax"], [68, "jz short loc_41401E"], [69, "mov rax, [rsp+38h+var_10]"], [70, "mov rax, [rax+10h]"], [71, "mov edx, [rax+6Ch]"], [72, "mov rax, [rsp+38h+var_10]"], [73, "mov rax, [rax+10h]"], [74, "or edx, 10000h"], [75, "mov [rax+6Ch], edx"], [76, "mov rax, [rsp+38h+var_10]"], [77, "mov rax, [rax+8]"], [78, "mov [rsp+38h+var_10], rax"], [79, "cmp [rsp+38h+var_10], 0"], [80, "jnz short loc_413FF0"], [81, "mov rax, [rsp+38h+var_30]"], [82, "mov edx, [rsp+38h+var_34]"], [83, "mov [rax+30h], edx"], [84, "mov eax, [rsp+38h+var_14]"], [85, "cmp eax, [rsp+38h+var_34]"], [86, "jz short loc_41404F"], [87, "call sub_413D9A"], [88, "mov eax, 1"], [89, "add rsp, 38h"], [90, "retn"]], "data_dep": [[3, 1], [4, 3], [6, 5], [7, 6], [8, 2], [8, 7], [9, 8], [10, 2], [11, 1], [12, 10], [13, 11], [15, 14], [16, 15], [17, 16], [20, 1], [21, 20], [22, 21], [23, 22], [24, 23], [25, 1], [26, 25], [27, 26], [28, 27], [29, 1], [30, 29], [30, 28], [31, 1], [32, 31], [34, 1], [35, 34], [37, 36], [38, 37], [39, 2], [40, 39], [41, 1], [42, 41], [44, 43], [46, 45], [47, 46], [48, 1], [49, 48], [49, 47], [50, 46], [51, 50], [51, 49], [51, 30], [52, 51], [53, 52], [54, 46], [55, 54], [55, 53], [56, 46], [57, 56], [59, 58], [60, 59], [61, 49], [61, 60], [61, 55], [62, 61], [64, 78], [64, 62], [65, 49], [65, 30], [65, 55], [65, 64], [65, 75], [66, 55], [66, 75], [66, 49], [66, 65], [66, 30], [67, 66], [68, 67], [69, 78], [69, 62], [70, 55], [70, 75], [70, 49], [70, 30], [70, 69], [71, 49], [71, 30], [71, 55], [71, 75], [71, 70], [72, 62], [72, 78], [73, 30], [73, 55], [73, 75], [73, 72], [73, 49], [74, 71], [75, 74], [75, 73], [76, 78], [76, 62], [77, 55], [77, 76], [77, 30], [77, 75], [77, 49], [78, 77], [79, 78], [79, 62], [80, 79], [81, 1], [82, 2], [83, 82], [83, 81], [84, 6], [85, 2], [85, 84], [86, 85], [89, 0], [90, 88], [90, 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/a4fa3fc9103c24be86b146316cf7ed9fb93db067af0251e503388696c8da6e2f_a4fa3fc9103c24be86b146316cf7ed9fb93db067af0251e503388696c8da6e2f.jsonl.gz", "strip_func_name": "sub_413EEE", "query": "\n\n\n__int64 __fastcall sub_413EEE(__int64 a1, unsigned int a2)\n{\n__int64 *v3; // rax\n__int64 v4; // [rsp+18h] [rbp-20h]\nint v5; // [rsp+24h] [rbp-14h]\n__int64 i; // [rsp+28h] [rbp-10h]\n\nv5 = sub_412D73(a1);\nif ( v5 != a2 && !sub_413E14(a1, a2) )\nreturn 0LL;\nif ( (*(_DWORD *)(a1 + 108) & 0x10000) == 0 )\n{\n*(_DWORD *)(a1 + 108) |= 0x10000u;\nsub_41311F(a1);\n}\nif ( sub_412D9A(a1) && a2 == 2 )\n{\nv3 = sub_412E6A(a1);\nv4 = sub_415D20(v3);\n*(_QWORD *)(v4 + 40) = a1;\n*(_DWORD *)(v4 + 108) |= 0x10000u;\nfor ( i = sub_412E6A(v4)[5]; i; i = *(_QWORD *)(i + 8) )\n{\nif ( *(_DWORD *)(*(_QWORD *)(i + 16) + 104LL) )\n*(_DWORD *)(*(_QWORD *)(i + 16) + 108LL) |= 0x10000u;\n}\n}\n*(_DWORD *)(a1 + 48) = a2;\nif ( v5 != a2 )\nsub_413D9A();\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,v4,v5,i,sub_413EEE,sub_412D73,sub_413E14,sub_41311F,sub_412D9A,sub_412E6A,sub_415D20,sub_413D9A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'sym', 'a2': 'val', 'v4': 'cs_0', 'v5': 'oldval', 'i': 'e', 'sub_413EEE': 'sym_set_tristate_value', 'sub_412D73': 'sym_get_tristate_value_2', 'sub_413E14': 'sym_tristate_within_range', 'sub_41311F': 'sym_set_changed', 'sub_412D9A': 'sym_is_choice_value_2', 'sub_412E6A': 'sym_get_choice_prop', 'sub_415D20': 'prop_get_symbol', 'sub_413D9A': 'sym_clear_all_valid'}"} |
|
bvlc_send_result | e42855165e9723a7b478e0600600c036fe09fc1e9321b9dc0d0f997dc06f1011 | baidu | iot-edge-sdk-for-iot-parser | NA | static int bvlc_send_result(
struct sockaddr_in *dest, /* the destination address */
BACNET_BVLC_RESULT result_code)
{
uint8_t mtu[MAX_MPDU] = { 0 };
uint16_t mtu_len = 0;
mtu_len = (uint16_t) bvlc_encode_bvlc_result(&mtu[0], result_code);
if (mtu_len) {
bvlc_send_mpdu(dest, mtu, mtu_len);
}
return mtu_len;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41424F", "function_addr": 4276815, "binary_name": "e42855165e9723a7b478e0600600c036fe09fc1e9321b9dc0d0f997dc06f1011.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 600h"], [3, "mov [rbp+var_5F8], rdi"], [4, "mov [rbp+var_5FC], esi"], [5, "mov [rbp+var_5F0], 0"], [6, "mov [rbp+var_5E8], 0"], [7, "lea rdx, [rbp+var_5E0]"], [8, "mov eax, 0"], [9, "mov ecx, 0BAh"], [10, "mov rdi, rdx"], [11, "rep stosq"], [12, "mov rdx, rdi"], [13, "mov [rdx], ax"], [14, "add rdx, 2"], [15, "mov [rbp+var_2], 0"], [16, "mov edx, [rbp+var_5FC]"], [17, "lea rax, [rbp+var_5F0]"], [18, "mov esi, edx"], [19, "mov rdi, rax"], [20, "call sub_413218"], [21, "mov [rbp+var_2], ax"], [22, "cmp [rbp+var_2], 0"], [23, "jz short loc_4142E3"], [24, "movzx edx, [rbp+var_2]"], [25, "lea rcx, [rbp+var_5F0]"], [26, "mov rax, [rbp+var_5F8]"], [27, "mov rsi, rcx"], [28, "mov rdi, rax"], [29, "call sub_413BDE"], [30, "movzx eax, [rbp+var_2]"], [31, "leave"], [32, "retn"]], "data_dep": [[10, 7], [12, 10], [13, 8], [13, 12], [14, 12], [16, 4], [17, 5], [17, 8], [18, 16], [19, 17], [21, 20], [22, 21], [23, 22], [24, 21], [25, 9], [25, 5], [26, 3], [27, 25], [28, 26], [30, 21], [32, 30]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/e42855165e9723a7b478e0600600c036fe09fc1e9321b9dc0d0f997dc06f1011_e42855165e9723a7b478e0600600c036fe09fc1e9321b9dc0d0f997dc06f1011.jsonl.gz", "strip_func_name": "sub_41424F", "query": "\n\n\n__int64 __fastcall sub_41424F(__int64 a1, __int16 a2)\n{\n__int64 v3[2]; // [rsp+10h] [rbp-5F0h] BYREF\nchar v4[1488]; // [rsp+20h] [rbp-5E0h] BYREF\n__int16 v5; // [rsp+5F0h] [rbp-10h]\nunsigned __int16 v6; // [rsp+5FEh] [rbp-2h]\n\nv3[0] = 0LL;\nv3[1] = 0LL;\nmemset(v4, 0, sizeof(v4));\nv5 = 0;\nv6 = 0;\nv6 = sub_413218(v3, a2);\nif ( v6 )\nsub_413BDE(a1, v3, v6);\nreturn v6;\n}\n\n\n\nQ:[a1,a2,v3,v6,sub_41424F,sub_413218,sub_413BDE,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'dest', 'a2': 'result_code', 'v3': 'mtu', 'v6': 'mtu_len', 'sub_41424F': 'bvlc_send_result', 'sub_413218': 'bvlc_encode_bvlc_result', 'sub_413BDE': 'bvlc_send_mpdu'}"} |
|
vector_copy | 701b6654e64c67cb8338f0fc2d732a77fe8d9ce70cdd955693e8e4a9fbb413e0 | smarco | BiWFA-paper | NA | void vector_copy(
vector_t* const vector_to,
vector_t* const vector_from) {
// Prepare
vector_cast(vector_to,vector_from->element_size);
vector_reserve(vector_to,vector_from->used,false);
// Copy
vector_set_used(vector_to,vector_from->used);
memcpy(vector_to->memory,vector_from->memory,vector_from->used*vector_from->element_size);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40E555", "function_addr": 4253013, "binary_name": "701b6654e64c67cb8338f0fc2d732a77fe8d9ce70cdd955693e8e4a9fbb413e0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rax, [rbp+var_10]"], [6, "mov rdx, [rax+10h]"], [7, "mov rax, [rbp+var_8]"], [8, "mov rsi, rdx"], [9, "mov rdi, rax"], [10, "call sub_40E37B"], [11, "mov rax, [rbp+var_10]"], [12, "mov rcx, [rax+8]"], [13, "mov rax, [rbp+var_8]"], [14, "mov edx, 0"], [15, "mov rsi, rcx"], [16, "mov rdi, rax"], [17, "call sub_40E3CA"], [18, "mov rax, [rbp+var_10]"], [19, "mov rdx, [rax+8]"], [20, "mov rax, [rbp+var_8]"], [21, "mov [rax+8], rdx"], [22, "mov rax, [rbp+var_10]"], [23, "mov rdx, [rax+8]"], [24, "mov rax, [rbp+var_10]"], [25, "mov rax, [rax+10h]"], [26, "imul rdx, rax"], [27, "mov rax, [rbp+var_10]"], [28, "mov rcx, [rax]"], [29, "mov rax, [rbp+var_8]"], [30, "mov rax, [rax]"], [31, "mov rsi, rcx"], [32, "mov rdi, rax"], [33, "call _memcpy"], [34, "nop"], [35, "leave"], [36, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [8, 6], [9, 7], [11, 4], [12, 11], [13, 3], [15, 12], [16, 13], [18, 4], [19, 18], [20, 3], [21, 19], [21, 20], [22, 4], [23, 22], [23, 21], [24, 4], [25, 21], [25, 24], [26, 23], [26, 25], [27, 4], [28, 21], [28, 27], [29, 3], [30, 21], [30, 29], [31, 28], [32, 30], [36, 33]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/701b6654e64c67cb8338f0fc2d732a77fe8d9ce70cdd955693e8e4a9fbb413e0_701b6654e64c67cb8338f0fc2d732a77fe8d9ce70cdd955693e8e4a9fbb413e0.jsonl.gz", "strip_func_name": "sub_40E555", "query": "\n\n\nvoid *__fastcall sub_40E555(void **a1, __int64 a2)\n{\nsub_40E37B(a1, *(_QWORD *)(a2 + 16));\nsub_40E3CA((__int64)a1, *(_QWORD *)(a2 + 8), 0);\na1[1] = *(void **)(a2 + 8);\nreturn memcpy(*a1, *(const void **)a2, *(_QWORD *)(a2 + 16) * *(_QWORD *)(a2 + 8));\n}\n\n\n\nQ:[a1,a2,sub_40E555,sub_40E37B,sub_40E3CA,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'vector_to', 'a2': 'vector_from', 'sub_40E555': 'vector_copy', 'sub_40E37B': 'vector_cast', 'sub_40E3CA': 'vector_reserve'}"} |
|
FSE_countFast | bb2c9130d0b8bd97808533789f96868f2bfdb1d453099c4a69e9e71338b36a1d | powturbo | TurboBench | NA | size_t FSE_countFast(unsigned* count, unsigned* maxSymbolValuePtr,
const void* source, size_t sourceSize)
{
unsigned tmpCounters[1024];
return FSE_countFast_wksp(count, maxSymbolValuePtr, source, sourceSize, tmpCounters);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_472AB7", "function_addr": 4663991, "binary_name": "bb2c9130d0b8bd97808533789f96868f2bfdb1d453099c4a69e9e71338b36a1d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 1020h"], [3, "mov [rbp+var_1008], rdi"], [4, "mov [rbp+var_1010], rsi"], [5, "mov [rbp+var_1018], rdx"], [6, "mov [rbp+var_1020], rcx"], [7, "lea rdi, [rbp+var_1000]"], [8, "mov rcx, [rbp+var_1020]"], [9, "mov rdx, [rbp+var_1018]"], [10, "mov rsi, [rbp+var_1010]"], [11, "mov rax, [rbp+var_1008]"], [12, "mov r8, rdi"], [13, "mov rdi, rax"], [14, "call sub_472A50"], [15, "leave"], [16, "retn"]], "data_dep": [[8, 6], [9, 5], [10, 4], [11, 3], [12, 7], [13, 11], [16, 14]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/bb2c9130d0b8bd97808533789f96868f2bfdb1d453099c4a69e9e71338b36a1d_bb2c9130d0b8bd97808533789f96868f2bfdb1d453099c4a69e9e71338b36a1d.jsonl.gz", "strip_func_name": "sub_472AB7", "query": "\n\n\n__int64 __fastcall sub_472AB7(_DWORD *a1, unsigned int *a2, unsigned int *a3, unsigned __int64 a4)\n{\nchar v5[4096]; // [rsp+20h] [rbp-1000h] BYREF\n\nreturn sub_472A50(a1, a2, a3, a4, v5);\n}\n\n\n\nQ:[a3,a4,a1,a2,v5,sub_472AB7,sub_472A50,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'source', 'a4': 'sourceSize', 'a1': 'count', 'a2': 'maxSymbolValuePtr', 'v5': 'tmpCounters', 'sub_472AB7': 'FSE_countFast', 'sub_472A50': 'FSE_countFast_wksp'}"} |
|
add_to_queue | 4c9b54e189a68508c9f8eee02ba265fe3df355df59a7023262cd9432277aaa99 | sslab-gatech | perf-fuzz | NA | static void add_to_queue(u8* fname, u32 len, u8 passed_det) {
struct queue_entry* q = ck_alloc(sizeof(struct queue_entry));
q->fname = fname;
q->len = len;
q->depth = cur_depth + 1;
q->passed_det = passed_det;
if (q->depth > max_depth) max_depth = q->depth;
if (queue_top) {
queue_top->next = q;
queue_top = q;
} else q_prev100 = queue = queue_top = q;
queued_paths++;
pending_not_fuzzed++;
cycles_wo_finds = 0;
if (!(queued_paths % 100)) {
q_prev100->next_100 = q;
q_prev100 = q;
}
last_path_time = get_cur_time();
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40518B", "function_addr": 4215179, "binary_name": "4c9b54e189a68508c9f8eee02ba265fe3df355df59a7023262cd9432277aaa99.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, edx"], [6, "mov [rbp+var_20], al"], [7, "mov edi, 58h "], [8, "call sub_40283B"], [9, "mov [rbp+var_8], rax"], [10, "mov rax, [rbp+var_8]"], [11, "mov rdx, [rbp+var_18]"], [12, "mov [rax], rdx"], [13, "mov rax, [rbp+var_8]"], [14, "mov edx, [rbp+var_1C]"], [15, "mov [rax+8], edx"], [16, "mov eax, cs:dword_465570"], [17, "add eax, 1"], [18, "mov edx, eax"], [19, "mov rax, [rbp+var_8]"], [20, "mov [rax+30h], rdx"], [21, "mov rax, [rbp+var_8]"], [22, "movzx edx, [rbp+var_20]"], [23, "mov [rax+0Fh], dl"], [24, "mov rax, [rbp+var_8]"], [25, "mov rax, [rax+30h]"], [26, "mov edx, cs:dword_465574"], [27, "mov edx, edx"], [28, "cmp rax, rdx"], [29, "jbe short loc_405203"], [30, "mov rax, [rbp+var_8]"], [31, "mov rax, [rax+30h]"], [32, "mov cs:dword_465574, eax"], [33, "mov rax, cs:qword_4658A8"], [34, "test rax, rax"], [35, "jz short loc_40522B"], [36, "mov rax, cs:qword_4658A8"], [37, "mov rdx, [rbp+var_8]"], [38, "mov [rax+48h], rdx"], [39, "mov rax, [rbp+var_8]"], [40, "mov cs:qword_4658A8, rax"], [41, "jmp short loc_405252"], [42, "mov rax, [rbp+var_8]"], [43, "mov cs:qword_4658A8, rax"], [44, "mov rax, cs:qword_4658A8"], [45, "mov cs:qword_465898, rax"], [46, "mov rax, cs:qword_465898"], [47, "mov cs:qword_4658B0, rax"], [48, "mov eax, cs:dword_465548"], [49, "add eax, 1"], [50, "mov cs:dword_465548, eax"], [51, "mov eax, cs:dword_465564"], [52, "add eax, 1"], [53, "mov cs:dword_465564, eax"], [54, "mov cs:qword_4655E0, 0"], [55, "mov edx, cs:dword_465548"], [56, "mov eax, edx"], [57, "imul rax, 51EB851Fh"], [58, "shr rax, 20h"], [59, "shr eax, 5"], [60, "imul ecx, eax, 64h "], [61, "mov eax, edx"], [62, "sub eax, ecx"], [63, "test eax, eax"], [64, "jnz short loc_4052B6"], [65, "mov rax, cs:qword_4658B0"], [66, "mov rdx, [rbp+var_8]"], [67, "mov [rax+50h], rdx"], [68, "mov rax, [rbp+var_8]"], [69, "mov cs:qword_4658B0, rax"], [70, "call sub_4030DB"], [71, "mov cs:qword_4655B8, rax"], [72, "nop"], [73, "leave"], [74, "retn"]], "data_dep": [[6, 5], [9, 8], [10, 9], [11, 3], [12, 10], [12, 11], [13, 9], [14, 4], [15, 14], [15, 13], [17, 16], [18, 17], [19, 9], [20, 19], [20, 18], [21, 9], [22, 6], [23, 22], [23, 21], [24, 9], [25, 23], [25, 24], [25, 20], [27, 26], [28, 27], [28, 25], [29, 28], [30, 9], [31, 20], [31, 23], [31, 12], [31, 15], [31, 30], [32, 31], [34, 33], [35, 34], [37, 9], [38, 37], [38, 36], [39, 9], [40, 39], [42, 9], [43, 42], [44, 43], [45, 44], [46, 45], [47, 46], [49, 48], [50, 49], [52, 51], [53, 52], [55, 50], [56, 55], [57, 56], [58, 57], [59, 58], [60, 59], [61, 55], [62, 61], [62, 60], [63, 62], [64, 63], [65, 47], [66, 9], [67, 65], [67, 66], [68, 9], [69, 68], [71, 70], [74, 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/4c9b54e189a68508c9f8eee02ba265fe3df355df59a7023262cd9432277aaa99_4c9b54e189a68508c9f8eee02ba265fe3df355df59a7023262cd9432277aaa99.jsonl.gz", "strip_func_name": "sub_40518B", "query": "\n\n\n__time_t __fastcall sub_40518B(__int64 a1, int a2, char a3)\n{\n__time_t result; // rax\n_DWORD *v5; // [rsp+18h] [rbp-8h]\n\nv5 = sub_40283B(0x58u);\n*(_QWORD *)v5 = a1;\nv5[2] = a2;\n*((_QWORD *)v5 + 6) = (unsigned int)(dword_465570 + 1);\n*((_BYTE *)v5 + 15) = a3;\nif ( *((_QWORD *)v5 + 6) > (unsigned __int64)(unsigned int)dword_465574 )\ndword_465574 = *((_QWORD *)v5 + 6);\nif ( qword_4658A8 )\n{\n*(_QWORD *)(qword_4658A8 + 72) = v5;\nqword_4658A8 = (__int64)v5;\n}\nelse\n{\nqword_4658A8 = (__int64)v5;\nqword_465898 = (__int64)v5;\nqword_4658B0 = (__int64)v5;\n}\n++dword_465548;\n++dword_465564;\nqword_4655E0 = 0LL;\nif ( !(dword_465548 % 0x64u) )\n{\n*(_QWORD *)(qword_4658B0 + 80) = v5;\nqword_4658B0 = (__int64)v5;\n}\nresult = sub_4030DB();\nqword_4655B8 = result;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v5,sub_40518B,sub_40283B,sub_4030DB,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'passed_det', 'a1': 'fname', 'a2': 'len', 'v5': 'q', 'sub_40518B': 'add_to_queue', 'sub_40283B': 'DFL_ck_alloc', 'sub_4030DB': 'get_cur_time'}"} |
|
uf_string_treat_argument_next | ba2e7491f76caddd272b7c417e26f19e37d05ae33a4ad857547deaa3e6fee59b | 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_40225F", "function_addr": 4203103, "binary_name": "ba2e7491f76caddd272b7c417e26f19e37d05ae33a4ad857547deaa3e6fee59b.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_4022E4"], [11, "mov rax, [rbp+var_10]"], [12, "mov eax, [rax]"], [13, "cmp eax, 2Fh "], [14, "ja short loc_4022B0"], [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_4022C4"], [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_401EA7"], [37, "xor eax, 1"], [38, "test al, al"], [39, "jz short loc_402355"], [40, "mov eax, 0"], [41, "jmp short locret_40235A"], [42, "mov rax, [rbp+var_18]"], [43, "mov rax, [rax]"], [44, "movzx eax, byte ptr [rax]"], [45, "cmp al, 70h "], [46, "jnz short loc_402355"], [47, "mov rax, [rbp+var_10]"], [48, "mov eax, [rax]"], [49, "cmp eax, 2Fh "], [50, "ja short loc_402321"], [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_402335"], [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_403531"], [73, "xor eax, 1"], [74, "test al, al"], [75, "jz short loc_402355"], [76, "mov eax, 0"], [77, "jmp short locret_40235A"], [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/ba2e7491f76caddd272b7c417e26f19e37d05ae33a4ad857547deaa3e6fee59b_ba2e7491f76caddd272b7c417e26f19e37d05ae33a4ad857547deaa3e6fee59b.jsonl.gz", "strip_func_name": "sub_40225F", "query": "\n\n\n__int64 __fastcall sub_40225F(_QWORD *a1, unsigned int *a2, _BYTE **a3)\n{\n__int64 *v3; // rax\n_QWORD *v5; // rax\n\nif ( **a3 == 115 )\n{\nif ( *a2 > 0x2F )\n{\nv3 = (__int64 *)*((_QWORD *)a2 + 1);\n*((_QWORD *)a2 + 1) = v3 + 1;\n}\nelse\n{\nv3 = (__int64 *)(*((_QWORD *)a2 + 2) + *a2);\n*a2 += 8;\n}\nif ( (unsigned __int8)sub_401EA7(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_403531(a1, *v5) != 1 )\nreturn 0LL;\n}\nreturn 1LL;\n}\n\n\n\nQ:[a3,a1,a2,sub_40225F,sub_401EA7,sub_403531,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'fmt', 'a1': 'v_this', 'a2': 'ap', 'sub_40225F': 'uf_string_treat_argument_next', 'sub_401EA7': 'f_string_add_str', 'sub_403531': 'f_string_add_ptr'}"} |
|
des_iterator_next | 1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586 | bluekitchen | btstack | NA | void des_iterator_next(des_iterator_t * it){
int element_len = de_get_len(&it->element[it->pos]);
it->pos += element_len;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43736D", "function_addr": 4420461, "binary_name": "1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586.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 rdx, [rax]"], [6, "mov rax, [rbp+var_18]"], [7, "movzx eax, word ptr [rax+8]"], [8, "movzx eax, ax"], [9, "add rax, rdx"], [10, "mov rdi, rax"], [11, "call sub_436BF7"], [12, "mov [rbp+var_4], eax"], [13, "mov rax, [rbp+var_18]"], [14, "movzx edx, word ptr [rax+8]"], [15, "mov eax, [rbp+var_4]"], [16, "add edx, eax"], [17, "mov rax, [rbp+var_18]"], [18, "mov [rax+8], dx"], [19, "nop"], [20, "leave"], [21, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 6], [8, 7], [9, 5], [9, 8], [10, 9], [12, 11], [13, 3], [14, 13], [15, 12], [16, 14], [16, 15], [17, 3], [18, 17], [18, 16], [21, 17]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586_1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586.jsonl.gz", "strip_func_name": "sub_43736D", "query": "\n\n\n__int64 __fastcall sub_43736D(__int64 a1)\n{\n__int16 v1; // dx\n__int64 result; // rax\n\nv1 = sub_436BF7((_BYTE *)(*(_QWORD *)a1 + *(unsigned __int16 *)(a1 + 8))) + *(_WORD *)(a1 + 8);\nresult = a1;\n*(_WORD *)(a1 + 8) = v1;\nreturn result;\n}\n\n\n\nQ:[a1,sub_43736D,sub_436BF7,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'it', 'sub_43736D': 'des_iterator_next', 'sub_436BF7': 'de_get_len'}"} |
|
calculate_score | 1f71d6cb7e2724d0c9605ab9e979fcac9de3aeac86e10cdc089fe0279333d8b3 | sslab-gatech | fuzzification | NA | static u32 calculate_score(struct queue_entry* q) {
u32 avg_exec_us = total_cal_us / total_cal_cycles;
u32 avg_bitmap_size = total_bitmap_size / total_bitmap_entries;
u32 perf_score = 100;
/* Adjust score based on execution speed of this path, compared to the
global average. Multiplier ranges from 0.1x to 3x. Fast inputs are
less expensive to fuzz, so we're giving them more air time. */
if (q->exec_us * 0.1 > avg_exec_us) perf_score = 10;
else if (q->exec_us * 0.25 > avg_exec_us) perf_score = 25;
else if (q->exec_us * 0.5 > avg_exec_us) perf_score = 50;
else if (q->exec_us * 0.75 > avg_exec_us) perf_score = 75;
else if (q->exec_us * 4 < avg_exec_us) perf_score = 300;
else if (q->exec_us * 3 < avg_exec_us) perf_score = 200;
else if (q->exec_us * 2 < avg_exec_us) perf_score = 150;
/* Adjust score based on bitmap size. The working theory is that better
coverage translates to better targets. Multiplier from 0.25x to 3x. */
if (q->bitmap_size * 0.3 > avg_bitmap_size) perf_score *= 3;
else if (q->bitmap_size * 0.5 > avg_bitmap_size) perf_score *= 2;
else if (q->bitmap_size * 0.75 > avg_bitmap_size) perf_score *= 1.5;
else if (q->bitmap_size * 3 < avg_bitmap_size) perf_score *= 0.25;
else if (q->bitmap_size * 2 < avg_bitmap_size) perf_score *= 0.5;
else if (q->bitmap_size * 1.5 < avg_bitmap_size) perf_score *= 0.75;
/* Adjust score based on handicap. Handicap is proportional to how late
in the game we learned about this path. Latecomers are allowed to run
for a bit longer until they catch up with the rest. */
if (q->handicap >= 4) {
perf_score *= 4;
q->handicap -= 4;
} else if (q->handicap) {
perf_score *= 2;
q->handicap--;
}
/* Final adjustment based on input depth, under the assumption that fuzzing
deeper test cases is more likely to reveal stuff that can't be
discovered with traditional fuzzers. */
switch (q->depth) {
case 0 ... 3: break;
case 4 ... 7: perf_score *= 2; break;
case 8 ... 13: perf_score *= 3; break;
case 14 ... 25: perf_score *= 4; break;
default: perf_score *= 5;
}
/* Make sure that we don't go over limit. */
if (perf_score > HAVOC_MAX_MULT * 100) perf_score = HAVOC_MAX_MULT * 100;
return perf_score;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40FEA3", "function_addr": 4259491, "binary_name": "1f71d6cb7e2724d0c9605ab9e979fcac9de3aeac86e10cdc089fe0279333d8b3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov rax, cs:qword_465828"], [4, "mov rcx, cs:qword_465830"], [5, "mov edx, 0"], [6, "div rcx"], [7, "mov [rbp+var_8], eax"], [8, "mov rax, cs:qword_465838"], [9, "mov rsi, cs:qword_465840"], [10, "mov edx, 0"], [11, "div rsi"], [12, "mov [rbp+var_C], eax"], [13, "mov [rbp+var_4], 64h "], [14, "mov rax, [rbp+var_18]"], [15, "mov rax, [rax+20h]"], [16, "test rax, rax"], [17, "js short loc_40FEFC"], [18, "pxor xmm0, xmm0"], [19, "cvtsi2sd xmm0, rax"], [20, "jmp short loc_40FF15"], [21, "mov rdx, rax"], [22, "shr rdx, 1"], [23, "and eax, 1"], [24, "or rdx, rax"], [25, "pxor xmm0, xmm0"], [26, "cvtsi2sd xmm0, rdx"], [27, "addsd xmm0, xmm0"], [28, "movsd xmm1, cs:qword_4228D0"], [29, "mulsd xmm1, xmm0"], [30, "mov eax, [rbp+var_8]"], [31, "test rax, rax"], [32, "js short loc_40FF34"], [33, "pxor xmm0, xmm0"], [34, "cvtsi2sd xmm0, rax"], [35, "jmp short loc_40FF4D"], [36, "mov rdx, rax"], [37, "shr rdx, 1"], [38, "and eax, 1"], [39, "or rdx, rax"], [40, "pxor xmm0, xmm0"], [41, "cvtsi2sd xmm0, rdx"], [42, "addsd xmm0, xmm0"], [43, "comisd xmm1, xmm0"], [44, "jbe short loc_40FF5F"], [45, "mov [rbp+var_4], 0Ah"], [46, "jmp loc_41012B"], [47, "mov rax, [rbp+var_18]"], [48, "mov rax, [rax+20h]"], [49, "test rax, rax"], [50, "js short loc_40FF77"], [51, "pxor xmm0, xmm0"], [52, "cvtsi2sd xmm0, rax"], [53, "jmp short loc_40FF90"], [54, "mov rdx, rax"], [55, "shr rdx, 1"], [56, "and eax, 1"], [57, "or rdx, rax"], [58, "pxor xmm0, xmm0"], [59, "cvtsi2sd xmm0, rdx"], [60, "addsd xmm0, xmm0"], [61, "movsd xmm1, cs:qword_4228D8"], [62, "mulsd xmm1, xmm0"], [63, "mov eax, [rbp+var_8]"], [64, "test rax, rax"], [65, "js short loc_40FFAF"], [66, "pxor xmm0, xmm0"], [67, "cvtsi2sd xmm0, rax"], [68, "jmp short loc_40FFC8"], [69, "mov rdx, rax"], [70, "shr rdx, 1"], [71, "and eax, 1"], [72, "or rdx, rax"], [73, "pxor xmm0, xmm0"], [74, "cvtsi2sd xmm0, rdx"], [75, "addsd xmm0, xmm0"], [76, "comisd xmm1, xmm0"], [77, "jbe short loc_40FFDA"], [78, "mov [rbp+var_4], 19h"], [79, "jmp loc_41012B"], [80, "mov rax, [rbp+var_18]"], [81, "mov rax, [rax+20h]"], [82, "test rax, rax"], [83, "js short loc_40FFF2"], [84, "pxor xmm0, xmm0"], [85, "cvtsi2sd xmm0, rax"], [86, "jmp short loc_41000B"], [87, "mov rdx, rax"], [88, "shr rdx, 1"], [89, "and eax, 1"], [90, "or rdx, rax"], [91, "pxor xmm0, xmm0"], [92, "cvtsi2sd xmm0, rdx"], [93, "addsd xmm0, xmm0"], [94, "movsd xmm1, cs:qword_4228E0"], [95, "mulsd xmm1, xmm0"], [96, "mov eax, [rbp+var_8]"], [97, "test rax, rax"], [98, "js short loc_41002A"], [99, "pxor xmm0, xmm0"], [100, "cvtsi2sd xmm0, rax"], [101, "jmp short loc_410043"], [102, "mov rdx, rax"], [103, "shr rdx, 1"], [104, "and eax, 1"], [105, "or rdx, rax"], [106, "pxor xmm0, xmm0"], [107, "cvtsi2sd xmm0, rdx"], [108, "addsd xmm0, xmm0"], [109, "comisd xmm1, xmm0"], [110, "jbe short loc_410055"], [111, "mov [rbp+var_4], 32h "], [112, "jmp loc_41012B"], [113, "mov rax, [rbp+var_18]"], [114, "mov rax, [rax+20h]"], [115, "test rax, rax"], [116, "js short loc_41006D"], [117, "pxor xmm0, xmm0"], [118, "cvtsi2sd xmm0, rax"], [119, "jmp short loc_410086"], [120, "mov rdx, rax"], [121, "shr rdx, 1"], [122, "and eax, 1"], [123, "or rdx, rax"], [124, "pxor xmm0, xmm0"], [125, "cvtsi2sd xmm0, rdx"], [126, "addsd xmm0, xmm0"], [127, "movsd xmm1, cs:qword_4228E8"], [128, "mulsd xmm1, xmm0"], [129, "mov eax, [rbp+var_8]"], [130, "test rax, rax"], [131, "js short loc_4100A5"], [132, "pxor xmm0, xmm0"], [133, "cvtsi2sd xmm0, rax"], [134, "jmp short loc_4100BE"], [135, "mov rdx, rax"], [136, "shr rdx, 1"], [137, "and eax, 1"], [138, "or rdx, rax"], [139, "pxor xmm0, xmm0"], [140, "cvtsi2sd xmm0, rdx"], [141, "addsd xmm0, xmm0"], [142, "comisd xmm1, xmm0"], [143, "jbe short loc_4100CD"], [144, "mov [rbp+var_4], 4Bh "], [145, "jmp short loc_41012B"], [146, "mov rax, [rbp+var_18]"], [147, "mov rax, [rax+20h]"], [148, "lea rdx, ds:0[rax*4]"], [149, "mov eax, [rbp+var_8]"], [150, "cmp rdx, rax"], [151, "jnb short loc_4100EE"], [152, "mov [rbp+var_4], 12Ch"], [153, "jmp short loc_41012B"], [154, "mov rax, [rbp+var_18]"], [155, "mov rdx, [rax+20h]"], [156, "mov rax, rdx"], [157, "add rax, rax"], [158, "add rdx, rax"], [159, "mov eax, [rbp+var_8]"], [160, "cmp rdx, rax"], [161, "jnb short loc_410110"], [162, "mov [rbp+var_4], 0C8h"], [163, "jmp short loc_41012B"], [164, "mov rax, [rbp+var_18]"], [165, "mov rax, [rax+20h]"], [166, "lea rdx, [rax+rax]"], [167, "mov eax, [rbp+var_8]"], [168, "cmp rdx, rax"], [169, "jnb short loc_41012B"], [170, "mov [rbp+var_4], 96h"], [171, "mov rax, [rbp+var_18]"], [172, "mov eax, [rax+14h]"], [173, "mov eax, eax"], [174, "test rax, rax"], [175, "js short loc_410144"], [176, "pxor xmm0, xmm0"], [177, "cvtsi2sd xmm0, rax"], [178, "jmp short loc_41015D"], [179, "mov rdx, rax"], [180, "shr rdx, 1"], [181, "and eax, 1"], [182, "or rdx, rax"], [183, "pxor xmm0, xmm0"], [184, "cvtsi2sd xmm0, rdx"], [185, "addsd xmm0, xmm0"], [186, "movsd xmm1, cs:qword_4228F0"], [187, "mulsd xmm1, xmm0"], [188, "mov eax, [rbp+var_C]"], [189, "test rax, rax"], [190, "js short loc_41017C"], [191, "pxor xmm0, xmm0"], [192, "cvtsi2sd xmm0, rax"], [193, "jmp short loc_410195"], [194, "mov rdx, rax"], [195, "shr rdx, 1"], [196, "and eax, 1"], [197, "or rdx, rax"], [198, "pxor xmm0, xmm0"], [199, "cvtsi2sd xmm0, rdx"], [200, "addsd xmm0, xmm0"], [201, "comisd xmm1, xmm0"], [202, "jbe short loc_4101AC"], [203, "mov edx, [rbp+var_4]"], [204, "mov eax, edx"], [205, "add eax, eax"], [206, "add eax, edx"], [207, "mov [rbp+var_4], eax"], [208, "jmp loc_410433"], [209, "mov rax, [rbp+var_18]"], [210, "mov eax, [rax+14h]"], [211, "mov eax, eax"], [212, "test rax, rax"], [213, "js short loc_4101C5"], [214, "pxor xmm0, xmm0"], [215, "cvtsi2sd xmm0, rax"], [216, "jmp short loc_4101DE"], [217, "mov rdx, rax"], [218, "shr rdx, 1"], [219, "and eax, 1"], [220, "or rdx, rax"], [221, "pxor xmm0, xmm0"], [222, "cvtsi2sd xmm0, rdx"], [223, "addsd xmm0, xmm0"], [224, "movsd xmm1, cs:qword_4228E0"], [225, "mulsd xmm1, xmm0"], [226, "mov eax, [rbp+var_C]"], [227, "test rax, rax"], [228, "js short loc_4101FD"], [229, "pxor xmm0, xmm0"], [230, "cvtsi2sd xmm0, rax"], [231, "jmp short loc_410216"], [232, "mov rdx, rax"], [233, "shr rdx, 1"], [234, "and eax, 1"], [235, "or rdx, rax"], [236, "pxor xmm0, xmm0"], [237, "cvtsi2sd xmm0, rdx"], [238, "addsd xmm0, xmm0"], [239, "comisd xmm1, xmm0"], [240, "jbe short loc_410224"], [241, "shl [rbp+var_4], 1"], [242, "jmp loc_410433"], [243, "mov rax, [rbp+var_18]"], [244, "mov eax, [rax+14h]"], [245, "mov eax, eax"], [246, "test rax, rax"], [247, "js short loc_41023D"], [248, "pxor xmm0, xmm0"], [249, "cvtsi2sd xmm0, rax"], [250, "jmp short loc_410256"], [251, "mov rdx, rax"], [252, "shr rdx, 1"], [253, "and eax, 1"], [254, "or rdx, rax"], [255, "pxor xmm0, xmm0"], [256, "cvtsi2sd xmm0, rdx"], [257, "addsd xmm0, xmm0"], [258, "movsd xmm1, cs:qword_4228E8"], [259, "mulsd xmm1, xmm0"], [260, "mov eax, [rbp+var_C]"], [261, "test rax, rax"], [262, "js short loc_410275"], [263, "pxor xmm0, xmm0"], [264, "cvtsi2sd xmm0, rax"], [265, "jmp short loc_41028E"], [266, "mov rdx, rax"], [267, "shr rdx, 1"], [268, "and eax, 1"], [269, "or rdx, rax"], [270, "pxor xmm0, xmm0"], [271, "cvtsi2sd xmm0, rdx"], [272, "addsd xmm0, xmm0"], [273, "comisd xmm1, xmm0"], [274, "jbe short loc_4102D9"], [275, "mov eax, [rbp+var_4]"], [276, "test rax, rax"], [277, "js short loc_4102A7"], [278, "pxor xmm0, xmm0"], [279, "cvtsi2sd xmm0, rax"], [280, "jmp short loc_4102C0"], [281, "mov rdx, rax"], [282, "shr rdx, 1"], [283, "and eax, 1"], [284, "or rdx, rax"], [285, "pxor xmm0, xmm0"], [286, "cvtsi2sd xmm0, rdx"], [287, "addsd xmm0, xmm0"], [288, "movsd xmm1, cs:qword_4228F8"], [289, "mulsd xmm0, xmm1"], [290, "cvttsd2si rax, xmm0"], [291, "mov [rbp+var_4], eax"], [292, "jmp loc_410433"], [293, "mov rax, [rbp+var_18]"], [294, "mov edx, [rax+14h]"], [295, "mov eax, edx"], [296, "add eax, eax"], [297, "add eax, edx"], [298, "cmp [rbp+var_C], eax"], [299, "jbe short loc_410330"], [300, "mov eax, [rbp+var_4]"], [301, "test rax, rax"], [302, "js short loc_4102FE"], [303, "pxor xmm0, xmm0"], [304, "cvtsi2sd xmm0, rax"], [305, "jmp short loc_410317"], [306, "mov rdx, rax"], [307, "shr rdx, 1"], [308, "and eax, 1"], [309, "or rdx, rax"], [310, "pxor xmm0, xmm0"], [311, "cvtsi2sd xmm0, rdx"], [312, "addsd xmm0, xmm0"], [313, "movsd xmm1, cs:qword_4228D8"], [314, "mulsd xmm0, xmm1"], [315, "cvttsd2si rax, xmm0"], [316, "mov [rbp+var_4], eax"], [317, "jmp loc_410433"], [318, "mov rax, [rbp+var_18]"], [319, "mov eax, [rax+14h]"], [320, "add eax, eax"], [321, "cmp [rbp+var_C], eax"], [322, "jbe short loc_410383"], [323, "mov eax, [rbp+var_4]"], [324, "test rax, rax"], [325, "js short loc_410351"], [326, "pxor xmm0, xmm0"], [327, "cvtsi2sd xmm0, rax"], [328, "jmp short loc_41036A"], [329, "mov rdx, rax"], [330, "shr rdx, 1"], [331, "and eax, 1"], [332, "or rdx, rax"], [333, "pxor xmm0, xmm0"], [334, "cvtsi2sd xmm0, rdx"], [335, "addsd xmm0, xmm0"], [336, "movsd xmm1, cs:qword_4228E0"], [337, "mulsd xmm0, xmm1"], [338, "cvttsd2si rax, xmm0"], [339, "mov [rbp+var_4], eax"], [340, "jmp loc_410433"], [341, "mov rax, [rbp+var_18]"], [342, "mov eax, [rax+14h]"], [343, "mov eax, eax"], [344, "test rax, rax"], [345, "js short loc_41039C"], [346, "pxor xmm0, xmm0"], [347, "cvtsi2sd xmm0, rax"], [348, "jmp short loc_4103B5"], [349, "mov rdx, rax"], [350, "shr rdx, 1"], [351, "and eax, 1"], [352, "or rdx, rax"], [353, "pxor xmm0, xmm0"], [354, "cvtsi2sd xmm0, rdx"], [355, "addsd xmm0, xmm0"], [356, "movsd xmm1, cs:qword_4228F8"], [357, "mulsd xmm1, xmm0"], [358, "mov eax, [rbp+var_C]"], [359, "test rax, rax"], [360, "js short loc_4103D4"], [361, "pxor xmm0, xmm0"], [362, "cvtsi2sd xmm0, rax"], [363, "jmp short loc_4103ED"], [364, "mov rdx, rax"], [365, "shr rdx, 1"], [366, "and eax, 1"], [367, "or rdx, rax"], [368, "pxor xmm0, xmm0"], [369, "cvtsi2sd xmm0, rdx"], [370, "addsd xmm0, xmm0"], [371, "comisd xmm0, xmm1"], [372, "jbe short loc_410433"], [373, "mov eax, [rbp+var_4]"], [374, "test rax, rax"], [375, "js short loc_410406"], [376, "pxor xmm0, xmm0"], [377, "cvtsi2sd xmm0, rax"], [378, "jmp short loc_41041F"], [379, "mov rdx, rax"], [380, "shr rdx, 1"], [381, "and eax, 1"], [382, "or rdx, rax"], [383, "pxor xmm0, xmm0"], [384, "cvtsi2sd xmm0, rdx"], [385, "addsd xmm0, xmm0"], [386, "movsd xmm1, cs:qword_4228E8"], [387, "mulsd xmm0, xmm1"], [388, "cvttsd2si rax, xmm0"], [389, "mov [rbp+var_4], eax"], [390, "mov rax, [rbp+var_18]"], [391, "mov rax, [rax+28h]"], [392, "cmp rax, 3"], [393, "jbe short loc_41045B"], [394, "shl [rbp+var_4], 2"], [395, "mov rax, [rbp+var_18]"], [396, "mov rax, [rax+28h]"], [397, "lea rdx, [rax-4]"], [398, "mov rax, [rbp+var_18]"], [399, "mov [rax+28h], rdx"], [400, "jmp short loc_41047F"], [401, "mov rax, [rbp+var_18]"], [402, "mov rax, [rax+28h]"], [403, "test rax, rax"], [404, "jz short loc_41047F"], [405, "shl [rbp+var_4], 1"], [406, "mov rax, [rbp+var_18]"], [407, "mov rax, [rax+28h]"], [408, "lea rdx, [rax-1]"], [409, "mov rax, [rbp+var_18]"], [410, "mov [rax+28h], rdx"], [411, "mov rax, [rbp+var_18]"], [412, "mov rax, [rax+30h]"], [413, "cmp rax, 19h"], [414, "ja short loc_4104C8"], [415, "cmp rax, 0Eh"], [416, "jnb short loc_4104C2"], [417, "cmp rax, 0Dh"], [418, "ja short loc_4104C8"], [419, "cmp rax, 8"], [420, "jnb short loc_4104B4"], [421, "cmp rax, 3"], [422, "jbe short loc_4104D7"], [423, "sub rax, 4"], [424, "cmp rax, 3"], [425, "ja short loc_4104C8"], [426, "shl [rbp+var_4], 1"], [427, "jmp short loc_4104D8"], [428, "mov edx, [rbp+var_4]"], [429, "mov eax, edx"], [430, "add eax, eax"], [431, "add eax, edx"], [432, "mov [rbp+var_4], eax"], [433, "jmp short loc_4104D8"], [434, "shl [rbp+var_4], 2"], [435, "jmp short loc_4104D8"], [436, "mov edx, [rbp+var_4]"], [437, "mov eax, edx"], [438, "shl eax, 2"], [439, "add eax, edx"], [440, "mov [rbp+var_4], eax"], [441, "jmp short loc_4104D8"], [442, "nop"], [443, "cmp [rbp+var_4], 640h"], [444, "jbe short loc_4104E8"], [445, "mov [rbp+var_4], 640h"], [446, "mov eax, [rbp+var_4]"], [447, "pop rbp"], [448, "retn"]], "data_dep": [[6, 4], [7, 3], [11, 9], [12, 8], [14, 2], [15, 14], [16, 15], [17, 16], [19, 18], [19, 16], [21, 16], [22, 21], [23, 16], [24, 22], [24, 23], [26, 25], [26, 24], [27, 26], [29, 27], [29, 19], [29, 28], [30, 7], [31, 30], [32, 31], [34, 33], [34, 31], [36, 31], [37, 36], [38, 31], [39, 38], [39, 37], [41, 40], [41, 39], [42, 41], [43, 34], [43, 29], [43, 42], [44, 31], [44, 39], [47, 2], [48, 47], [49, 48], [50, 49], [52, 51], [52, 49], [54, 49], [55, 54], [56, 49], [57, 55], [57, 56], [59, 58], [59, 57], [60, 59], [62, 60], [62, 52], [62, 61], [63, 7], [64, 63], [65, 64], [67, 66], [67, 64], [69, 64], [70, 69], [71, 64], [72, 71], [72, 70], [74, 73], [74, 72], [75, 74], [76, 67], [76, 62], [76, 75], [77, 64], [77, 72], [80, 2], [81, 80], [82, 81], [83, 82], [85, 84], [85, 82], [87, 82], [88, 87], [89, 82], [90, 88], [90, 89], [92, 91], [92, 90], [93, 92], [95, 93], [95, 85], [95, 94], [96, 7], [97, 96], [98, 97], [100, 99], [100, 97], [102, 97], [103, 102], [104, 97], [105, 104], [105, 103], [107, 106], [107, 105], [108, 107], [109, 100], [109, 95], [109, 108], [110, 97], [110, 105], [113, 2], [114, 113], [115, 114], [116, 115], [118, 117], [118, 115], [120, 115], [121, 120], [122, 115], [123, 121], [123, 122], [125, 124], [125, 123], [126, 125], [128, 118], [128, 127], [128, 126], [129, 7], [130, 129], [131, 130], [133, 132], [133, 130], [135, 130], [136, 135], [137, 130], [138, 137], [138, 136], [140, 139], [140, 138], [141, 140], [142, 133], [142, 128], [142, 141], [143, 130], [143, 138], [146, 2], [147, 146], [148, 24], [148, 10], [148, 138], [148, 105], [148, 123], [148, 72], [148, 90], [148, 39], [148, 57], [149, 7], [150, 149], [150, 148], [151, 150], [154, 2], [155, 154], [156, 155], [157, 156], [158, 157], [158, 155], [159, 7], [160, 159], [160, 158], [161, 160], [164, 2], [165, 164], [166, 158], [166, 165], [167, 7], [168, 167], [168, 166], [169, 168], [171, 2], [172, 171], [173, 172], [174, 173], [175, 174], [177, 176], [177, 174], [179, 174], [180, 179], [181, 174], [182, 181], [182, 180], [184, 183], [184, 182], [185, 184], [187, 177], [187, 186], [187, 185], [188, 12], [189, 188], [190, 189], [192, 191], [192, 189], [194, 189], [195, 194], [196, 189], [197, 196], [197, 195], [199, 198], [199, 197], [200, 199], [201, 192], [201, 187], [201, 200], [202, 189], [202, 197], [203, 170], [203, 144], [203, 162], [203, 45], [203, 13], [203, 152], [203, 111], [203, 78], [204, 203], [205, 204], [206, 203], [206, 205], [207, 206], [209, 2], [210, 209], [211, 210], [212, 211], [213, 212], [215, 212], [215, 214], [217, 212], [218, 217], [219, 212], [220, 219], [220, 218], [222, 221], [222, 220], [223, 222], [225, 215], [225, 224], [225, 223], [226, 12], [227, 226], [228, 227], [230, 229], [230, 227], [232, 227], [233, 232], [234, 227], [235, 233], [235, 234], [237, 236], [237, 235], [238, 237], [239, 230], [239, 225], [239, 238], [240, 227], [240, 235], [241, 170], [241, 111], [241, 78], [241, 144], [241, 162], [241, 45], [241, 13], [241, 152], [243, 2], [244, 243], [245, 244], [246, 245], [247, 246], [249, 246], [249, 248], [251, 246], [252, 251], [253, 246], [254, 252], [254, 253], [256, 254], [256, 255], [257, 256], [259, 249], [259, 258], [259, 257], [260, 12], [261, 260], [262, 261], [264, 263], [264, 261], [266, 261], [267, 266], [268, 261], [269, 268], [269, 267], [271, 270], [271, 269], [272, 271], [273, 264], [273, 259], [273, 272], [274, 261], [274, 269], [275, 78], [275, 162], [275, 45], [275, 13], [275, 152], [275, 170], [275, 144], [275, 111], [276, 275], [277, 276], [279, 276], [279, 278], [281, 276], [282, 281], [283, 276], [284, 283], [284, 282], [286, 285], [286, 284], [287, 286], [289, 287], [289, 279], [289, 288], [290, 289], [290, 283], [290, 276], [291, 290], [293, 2], [294, 293], [295, 294], [296, 295], [297, 296], [297, 294], [298, 297], [298, 12], [299, 298], [300, 144], [300, 111], [300, 78], [300, 162], [300, 45], [300, 13], [300, 152], [300, 170], [301, 300], [302, 301], [304, 303], [304, 301], [306, 301], [307, 306], [308, 301], [309, 308], [309, 307], [311, 310], [311, 309], [312, 311], [314, 304], [314, 313], [314, 312], [315, 308], [315, 301], [315, 314], [316, 315], [318, 2], [319, 318], [320, 319], [321, 320], [321, 12], [322, 321], [323, 144], [323, 162], [323, 13], [323, 111], [323, 78], [323, 45], [323, 152], [323, 170], [324, 323], [325, 324], [327, 324], [327, 326], [329, 324], [330, 329], [331, 324], [332, 331], [332, 330], [334, 332], [334, 333], [335, 334], [337, 327], [337, 336], [337, 335], [338, 324], [338, 337], [338, 331], [339, 338], [341, 2], [342, 341], [343, 342], [344, 343], [345, 344], [347, 346], [347, 344], [349, 344], [350, 349], [351, 344], [352, 351], [352, 350], [354, 353], [354, 352], [355, 354], [357, 347], [357, 356], [357, 355], [358, 12], [359, 358], [360, 359], [362, 361], [362, 359], [364, 359], [365, 364], [366, 359], [367, 365], [367, 366], [369, 368], [369, 367], [370, 369], [371, 362], [371, 357], [371, 370], [372, 359], [372, 367], [373, 78], [373, 45], [373, 170], [373, 144], [373, 162], [373, 13], [373, 152], [373, 111], [374, 373], [375, 374], [377, 376], [377, 374], [379, 374], [380, 379], [381, 374], [382, 381], [382, 380], [384, 383], [384, 382], [385, 384], [387, 386], [387, 385], [387, 377], [388, 387], [388, 381], [388, 374], [389, 388], [390, 2], [391, 390], [392, 391], [393, 392], [394, 291], [394, 339], [394, 316], [394, 144], [394, 162], [394, 13], [394, 152], [394, 111], [394, 241], [394, 389], [394, 78], [394, 207], [394, 45], [394, 170], [395, 2], [396, 395], [397, 166], [397, 309], [397, 138], [397, 39], [397, 254], [397, 105], [397, 123], [397, 235], [397, 72], [397, 90], [397, 220], [397, 332], [397, 197], [397, 57], [397, 182], [397, 294], [397, 24], [397, 10], [397, 284], [397, 158], [397, 396], [397, 203], [397, 382], [397, 148], [397, 269], [397, 367], [397, 352], [398, 2], [399, 397], [399, 398], [401, 2], [402, 401], [403, 402], [404, 403], [405, 45], [405, 152], [405, 170], [405, 291], [405, 389], [405, 316], [405, 144], [405, 162], [405, 13], [405, 111], [405, 241], [405, 339], [405, 78], [405, 207], [406, 2], [407, 406], [408, 235], [408, 203], [408, 72], [408, 166], [408, 332], [408, 197], [408, 309], [408, 39], [408, 407], [408, 123], [408, 24], [408, 10], [408, 90], [408, 382], [408, 220], [408, 57], [408, 182], [408, 294], [408, 284], [408, 158], [408, 148], [408, 269], [408, 367], [408, 138], [408, 254], [408, 105], [408, 352], [409, 2], [410, 409], [410, 408], [411, 2], [412, 410], [412, 399], [412, 411], [413, 412], [414, 413], [415, 412], [416, 415], [417, 412], [418, 417], [419, 412], [420, 419], [421, 412], [422, 421], [423, 412], [424, 423], [425, 424], [426, 316], [426, 405], [426, 144], [426, 162], [426, 13], [426, 111], [426, 394], [426, 241], [426, 339], [426, 78], [426, 207], [426, 45], [426, 152], [426, 170], [426, 291], [426, 389], [428, 405], [428, 144], [428, 162], [428, 13], [428, 152], [428, 111], [428, 394], [428, 241], [428, 389], [428, 339], [428, 78], [428, 207], [428, 45], [428, 170], [428, 291], [428, 316], [429, 428], [430, 429], [431, 428], [431, 430], [432, 431], [434, 339], [434, 316], [434, 405], [434, 144], [434, 162], [434, 13], [434, 152], [434, 111], [434, 394], [434, 241], [434, 389], [434, 78], [434, 207], [434, 45], [434, 170], [434, 291], [436, 144], [436, 162], [436, 13], [436, 152], [436, 111], [436, 394], [436, 241], [436, 389], [436, 78], [436, 207], [436, 45], [436, 170], [436, 291], [436, 339], [436, 316], [436, 405], [437, 436], [438, 437], [439, 438], [439, 436], [440, 439], [443, 440], [443, 170], [443, 426], [443, 291], [443, 434], [443, 316], [443, 405], [443, 432], [443, 144], [443, 162], [443, 13], [443, 152], [443, 111], [443, 394], [443, 241], [443, 389], [443, 339], [443, 78], [443, 207], [443, 45], [444, 443], [446, 207], [446, 445], [446, 45], [446, 440], [446, 170], [446, 426], [446, 291], [446, 434], [446, 339], [446, 316], [446, 405], [446, 432], [446, 144], [446, 162], [446, 13], [446, 152], [446, 111], [446, 394], [446, 241], [446, 389], [446, 78], [447, 0], [448, 446]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1f71d6cb7e2724d0c9605ab9e979fcac9de3aeac86e10cdc089fe0279333d8b3_1f71d6cb7e2724d0c9605ab9e979fcac9de3aeac86e10cdc089fe0279333d8b3.jsonl.gz", "strip_func_name": "sub_40FEA3", "query": "\n\n\n__int64 __fastcall sub_40FEA3(__int64 a1)\n{\n__int64 v1; // rax\ndouble v2; // xmm0_8\n__int64 v3; // rdx\n__int64 v4; // rax\ndouble v5; // xmm0_8\n__int64 v6; // rdx\n__int64 v7; // rax\ndouble v8; // xmm0_8\n__int64 v9; // rdx\n__int64 v10; // rax\ndouble v11; // xmm0_8\n__int64 v12; // rdx\nunsigned __int64 v13; // rax\nint v15; // [rsp+Ch] [rbp-Ch]\nint v16; // [rsp+10h] [rbp-8h]\nint v17; // [rsp+14h] [rbp-4h]\n\nv16 = qword_465828 / (unsigned __int64)qword_465830;\nv15 = qword_465838 / (unsigned __int64)qword_465840;\nv17 = 100;\nv1 = *(_QWORD *)(a1 + 32);\nif ( v1 < 0 )\n{\nv3 = *(_QWORD *)(a1 + 32) & 1LL | ((unsigned __int64)v1 >> 1);\nv2 = (double)(int)v3 + (double)(int)v3;\n}\nelse\n{\nv2 = (double)(int)v1;\n}\nif ( 0.1 * v2 <= (double)v16 )\n{\nv4 = *(_QWORD *)(a1 + 32);\nif ( v4 < 0 )\n{\nv6 = *(_QWORD *)(a1 + 32) & 1LL | ((unsigned __int64)v4 >> 1);\nv5 = (double)(int)v6 + (double)(int)v6;\n}\nelse\n{\nv5 = (double)(int)v4;\n}\nif ( 0.25 * v5 <= (double)v16 )\n{\nv7 = *(_QWORD *)(a1 + 32);\nif ( v7 < 0 )\n{\nv9 = *(_QWORD *)(a1 + 32) & 1LL | ((unsigned __int64)v7 >> 1);\nv8 = (double)(int)v9 + (double)(int)v9;\n}\nelse\n{\nv8 = (double)(int)v7;\n}\nif ( 0.5 * v8 <= (double)v16 )\n{\nv10 = *(_QWORD *)(a1 + 32);\nif ( v10 < 0 )\n{\nv12 = *(_QWORD *)(a1 + 32) & 1LL | ((unsigned __int64)v10 >> 1);\nv11 = (double)(int)v12 + (double)(int)v12;\n}\nelse\n{\nv11 = (double)(int)v10;\n}\nif ( 0.75 * v11 <= (double)v16 )\n{\nif ( 4LL * *(_QWORD *)(a1 + 32) >= (unsigned __int64)(unsigned int)v16 )\n{\nif ( 3LL * *(_QWORD *)(a1 + 32) >= (unsigned __int64)(unsigned int)v16 )\n{\nif ( 2LL * *(_QWORD *)(a1 + 32) < (unsigned __int64)(unsigned int)v16 )\nv17 = 150;\n}\nelse\n{\nv17 = 200;\n}\n}\nelse\n{\nv17 = 300;\n}\n}\nelse\n{\nv17 = 75;\n}\n}\nelse\n{\nv17 = 50;\n}\n}\nelse\n{\nv17 = 25;\n}\n}\nelse\n{\nv17 = 10;\n}\nif ( 0.3 * (double)*(int *)(a1 + 20) <= (double)v15 )\n{\nif ( 0.5 * (double)*(int *)(a1 + 20) <= (double)v15 )\n{\nif ( 0.75 * (double)*(int *)(a1 + 20) <= (double)v15 )\n{\nif ( v15 <= (unsigned int)(3 * *(_DWORD *)(a1 + 20)) )\n{\nif ( v15 <= (unsigned int)(2 * *(_DWORD *)(a1 + 20)) )\n{\nif ( (double)v15 > 1.5 * (double)*(int *)(a1 + 20) )\nv17 = (int)((double)v17 * 0.75);\n}\nelse\n{\nv17 = (int)((double)v17 * 0.5);\n}\n}\nelse\n{\nv17 = (int)((double)v17 * 0.25);\n}\n}\nelse\n{\nv17 = (int)((double)v17 * 1.5);\n}\n}\nelse\n{\nv17 *= 2;\n}\n}\nelse\n{\nv17 *= 3;\n}\nif ( *(_QWORD *)(a1 + 40) <= 3uLL )\n{\nif ( *(_QWORD *)(a1 + 40) )\n{\nv17 *= 2;\n--*(_QWORD *)(a1 + 40);\n}\n}\nelse\n{\nv17 *= 4;\n*(_QWORD *)(a1 + 40) -= 4LL;\n}\nv13 = *(_QWORD *)(a1 + 48);\nif ( v13 <= 0x19 )\n{\nif ( v13 >= 0xE )\n{\nv17 *= 4;\ngoto LABEL_52;\n}\nif ( v13 >= 8 )\n{\nv17 *= 3;\ngoto LABEL_52;\n}\nif ( v13 <= 3 )\ngoto LABEL_52;\nif ( v13 - 4 <= 3 )\n{\nv17 *= 2;\ngoto LABEL_52;\n}\n}\nv17 *= 5;\nLABEL_52:\nif ( (unsigned int)v17 > 0x640 )\nv17 = 1600;\nreturn (unsigned int)v17;\n}\n\n\n\nQ:[a1,v15,v16,v17,sub_40FEA3,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'q', 'v15': 'avg_bitmap_size', 'v16': 'avg_exec_us', 'v17': 'perf_score', 'sub_40FEA3': 'calculate_score'}"} |
|
mp_idx_block2pos | d736dcfb2a566676e23e29ec4567ab700b6a2408e30d1658f32151e812e1ec9f | lh3 | miniprot | NA | int32_t mp_idx_block2pos(const mp_idx_t *mi, uint32_t b)
{
return mp_idx_block2pos_core(mi->bo, mi->nt->n_ctg * 2, b);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_410BA0", "function_addr": 4262816, "binary_name": "d736dcfb2a566676e23e29ec4567ab700b6a2408e30d1658f32151e812e1ec9f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_C], esi"], [5, "mov rax, [rbp+var_8]"], [6, "mov rax, [rax+18h]"], [7, "mov eax, [rax]"], [8, "add eax, eax"], [9, "mov ecx, eax"], [10, "mov rax, [rbp+var_8]"], [11, "mov rax, [rax+30h]"], [12, "mov edx, [rbp+var_C]"], [13, "mov esi, ecx"], [14, "mov rdi, rax"], [15, "call sub_410AC6"], [16, "leave"], [17, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [9, 8], [10, 3], [11, 10], [12, 4], [13, 9], [14, 11], [17, 15]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d736dcfb2a566676e23e29ec4567ab700b6a2408e30d1658f32151e812e1ec9f_d736dcfb2a566676e23e29ec4567ab700b6a2408e30d1658f32151e812e1ec9f.jsonl.gz", "strip_func_name": "sub_410BA0", "query": "\n\n\n__int64 __fastcall sub_410BA0(__int64 a1, unsigned int a2)\n{\nreturn sub_410AC6(*(_QWORD *)(a1 + 48), 2 * **(_DWORD **)(a1 + 24), a2);\n}\n\n\n\nQ:[a1,a2,sub_410BA0,sub_410AC6,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'mi', 'a2': 'b', 'sub_410BA0': 'mp_idx_block2pos', 'sub_410AC6': 'mp_idx_block2pos_core'}"} |
|
print_Return_Enum | f46c50f99894dfa6a00bf5584dec5de415272e4f5270b530671574fa18458a48 | Seagate | openSeaChest | NA | void print_Return_Enum(char *funcName, int ret)
{
if (NULL == funcName)
{
printf("Unknown funtion returning: ");
}
else
{
printf("%s returning: ", funcName);
}
switch (ret)
{
case SUCCESS:
printf("SUCCESS\n");
break;
case FAILURE:
printf("FAILURE\n");
break;
case NOT_SUPPORTED:
printf("NOT SUPPORTED\n");
break;
case COMMAND_FAILURE:
printf("COMMAND FAILURE\n");
break;
case IN_PROGRESS:
printf("IN PROGRESS\n");
break;
case ABORTED:
printf("ABORTED\n");
break;
case BAD_PARAMETER:
printf("BAD PARAMETER\n");
break;
case MEMORY_FAILURE:
printf("MEMORY FAILURE\n");
break;
case OS_PASSTHROUGH_FAILURE:
printf("OS PASSTHROUGH FAILURE\n");
break;
case LIBRARY_MISMATCH:
printf("LIBRARY MISMATCH\n");
break;
case FROZEN:
printf("FROZEN\n");
break;
case PERMISSION_DENIED:
printf("PERMISSION DENIED\n");
break;
case FILE_OPEN_ERROR:
printf("FILE OPEN ERROR\n");
break;
case WARN_INCOMPLETE_RFTRS:
printf("WARNING INCOMPLETE RTFRS\n");
break;
case OS_COMMAND_TIMEOUT:
printf("COMMAND TIMEOUT\n");
break;
case WARN_NOT_ALL_DEVICES_ENUMERATED:
printf("WARNING NOT ALL DEVICES ENUMERATED\n");
break;
case WARN_INVALID_CHECKSUM:
printf("WARN INVALID CHECKSUM\n");
break;
case OS_COMMAND_NOT_AVAILABLE:
printf("OS COMMAND NOT AVAILABLE\n");
break;
case OS_COMMAND_BLOCKED:
printf("OS COMMAND BLOCKED\n");
break;
case COMMAND_INTERRUPTED:
printf("COMMAND INTERRUPTED\n");
break;
case VALIDATION_FAILURE:
printf("VALIDATION FAILURE\n");
break;
case STRIP_HDR_FOOTER_FAILURE:
printf("STRIP HDR FOOTER FAILURE\n");
break;
case PARSE_FAILURE:
printf("PARSE FAILURE\n");
break;
case INVALID_LENGTH:
printf("INVALID LENGTH\n");
break;
case ERROR_WRITING_FILE:
printf("ERROR WRITING FILE\n");
break;
case TIMEOUT:
printf("TIMEOUT\n");
break;
case OS_TIMEOUT_TOO_LARGE:
printf("OS TIMEOUT TOO LARGE\n");
break;
case PARSING_EXCEPTION_FAILURE:
printf("PARSING EXCEPTION FAILURE\n");
break;
case POWER_CYCLE_REQUIRED:
printf("POWER CYCLE REQUIRED\n");
break;
default:
printf("UNKNOWN: %d\n", ret);
break;
}
printf("\n");
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_47A9DE", "function_addr": 4696542, "binary_name": "f46c50f99894dfa6a00bf5584dec5de415272e4f5270b530671574fa18458a48.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, "cmp [rbp+var_8], 0"], [6, "jnz short loc_47AA07"], [7, "lea rdi, aUnknownFuntion"], [8, "mov eax, 0"], [9, "call _printf"], [10, "jmp short loc_47AA1F"], [11, "mov rax, [rbp+var_8]"], [12, "mov rsi, rax"], [13, "lea rdi, aSReturning"], [14, "mov eax, 0"], [15, "call _printf"], [16, "cmp [rbp+var_C], 1Eh"], [17, "ja def_47AA4A"], [18, "mov eax, [rbp+var_C]"], [19, "lea rdx, ds:0[rax*4]"], [20, "lea rax, jpt_47AA4A"], [21, "mov eax, ds:(jpt_47AA4A - 4C41F0h)[rdx+rax]"], [22, "cdqe"], [23, "lea rdx, jpt_47AA4A"], [24, "add rax, rdx"], [25, "jmp rax"], [26, "lea rdi, aSuccess_0"], [27, "call _puts"], [28, "jmp loc_47AC38"], [29, "lea rdi, aFailure"], [30, "call _puts"], [31, "jmp loc_47AC38"], [32, "lea rdi, aNotSupported_2"], [33, "call _puts"], [34, "jmp loc_47AC38"], [35, "lea rdi, aCommandFailure"], [36, "call _puts"], [37, "jmp loc_47AC38"], [38, "lea rdi, aInProgress"], [39, "call _puts"], [40, "jmp loc_47AC38"], [41, "lea rdi, aAborted"], [42, "call _puts"], [43, "jmp loc_47AC38"], [44, "lea rdi, aBadParameter"], [45, "call _puts"], [46, "jmp loc_47AC38"], [47, "lea rdi, aMemoryFailure"], [48, "call _puts"], [49, "jmp loc_47AC38"], [50, "lea rdi, aOsPassthroughF"], [51, "call _puts"], [52, "jmp loc_47AC38"], [53, "lea rdi, aLibraryMismatc"], [54, "call _puts"], [55, "jmp loc_47AC38"], [56, "lea rdi, aFrozen_0"], [57, "call _puts"], [58, "jmp loc_47AC38"], [59, "lea rdi, aPermissionDeni"], [60, "call _puts"], [61, "jmp loc_47AC38"], [62, "lea rdi, aFileOpenError"], [63, "call _puts"], [64, "jmp loc_47AC38"], [65, "lea rdi, aWarningIncompl"], [66, "call _puts"], [67, "jmp loc_47AC38"], [68, "lea rdi, aCommandTimeout_0"], [69, "call _puts"], [70, "jmp loc_47AC38"], [71, "lea rdi, aWarningNotAllD"], [72, "call _puts"], [73, "jmp loc_47AC38"], [74, "lea rdi, aWarnInvalidChe"], [75, "call _puts"], [76, "jmp loc_47AC38"], [77, "lea rdi, aOsCommandNotAv"], [78, "call _puts"], [79, "jmp loc_47AC38"], [80, "lea rdi, aOsCommandBlock"], [81, "call _puts"], [82, "jmp loc_47AC38"], [83, "lea rdi, aCommandInterru_0"], [84, "call _puts"], [85, "jmp loc_47AC38"], [86, "lea rdi, aValidationFail"], [87, "call _puts"], [88, "jmp loc_47AC38"], [89, "lea rdi, aStripHdrFooter"], [90, "call _puts"], [91, "jmp short loc_47AC38"], [92, "lea rdi, aParseFailure"], [93, "call _puts"], [94, "jmp short loc_47AC38"], [95, "lea rdi, aInvalidLength"], [96, "call _puts"], [97, "jmp short loc_47AC38"], [98, "lea rdi, aErrorWritingFi"], [99, "call _puts"], [100, "jmp short loc_47AC38"], [101, "lea rdi, aTimeout"], [102, "call _puts"], [103, "jmp short loc_47AC38"], [104, "lea rdi, aOsTimeoutTooLa"], [105, "call _puts"], [106, "jmp short loc_47AC38"], [107, "lea rdi, aParsingExcepti"], [108, "call _puts"], [109, "jmp short loc_47AC38"], [110, "lea rdi, aPowerCycleRequ"], [111, "call _puts"], [112, "jmp short loc_47AC38"], [113, "mov eax, [rbp+var_C]"], [114, "mov esi, eax"], [115, "lea rdi, aUnknownD"], [116, "mov eax, 0"], [117, "call _printf"], [118, "nop"], [119, "mov edi, 0Ah"], [120, "call _putchar"], [121, "nop"], [122, "leave"], [123, "retn"]], "data_dep": [[5, 3], [6, 5], [11, 3], [12, 11], [16, 4], [17, 16], [18, 4], [20, 18], [23, 19], [24, 23], [24, 21], [25, 24], [26, 7], [26, 13], [29, 7], [29, 13], [32, 7], [32, 13], [35, 7], [35, 13], [38, 7], [38, 13], [41, 7], [41, 13], [44, 7], [44, 13], [47, 7], [47, 13], [50, 7], [50, 13], [53, 7], [53, 13], [56, 7], [56, 13], [59, 7], [59, 13], [62, 13], [62, 7], [65, 13], [65, 7], [68, 13], [68, 7], [71, 13], [71, 7], [74, 13], [74, 7], [77, 7], [77, 13], [80, 13], [80, 7], [83, 7], [83, 13], [86, 13], [86, 7], [89, 13], [89, 7], [92, 7], [92, 13], [95, 13], [95, 7], [98, 13], [98, 7], [101, 13], [101, 7], [104, 13], [104, 7], [107, 7], [107, 13], [110, 13], [110, 7], [113, 4], [114, 113], [115, 13], [115, 7], [123, 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/f46c50f99894dfa6a00bf5584dec5de415272e4f5270b530671574fa18458a48_f46c50f99894dfa6a00bf5584dec5de415272e4f5270b530671574fa18458a48.jsonl.gz", "strip_func_name": "sub_47A9DE", "query": "\n\n\nint __fastcall sub_47A9DE(const char *a1, unsigned int a2)\n{\nif ( a1 )\nprintf(\"%s returning: \", a1);\nelse\nprintf(\"Unknown funtion returning: \");\nswitch ( a2 )\n{\ncase 0u:\nputs(\"SUCCESS\");\nbreak;\ncase 1u:\nputs(\"FAILURE\");\nbreak;\ncase 2u:\nputs(\"NOT SUPPORTED\");\nbreak;\ncase 3u:\nputs(\"COMMAND FAILURE\");\nbreak;\ncase 4u:\nputs(\"IN PROGRESS\");\nbreak;\ncase 5u:\nputs(\"ABORTED\");\nbreak;\ncase 6u:\nputs(\"BAD PARAMETER\");\nbreak;\ncase 7u:\nputs(\"MEMORY FAILURE\");\nbreak;\ncase 8u:\nputs(\"OS PASSTHROUGH FAILURE\");\nbreak;\ncase 9u:\nputs(\"LIBRARY MISMATCH\");\nbreak;\ncase 0xAu:\nputs(\"FROZEN\");\nbreak;\ncase 0xBu:\nputs(\"PERMISSION DENIED\");\nbreak;\ncase 0xCu:\nputs(\"FILE OPEN ERROR\");\nbreak;\ncase 0xDu:\nputs(\"WARNING INCOMPLETE RTFRS\");\nbreak;\ncase 0xEu:\nputs(\"COMMAND TIMEOUT\");\nbreak;\ncase 0xFu:\nputs(\"WARNING NOT ALL DEVICES ENUMERATED\");\nbreak;\ncase 0x10u:\nputs(\"WARN INVALID CHECKSUM\");\nbreak;\ncase 0x11u:\nputs(\"OS COMMAND NOT AVAILABLE\");\nbreak;\ncase 0x12u:\nputs(\"OS COMMAND BLOCKED\");\nbreak;\ncase 0x13u:\nputs(\"COMMAND INTERRUPTED\");\nbreak;\ncase 0x14u:\nputs(\"VALIDATION FAILURE\");\nbreak;\ncase 0x15u:\nputs(\"STRIP HDR FOOTER FAILURE\");\nbreak;\ncase 0x16u:\nputs(\"PARSE FAILURE\");\nbreak;\ncase 0x17u:\nputs(\"INVALID LENGTH\");\nbreak;\ncase 0x18u:\nputs(\"ERROR WRITING FILE\");\nbreak;\ncase 0x19u:\nputs(\"TIMEOUT\");\nbreak;\ncase 0x1Au:\nputs(\"OS TIMEOUT TOO LARGE\");\nbreak;\ncase 0x1Bu:\nputs(\"PARSING EXCEPTION FAILURE\");\nbreak;\ncase 0x1Eu:\nputs(\"POWER CYCLE REQUIRED\");\nbreak;\ndefault:\nprintf(\"UNKNOWN: %d\\n\", a2);\nbreak;\n}\nreturn putchar(10);\n}\n\n\n\nQ:[a1,sub_47A9DE,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'funcName', 'sub_47A9DE': 'print_Return_Enum'}"} |
|
NoralsyDemod_AM | 4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487 | nccgroup | proxmark3-amiimicyou | NA | int NoralsyDemod_AM(uint8_t *dest, size_t *size) {
if (*size < 96) return -1; //make sure buffer has data
size_t startIdx = 0;
uint8_t preamble[] = {1,0,1,1,1,0,1,1,0,0,0,0};
if (!preambleSearch(dest, preamble, sizeof(preamble), size, &startIdx))
return -2; //preamble not found
if (*size != 96) return -3; //wrong demoded size
//return start position
return (int)startIdx;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "NoralsyDemod_AM", "function_addr": 4536836, "binary_name": "4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487.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]"], [7, "cmp rax, 5Fh "], [8, "ja short loc_453A28"], [9, "mov eax, 0FFFFFFFFh"], [10, "jmp short locret_453A8B"], [11, "mov [rbp+var_8], 0"], [12, "mov rax, 101000101010001h"], [13, "mov [rbp+var_14], rax"], [14, "mov [rbp+var_C], 0"], [15, "lea rcx, [rbp+var_8]"], [16, "mov rdx, [rbp+var_30]"], [17, "lea rsi, [rbp+var_14]"], [18, "mov rax, [rbp+var_28]"], [19, "mov r8, rcx"], [20, "mov rcx, rdx"], [21, "mov edx, 0Ch"], [22, "mov rdi, rax"], [23, "call preambleSearch"], [24, "test al, al"], [25, "jnz short loc_453A73"], [26, "mov eax, 0FFFFFFFEh"], [27, "jmp short locret_453A8B"], [28, "mov rax, [rbp+var_30]"], [29, "mov rax, [rax]"], [30, "cmp rax, 60h "], [31, "jz short loc_453A87"], [32, "mov eax, 0FFFFFFFDh"], [33, "jmp short locret_453A8B"], [34, "mov rax, [rbp+var_8]"], [35, "leave"], [36, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 7], [13, 12], [15, 11], [16, 4], [17, 13], [18, 3], [19, 15], [20, 16], [22, 18], [24, 23], [25, 24], [28, 4], [29, 28], [30, 29], [31, 30], [34, 11], [36, 34], [36, 9], [36, 26], [36, 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/4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487_4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487.jsonl.gz", "strip_func_name": "NoralsyDemod_AM", "query": "\n\n\n__int64 __fastcall NoralsyDemod_AM(__int64 a1, size_t *a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10)\n{\n__int64 v11; // [rsp+1Ch] [rbp-14h] BYREF\nint v12; // [rsp+24h] [rbp-Ch]\nunsigned __int64 v13; // [rsp+28h] [rbp-8h] BYREF\n\nif ( *a2 <= 0x5F )\nreturn 0xFFFFFFFFLL;\nv13 = 0LL;\nv11 = 0x101000101010001LL;\nv12 = 0;\nif ( !(unsigned __int8)preambleSearch(a1, &v11, 0xCuLL, a2, &v13, a3, a4, a5, a6, a7, a8, a9, a10) )\nreturn 4294967294LL;\nif ( *a2 == 96 )\nreturn v13;\nreturn 4294967293LL;\n}\n\n\n\nQ:[a1,a2,v11,v13,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'dest', 'a2': 'size', 'v11': 'preamble', 'v13': 'startIdx'}"} |
|
sim_strcasecmp | b3a8b4769bdb267a1562d144bd5416f56584185a8ee940d909e9d5c1f4737051 | open-simh | simh | NA | int sim_strcasecmp (const char *string1, const char *string2)
{
size_t i = 0;
unsigned char s1, s2;
while (1) {
s1 = (unsigned char)string1[i];
s2 = (unsigned char)string2[i];
s1 = (unsigned char)sim_toupper (s1);
s2 = (unsigned char)sim_toupper (s2);
if (s1 == s2) {
if (s1 == 0)
return 0;
i++;
continue;
}
if (s1 < s2)
return -1;
if (s1 > s2)
return 1;
}
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43EF11", "function_addr": 4452113, "binary_name": "b3a8b4769bdb267a1562d144bd5416f56584185a8ee940d909e9d5c1f4737051.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_8], 0"], [6, "mov rdx, [rbp+var_18]"], [7, "mov rax, [rbp+var_8]"], [8, "add rax, rdx"], [9, "movzx eax, byte ptr [rax]"], [10, "mov [rbp+var_9], al"], [11, "mov rdx, [rbp+var_20]"], [12, "mov rax, [rbp+var_8]"], [13, "add rax, rdx"], [14, "movzx eax, byte ptr [rax]"], [15, "mov [rbp+var_A], al"], [16, "movzx eax, [rbp+var_9]"], [17, "mov edi, eax"], [18, "call sub_43ED69"], [19, "mov [rbp+var_9], al"], [20, "movzx eax, [rbp+var_A]"], [21, "mov edi, eax"], [22, "call sub_43ED69"], [23, "mov [rbp+var_A], al"], [24, "movzx eax, [rbp+var_9]"], [25, "cmp al, [rbp+var_A]"], [26, "jnz short loc_43EF84"], [27, "cmp [rbp+var_9], 0"], [28, "jnz short loc_43EF7D"], [29, "mov eax, 0"], [30, "jmp short locret_43EFA6"], [31, "add [rbp+var_8], 1"], [32, "jmp short loc_43EFA4"], [33, "movzx eax, [rbp+var_9]"], [34, "cmp al, [rbp+var_A]"], [35, "jnb short loc_43EF94"], [36, "mov eax, 0FFFFFFFFh"], [37, "jmp short locret_43EFA6"], [38, "movzx eax, [rbp+var_9]"], [39, "cmp al, [rbp+var_A]"], [40, "jbe short loc_43EF29"], [41, "mov eax, 1"], [42, "jmp short locret_43EFA6"], [43, "jmp short loc_43EF29"], [44, "leave"], [45, "retn"]], "data_dep": [[6, 3], [7, 31], [7, 5], [8, 6], [8, 7], [9, 8], [10, 9], [11, 4], [12, 31], [12, 5], [13, 11], [13, 12], [14, 13], [15, 14], [16, 10], [17, 16], [19, 18], [20, 15], [21, 20], [23, 22], [24, 19], [25, 23], [25, 24], [26, 25], [27, 19], [28, 27], [31, 5], [31, 31], [33, 19], [34, 33], [34, 23], [35, 34], [38, 19], [39, 23], [39, 38], [40, 39], [45, 36], [45, 29], [45, 41]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/b3a8b4769bdb267a1562d144bd5416f56584185a8ee940d909e9d5c1f4737051_b3a8b4769bdb267a1562d144bd5416f56584185a8ee940d909e9d5c1f4737051.jsonl.gz", "strip_func_name": "sub_43EF11", "query": "\n\n\n__int64 __fastcall sub_43EF11(__int64 a1, __int64 a2)\n{\nunsigned __int8 v3; // [rsp+16h] [rbp-Ah]\nunsigned __int8 v4; // [rsp+16h] [rbp-Ah]\nunsigned __int8 v5; // [rsp+17h] [rbp-9h]\n__int64 v6; // [rsp+18h] [rbp-8h]\n\nv6 = 0LL;\ndo\n{\nwhile ( 1 )\n{\nv3 = *(_BYTE *)(a2 + v6);\nv5 = sub_43ED69(*(unsigned __int8 *)(a1 + v6));\nv4 = sub_43ED69(v3);\nif ( v5 != v4 )\nbreak;\nif ( !v5 )\nreturn 0LL;\n++v6;\n}\nif ( v5 < v4 )\nreturn 0xFFFFFFFFLL;\n}\nwhile ( v5 <= v4 );\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,v4,v5,sub_43EF11,sub_43ED69,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'string1', 'a2': 'string2', 'v4': 's2a', 'v5': 's1', 'sub_43EF11': 'sim_strcasecmp', 'sub_43ED69': 'sim_toupper'}"} |
|
check_clone_fd_nonblock | 2e1e7204c4dd2ef3c7ca73a5aa90b16cb36b5b44408429db18252136633193d2 | google | capsicum-linux | NA | static int check_clone_fd_nonblock(void)
{
int fail = 0;
pid_t child, reaped;
int fd = -1;
int rc, status;
struct clonefd_info fdinfo;
struct pollfd fdp;
child = clone4_(SIGCHLD|CLONE_FD, NULL, NULL, NULL, &fd,
CLONEFD_NONBLOCK);
if (child == 0)
exit(child_wait_then_exit(NULL));
vprintf("[%d] clone4() returned child=%d fd=%d errno=%d\n",
gettid_(), child, fd, errno);
ASSERT(child > 0);
/* Check NONBLOCK status */
rc = fcntl(fd, F_GETFL, 0);
EXPECT(rc & O_NONBLOCK);
/* Read doesn't block */
errno = 0;
rc = read(fd, &fdinfo, sizeof(fdinfo));
EXPECT(rc == -1);
EXPECT(errno == EWOULDBLOCK || errno == EAGAIN);
/* Wait on the file descriptor for child exit. */
fdp.fd = fd;
fdp.events = POLLIN | POLLERR | POLLHUP;
fdp.revents = 0;
do {
rc = poll(&fdp, 1, 5000);
} while (rc == -1 && errno == EINTR);
EXPECT(rc == 1);
EXPECT(fdp.revents & POLLHUP);
EXPECT(fdp.revents & POLLIN);
EXPECT(sigchld_count == 1);
/* Read now retrieves status info */
rc = read(fd, &fdinfo, sizeof(fdinfo));
EXPECT(rc == sizeof(fdinfo));
vprintf("[%d] read(%d): {code=%u, status=%u, utime=%lu, stime=%lu}\n",
gettid_(), fd, fdinfo.code, fdinfo.status,
(long)fdinfo.utime, (long)fdinfo.stime);
EXPECT(fdinfo.code == CLD_EXITED);
EXPECT(WIFEXITED(fdinfo.status));
EXPECT(WEXITSTATUS(fdinfo.status) == 0);
/* Still need to reap the child */
EXPECT(pid_present(child));
reaped = waitpid(child, &status, 0);
EXPECT(reaped == child);
EXPECT(!pid_present(child));
EXPECT(WIFEXITED(status));
EXPECT(WEXITSTATUS(status) == 0);
close(fd);
return fail;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403310", "function_addr": 4207376, "binary_name": "2e1e7204c4dd2ef3c7ca73a5aa90b16cb36b5b44408429db18252136633193d2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r15"], [3, "push r14"], [4, "push r13"], [5, "push r12"], [6, "push rbx"], [7, "sub rsp, 48h"], [8, "mov [rbp+var_34], 0"], [9, "mov [rbp+fd], 0FFFFFFFFh"], [10, "lea rax, [rbp+fd]"], [11, "mov r9d, 2"], [12, "mov r8, rax"], [13, "mov ecx, 0"], [14, "mov edx, 0"], [15, "mov esi, 0"], [16, "mov edi, 400011h"], [17, "call sub_4014BB"], [18, "mov [rbp+pid], eax"], [19, "cmp [rbp+pid], 0"], [20, "jnz short loc_40336F"], [21, "mov edi, 0"], [22, "call sub_4013E3"], [23, "mov edi, eax"], [24, "call _exit"], [25, "mov rax, cs:qword_407138"], [26, "test rax, rax"], [27, "jz short loc_4033A6"], [28, "call ___errno_location"], [29, "mov r12d, [rax]"], [30, "mov ebx, [rbp+fd]"], [31, "call sub_4012A2"], [32, "mov esi, eax"], [33, "mov eax, [rbp+pid]"], [34, "mov r8d, r12d"], [35, "mov ecx, ebx"], [36, "mov edx, eax"], [37, "mov edi, offset aDClone4Returne_0"], [38, "mov eax, 0"], [39, "call _printf"], [40, "cmp [rbp+pid], 0"], [41, "jg short loc_4033D6"], [42, "mov ecx, offset aChild0"], [43, "mov edx, 1FFh"], [44, "mov esi, offset aClone4C"], [45, "mov edi, offset aSDExpectationS"], [46, "mov eax, 0"], [47, "call _printf"], [48, "add [rbp+var_34], 1"], [49, "mov eax, [rbp+var_34]"], [50, "jmp loc_4037B5"], [51, "mov eax, [rbp+fd]"], [52, "mov edx, 0"], [53, "mov esi, 3"], [54, "mov edi, eax"], [55, "mov eax, 0"], [56, "call _fcntl"], [57, "mov [rbp+var_3C], eax"], [58, "mov eax, [rbp+var_3C]"], [59, "and eax, 800h"], [60, "test eax, eax"], [61, "jnz short loc_403420"], [62, "mov ecx, offset aRcONonblock"], [63, "mov edx, 203h"], [64, "mov esi, offset aClone4C"], [65, "mov edi, offset aSDExpectationS"], [66, "mov eax, 0"], [67, "call _printf"], [68, "add [rbp+var_34], 1"], [69, "call ___errno_location"], [70, "mov dword ptr [rax], 0"], [71, "mov eax, [rbp+fd]"], [72, "lea rcx, [rbp+buf]"], [73, "mov edx, 18h"], [74, "mov rsi, rcx"], [75, "mov edi, eax"], [76, "call _read"], [77, "mov [rbp+var_3C], eax"], [78, "cmp [rbp+var_3C], 0FFFFFFFFh"], [79, "jz short loc_40346C"], [80, "mov ecx, offset aRc1_0"], [81, "mov edx, 208h"], [82, "mov esi, offset aClone4C"], [83, "mov edi, offset aSDExpectationS"], [84, "mov eax, 0"], [85, "call _printf"], [86, "add [rbp+var_34], 1"], [87, "call ___errno_location"], [88, "mov eax, [rax]"], [89, "cmp eax, 0Bh"], [90, "jz short loc_4034A6"], [91, "call ___errno_location"], [92, "mov eax, [rax]"], [93, "cmp eax, 0Bh"], [94, "jz short loc_4034A6"], [95, "mov ecx, offset aErrnoEwouldblo"], [96, "mov edx, 209h"], [97, "mov esi, offset aClone4C"], [98, "mov edi, offset aSDExpectationS"], [99, "mov eax, 0"], [100, "call _printf"], [101, "add [rbp+var_34], 1"], [102, "mov eax, [rbp+fd]"], [103, "mov [rbp+fds.fd], eax"], [104, "mov [rbp+fds.events], 19h"], [105, "mov [rbp+fds.revents], 0"], [106, "lea rax, [rbp+fds]"], [107, "mov edx, 1388h"], [108, "mov esi, 1"], [109, "mov rdi, rax"], [110, "call _poll"], [111, "mov [rbp+var_3C], eax"], [112, "cmp [rbp+var_3C], 0FFFFFFFFh"], [113, "jnz short loc_4034E3"], [114, "call ___errno_location"], [115, "mov eax, [rax]"], [116, "cmp eax, 4"], [117, "jz short loc_4034B8"], [118, "cmp [rbp+var_3C], 1"], [119, "jz short loc_40350B"], [120, "mov ecx, offset aRc1"], [121, "mov edx, 212h"], [122, "mov esi, offset aClone4C"], [123, "mov edi, offset aSDExpectationS"], [124, "mov eax, 0"], [125, "call _printf"], [126, "add [rbp+var_34], 1"], [127, "movzx eax, [rbp+fds.revents]"], [128, "cwde"], [129, "and eax, 10h"], [130, "test eax, eax"], [131, "jnz short loc_403539"], [132, "mov ecx, offset aFdpReventsPoll"], [133, "mov edx, 213h"], [134, "mov esi, offset aClone4C"], [135, "mov edi, offset aSDExpectationS"], [136, "mov eax, 0"], [137, "call _printf"], [138, "add [rbp+var_34], 1"], [139, "movzx eax, [rbp+fds.revents]"], [140, "cwde"], [141, "and eax, 1"], [142, "test eax, eax"], [143, "jnz short loc_403567"], [144, "mov ecx, offset aFdpReventsPoll_0"], [145, "mov edx, 214h"], [146, "mov esi, offset aClone4C"], [147, "mov edi, offset aSDExpectationS"], [148, "mov eax, 0"], [149, "call _printf"], [150, "add [rbp+var_34], 1"], [151, "mov eax, cs:dword_407140"], [152, "cmp eax, 1"], [153, "jz short loc_403594"], [154, "mov ecx, offset aSigchldCount1"], [155, "mov edx, 215h"], [156, "mov esi, offset aClone4C"], [157, "mov edi, offset aSDExpectationS"], [158, "mov eax, 0"], [159, "call _printf"], [160, "add [rbp+var_34], 1"], [161, "mov eax, [rbp+fd]"], [162, "lea rcx, [rbp+buf]"], [163, "mov edx, 18h"], [164, "mov rsi, rcx"], [165, "mov edi, eax"], [166, "call _read"], [167, "mov [rbp+var_3C], eax"], [168, "cmp [rbp+var_3C], 18h"], [169, "jz short loc_4035D5"], [170, "mov ecx, offset aRcSizeofFdinfo"], [171, "mov edx, 219h"], [172, "mov esi, offset aClone4C"], [173, "mov edi, offset aSDExpectationS"], [174, "mov eax, 0"], [175, "call _printf"], [176, "add [rbp+var_34], 1"], [177, "mov rax, cs:qword_407138"], [178, "test rax, rax"], [179, "jz short loc_403625"], [180, "mov rax, [rbp+var_50]"], [181, "mov r14, rax"], [182, "mov rax, [rbp+var_58]"], [183, "mov r15, rax"], [184, "mov r13d, [rbp+var_5C]"], [185, "mov r12d, [rbp+buf]"], [186, "mov ebx, [rbp+fd]"], [187, "call sub_4012A2"], [188, "sub rsp, 8"], [189, "push r14"], [190, "mov r9, r15"], [191, "mov r8d, r13d"], [192, "mov ecx, r12d"], [193, "mov edx, ebx"], [194, "mov esi, eax"], [195, "mov edi, offset aDReadDCodeUSta"], [196, "mov eax, 0"], [197, "call _printf"], [198, "add rsp, 10h"], [199, "mov eax, [rbp+buf]"], [200, "cmp eax, 1"], [201, "jz short loc_40364F"], [202, "mov ecx, offset aFdinfoCodeCldE"], [203, "mov edx, 21Dh"], [204, "mov esi, offset aClone4C"], [205, "mov edi, offset aSDExpectationS"], [206, "mov eax, 0"], [207, "call _printf"], [208, "add [rbp+var_34], 1"], [209, "mov eax, [rbp+var_5C]"], [210, "and eax, 7Fh"], [211, "test eax, eax"], [212, "jz short loc_40367B"], [213, "mov ecx, offset aWifexitedFdinf"], [214, "mov edx, 21Eh"], [215, "mov esi, offset aClone4C"], [216, "mov edi, offset aSDExpectationS"], [217, "mov eax, 0"], [218, "call _printf"], [219, "add [rbp+var_34], 1"], [220, "mov eax, [rbp+var_5C]"], [221, "sar eax, 8"], [222, "movzx eax, al"], [223, "test eax, eax"], [224, "jz short loc_4036AA"], [225, "mov ecx, offset aWexitstatusFdi"], [226, "mov edx, 21Fh"], [227, "mov esi, offset aClone4C"], [228, "mov edi, offset aSDExpectationS"], [229, "mov eax, 0"], [230, "call _printf"], [231, "add [rbp+var_34], 1"], [232, "mov eax, [rbp+pid]"], [233, "mov edi, eax"], [234, "call sub_4012B7"], [235, "test eax, eax"], [236, "jnz short loc_4036DA"], [237, "mov ecx, offset aPidPresentChil"], [238, "mov edx, 222h"], [239, "mov esi, offset aClone4C"], [240, "mov edi, offset aSDExpectationS"], [241, "mov eax, 0"], [242, "call _printf"], [243, "add [rbp+var_34], 1"], [244, "lea rcx, [rbp+stat_loc]"], [245, "mov eax, [rbp+pid]"], [246, "mov edx, 0"], [247, "mov rsi, rcx"], [248, "mov edi, eax"], [249, "call _waitpid"], [250, "mov [rbp+var_40], eax"], [251, "mov eax, [rbp+var_40]"], [252, "cmp eax, [rbp+pid]"], [253, "jz short loc_40371D"], [254, "mov ecx, offset aReapedChild"], [255, "mov edx, 224h"], [256, "mov esi, offset aClone4C"], [257, "mov edi, offset aSDExpectationS"], [258, "mov eax, 0"], [259, "call _printf"], [260, "add [rbp+var_34], 1"], [261, "mov eax, [rbp+pid]"], [262, "mov edi, eax"], [263, "call sub_4012B7"], [264, "test eax, eax"], [265, "jz short loc_40374D"], [266, "mov ecx, offset aPidPresentChil_0"], [267, "mov edx, 225h"], [268, "mov esi, offset aClone4C"], [269, "mov edi, offset aSDExpectationS"], [270, "mov eax, 0"], [271, "call _printf"], [272, "add [rbp+var_34], 1"], [273, "mov eax, [rbp+stat_loc]"], [274, "and eax, 7Fh"], [275, "test eax, eax"], [276, "jz short loc_403779"], [277, "mov ecx, offset aWifexitedStatu"], [278, "mov edx, 226h"], [279, "mov esi, offset aClone4C"], [280, "mov edi, offset aSDExpectationS"], [281, "mov eax, 0"], [282, "call _printf"], [283, "add [rbp+var_34], 1"], [284, "mov eax, [rbp+stat_loc]"], [285, "sar eax, 8"], [286, "movzx eax, al"], [287, "test eax, eax"], [288, "jz short loc_4037A8"], [289, "mov ecx, offset aWexitstatusSta"], [290, "mov edx, 227h"], [291, "mov esi, offset aClone4C"], [292, "mov edi, offset aSDExpectationS"], [293, "mov eax, 0"], [294, "call _printf"], [295, "add [rbp+var_34], 1"], [296, "mov eax, [rbp+fd]"], [297, "mov edi, eax"], [298, "call _close"], [299, "mov eax, [rbp+var_34]"], [300, "lea rsp, [rbp-28h]"], [301, "pop rbx"], [302, "pop r12"], [303, "pop r13"], [304, "pop r14"], [305, "pop r15"], [306, "pop rbp"], [307, "retn"]], "data_dep": [[10, 9], [12, 10], [18, 17], [19, 18], [20, 19], [23, 22], [26, 25], [27, 26], [29, 28], [30, 9], [32, 31], [33, 18], [34, 29], [35, 30], [36, 33], [40, 18], [41, 40], [48, 8], [49, 48], [51, 9], [54, 51], [57, 56], [58, 57], [59, 58], [60, 59], [61, 60], [68, 8], [70, 69], [71, 9], [72, 13], [72, 35], [72, 62], [74, 72], [75, 71], [77, 76], [78, 77], [79, 78], [86, 68], [86, 8], [88, 87], [88, 70], [89, 88], [90, 89], [92, 70], [92, 91], [93, 92], [94, 93], [101, 68], [101, 86], [101, 8], [102, 9], [103, 102], [106, 102], [106, 115], [109, 106], [111, 110], [112, 111], [113, 112], [115, 114], [115, 70], [116, 115], [117, 116], [118, 111], [119, 118], [126, 101], [126, 68], [126, 86], [126, 8], [127, 105], [129, 127], [130, 129], [131, 130], [138, 68], [138, 86], [138, 8], [138, 126], [138, 101], [139, 105], [141, 139], [142, 141], [143, 142], [150, 68], [150, 86], [150, 8], [150, 138], [150, 126], [150, 101], [152, 151], [153, 152], [160, 68], [160, 86], [160, 150], [160, 8], [160, 138], [160, 126], [160, 101], [161, 9], [162, 80], [162, 144], [162, 132], [162, 95], [162, 72], [162, 154], [162, 120], [164, 162], [165, 161], [167, 166], [168, 167], [169, 168], [176, 160], [176, 68], [176, 86], [176, 150], [176, 8], [176, 138], [176, 126], [176, 101], [178, 177], [179, 178], [181, 180], [183, 182], [186, 9], [188, 7], [189, 181], [190, 183], [191, 184], [192, 185], [193, 186], [194, 187], [198, 188], [200, 199], [201, 200], [208, 68], [208, 86], [208, 150], [208, 8], [208, 138], [208, 126], [208, 101], [208, 176], [208, 160], [210, 209], [211, 210], [212, 211], [219, 101], [219, 176], [219, 160], [219, 68], [219, 86], [219, 150], [219, 8], [219, 138], [219, 126], [219, 208], [221, 220], [222, 221], [223, 222], [224, 223], [231, 86], [231, 150], [231, 8], [231, 138], [231, 101], [231, 126], [231, 208], [231, 176], [231, 160], [231, 68], [231, 219], [232, 18], [233, 232], [235, 234], [236, 235], [243, 126], [243, 208], [243, 101], [243, 231], [243, 176], [243, 160], [243, 219], [243, 68], [243, 86], [243, 150], [243, 8], [243, 138], [244, 237], [244, 225], [244, 170], [244, 202], [244, 213], [244, 192], [244, 162], [245, 18], [247, 244], [248, 245], [250, 249], [251, 250], [252, 18], [252, 251], [253, 252], [260, 126], [260, 208], [260, 101], [260, 231], [260, 176], [260, 160], [260, 68], [260, 219], [260, 243], [260, 86], [260, 150], [260, 8], [260, 138], [261, 18], [262, 261], [264, 263], [265, 264], [272, 208], [272, 101], [272, 231], [272, 176], [272, 160], [272, 219], [272, 68], [272, 260], [272, 86], [272, 150], [272, 8], [272, 138], [272, 243], [272, 126], [274, 273], [275, 274], [276, 275], [283, 101], [283, 160], [283, 126], [283, 208], [283, 272], [283, 231], [283, 176], [283, 68], [283, 260], [283, 219], [283, 86], [283, 150], [283, 243], [283, 8], [283, 138], [285, 284], [286, 285], [287, 286], [288, 287], [295, 219], [295, 283], [295, 86], [295, 150], [295, 8], [295, 138], [295, 243], [295, 126], [295, 208], [295, 272], [295, 101], [295, 231], [295, 176], [295, 160], [295, 68], [295, 260], [296, 9], [297, 296], [299, 219], [299, 283], [299, 86], [299, 150], [299, 243], [299, 126], [299, 8], [299, 138], [299, 101], [299, 231], [299, 295], [299, 160], [299, 208], [299, 272], [299, 176], [299, 68], [299, 260], [300, 7], [300, 198], [301, 6], [302, 5], [303, 4], [304, 189], [304, 3], [305, 2], [306, 0], [307, 299], [307, 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/2e1e7204c4dd2ef3c7ca73a5aa90b16cb36b5b44408429db18252136633193d2_2e1e7204c4dd2ef3c7ca73a5aa90b16cb36b5b44408429db18252136633193d2.jsonl.gz", "strip_func_name": "sub_403310", "query": "\n\n\n__int64 sub_403310()\n{\nint v0; // eax\nunsigned int v1; // er12\nunsigned int v2; // ebx\nunsigned int v3; // eax\n__int64 result; // rax\nunsigned __int64 v5; // rdi\n__int64 v6; // r14\n__int64 v7; // r15\nunsigned int v8; // er13\nunsigned int v9; // er12\nunsigned int v10; // ebx\nunsigned int v11; // eax\nstruct pollfd fds; // [rsp+8h] [rbp-68h] BYREF\nunsigned int buf; // [rsp+10h] [rbp-60h] BYREF\nunsigned int v14; // [rsp+14h] [rbp-5Ch]\n__int64 v15; // [rsp+18h] [rbp-58h]\n__int64 v16; // [rsp+20h] [rbp-50h]\nint stat_loc; // [rsp+28h] [rbp-48h] BYREF\nint fd; // [rsp+2Ch] [rbp-44h] BYREF\n__pid_t v19; // [rsp+30h] [rbp-40h]\nint v20; // [rsp+34h] [rbp-3Ch]\n__pid_t pid; // [rsp+38h] [rbp-38h]\nunsigned int v22; // [rsp+3Ch] [rbp-34h]\n\nv22 = 0;\nfd = -1;\npid = sub_4014BB(4194321LL, 0LL, 0LL, 0LL, &fd, 2LL);\nif ( !pid )\n{\nv0 = sub_4013E3(0LL);\nexit(v0);\n}\nif ( qword_407138 )\n{\nv1 = *__errno_location();\nv2 = fd;\nv3 = sub_4012A2(4194321LL);\nprintf(\"[%d] clone4() returned child=%d fd=%d errno=%d\\n\", v3, (unsigned int)pid, v2, v1);\n}\nif ( pid > 0 )\n{\nv20 = fcntl(fd, 3, 0LL);\nif ( (v20 & 0x800) == 0 )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 515LL, \"rc & O_NONBLOCK\");\n++v22;\n}\n*__errno_location() = 0;\nv20 = read(fd, &buf, 0x18uLL);\nif ( v20 != -1 )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 520LL, \"rc == -1\");\n++v22;\n}\nif ( *__errno_location() != 11 && *__errno_location() != 11 )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 521LL, \"errno == EWOULDBLOCK || errno == EAGAIN\");\n++v22;\n}\nfds.fd = fd;\nfds.events = 25;\nfds.revents = 0;\ndo\nv20 = poll(&fds, 1uLL, 5000);\nwhile ( v20 == -1 && *__errno_location() == 4 );\nif ( v20 != 1 )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 530LL, \"rc == 1\");\n++v22;\n}\nif ( (fds.revents & 0x10) == 0 )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 531LL, \"fdp.revents & POLLHUP\");\n++v22;\n}\nif ( (fds.revents & 1) == 0 )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 532LL, \"fdp.revents & POLLIN\");\n++v22;\n}\nif ( dword_407140 != 1 )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 533LL, \"sigchld_count == 1\");\n++v22;\n}\nv5 = (unsigned int)fd;\nv20 = read(fd, &buf, 0x18uLL);\nif ( v20 != 24 )\n{\nv5 = (unsigned __int64)\"%s:%d: expectation '%s' failed\\n\";\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 537LL, \"rc == sizeof(fdinfo)\");\n++v22;\n}\nif ( qword_407138 )\n{\nv6 = v16;\nv7 = v15;\nv8 = v14;\nv9 = buf;\nv10 = fd;\nv11 = sub_4012A2(v5);\nprintf(\"[%d] read(%d): {code=%u, status=%u, utime=%lu, stime=%lu}\\n\", v11, v10, v9, v8, v7, v6);\n}\nif ( buf != 1 )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 541LL, \"fdinfo.code == CLD_EXITED\");\n++v22;\n}\nif ( (v14 & 0x7F) != 0 )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 542LL, \"WIFEXITED(fdinfo.status)\");\n++v22;\n}\nif ( BYTE1(v14) )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 543LL, \"WEXITSTATUS(fdinfo.status) == 0\");\n++v22;\n}\nif ( !sub_4012B7(pid) )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 546LL, \"pid_present(child)\");\n++v22;\n}\nv19 = waitpid(pid, &stat_loc, 0);\nif ( v19 != pid )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 548LL, \"reaped == child\");\n++v22;\n}\nif ( sub_4012B7(pid) )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 549LL, \"!pid_present(child)\");\n++v22;\n}\nif ( (stat_loc & 0x7F) != 0 )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 550LL, \"WIFEXITED(status)\");\n++v22;\n}\nif ( BYTE1(stat_loc) )\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 551LL, \"WEXITSTATUS(status) == 0\");\n++v22;\n}\nclose(fd);\nresult = v22;\n}\nelse\n{\nprintf(\"%s:%d: expectation '%s' failed\\n\", \"clone4.c\", 511LL, \"child > 0\");\nresult = v22 + 1;\n}\nreturn result;\n}\n\n\n\nQ:[fds,buf,stat_loc,v19,v20,pid,v22,sub_403310,sub_4014BB,sub_4013E3,sub_4012A2,sub_4012B7,]\nAssistant: ", "hints": "[]", "response": "{'fds': 'fdp', 'buf': 'fdinfo', 'stat_loc': 'status', 'v19': 'reaped', 'v20': 'rc', 'pid': 'child', 'v22': 'fail', 'sub_403310': 'check_clone_fd_nonblock', 'sub_4014BB': 'clone4_', 'sub_4013E3': 'child_wait_then_exit', 'sub_4012A2': 'gettid_', 'sub_4012B7': 'pid_present'}"} |
|
write_phdrs | 2f5d91478cdbd733b4d2f79052ff2ac977f3977372ec6e8fe63629b020783033 | teslamotors | coreboot | NA | static void write_phdrs(struct elf_writer *ew, struct buffer *phdrs)
{
Elf64_Half i;
Elf64_Phdr phdr;
size_t num_written = 0;
size_t num_needs_write = 0;
for (i = 0; i < ew->num_secs; i++) {
struct elf_writer_section *sec = &ew->sections[i];
if (!(sec->shdr.sh_flags & SHF_ALLOC))
continue;
if (!section_consecutive(ew, i)) {
/* Write out previously set phdr. */
if (num_needs_write != num_written) {
phdr_write(ew, phdrs, &phdr);
num_written++;
}
phdr.p_type = PT_LOAD;
phdr.p_offset = sec->shdr.sh_offset;
phdr.p_vaddr = sec->shdr.sh_addr;
phdr.p_paddr = sec->shdr.sh_addr;
phdr.p_filesz = buffer_size(&sec->content);
phdr.p_memsz = sec->shdr.sh_size;
phdr.p_flags = 0;
if (sec->shdr.sh_flags & SHF_EXECINSTR)
phdr.p_flags |= PF_X | PF_R;
if (sec->shdr.sh_flags & SHF_WRITE)
phdr.p_flags |= PF_W;
phdr.p_align = sec->shdr.sh_addralign;
num_needs_write++;
} else {
/* Accumulate file size and memsize. The assumption
* is that each section is either NOBITS or full
* (sh_size == file size). This is standard in that
* an ELF section doesn't have a file size component. */
if (sec->shdr.sh_flags & SHF_EXECINSTR)
phdr.p_flags |= PF_X | PF_R;
if (sec->shdr.sh_flags & SHF_WRITE)
phdr.p_flags |= PF_W;
phdr.p_filesz += buffer_size(&sec->content);
phdr.p_memsz += sec->shdr.sh_size;
}
}
/* Write out the last phdr. */
if (num_needs_write != num_written) {
phdr_write(ew, phdrs, &phdr);
num_written++;
}
assert(num_written == ew->ehdr.e_phnum);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405FE6", "function_addr": 4218854, "binary_name": "2f5d91478cdbd733b4d2f79052ff2ac977f3977372ec6e8fe63629b020783033.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 70h"], [3, "mov [rbp+var_68], rdi"], [4, "mov [rbp+var_70], rsi"], [5, "mov [rbp+var_10], 0"], [6, "mov [rbp+var_18], 0"], [7, "mov [rbp+var_2], 0"], [8, "jmp loc_406194"], [9, "movzx eax, [rbp+var_2]"], [10, "movsxd rdx, eax"], [11, "mov rax, rdx"], [12, "add rax, rax"], [13, "add rax, rdx"], [14, "shl rax, 2"], [15, "add rax, rdx"], [16, "shl rax, 3"], [17, "lea rdx, [rax+50h]"], [18, "mov rax, [rbp+var_68]"], [19, "add rax, rdx"], [20, "mov [rbp+var_20], rax"], [21, "mov rax, [rbp+var_20]"], [22, "mov rax, [rax+8]"], [23, "and eax, 2"], [24, "test rax, rax"], [25, "jz loc_406188"], [26, "movzx edx, [rbp+var_2]"], [27, "mov rax, [rbp+var_68]"], [28, "mov esi, edx"], [29, "mov rdi, rax"], [30, "call sub_405EE9"], [31, "test eax, eax"], [32, "jnz loc_406126"], [33, "mov rax, [rbp+var_18]"], [34, "cmp rax, [rbp+var_10]"], [35, "jz short loc_40608F"], [36, "lea rdx, [rbp+var_60]"], [37, "mov rcx, [rbp+var_70]"], [38, "mov rax, [rbp+var_68]"], [39, "mov rsi, rcx"], [40, "mov rdi, rax"], [41, "call sub_405CBF"], [42, "add [rbp+var_10], 1"], [43, "mov [rbp+var_60], 1"], [44, "mov rax, [rbp+var_20]"], [45, "mov rax, [rax+18h]"], [46, "mov [rbp+var_58], rax"], [47, "mov rax, [rbp+var_20]"], [48, "mov rax, [rax+10h]"], [49, "mov [rbp+var_50], rax"], [50, "mov rax, [rbp+var_20]"], [51, "mov rax, [rax+10h]"], [52, "mov [rbp+var_48], rax"], [53, "mov rax, [rbp+var_20]"], [54, "add rax, 40h "], [55, "mov rdi, rax"], [56, "call sub_403AFE"], [57, "mov [rbp+var_40], rax"], [58, "mov rax, [rbp+var_20]"], [59, "mov rax, [rax+20h]"], [60, "mov [rbp+var_38], rax"], [61, "mov [rbp+var_5C], 0"], [62, "mov rax, [rbp+var_20]"], [63, "mov rax, [rax+8]"], [64, "and eax, 4"], [65, "test rax, rax"], [66, "jz short loc_4060FA"], [67, "mov eax, [rbp+var_5C]"], [68, "or eax, 5"], [69, "mov [rbp+var_5C], eax"], [70, "mov rax, [rbp+var_20]"], [71, "mov rax, [rax+8]"], [72, "and eax, 1"], [73, "test rax, rax"], [74, "jz short loc_406113"], [75, "mov eax, [rbp+var_5C]"], [76, "or eax, 2"], [77, "mov [rbp+var_5C], eax"], [78, "mov rax, [rbp+var_20]"], [79, "mov rax, [rax+30h]"], [80, "mov [rbp+var_30], rax"], [81, "add [rbp+var_18], 1"], [82, "jmp short loc_406189"], [83, "mov rax, [rbp+var_20]"], [84, "mov rax, [rax+8]"], [85, "and eax, 4"], [86, "test rax, rax"], [87, "jz short loc_40613F"], [88, "mov eax, [rbp+var_5C]"], [89, "or eax, 5"], [90, "mov [rbp+var_5C], eax"], [91, "mov rax, [rbp+var_20]"], [92, "mov rax, [rax+8]"], [93, "and eax, 1"], [94, "test rax, rax"], [95, "jz short loc_406158"], [96, "mov eax, [rbp+var_5C]"], [97, "or eax, 2"], [98, "mov [rbp+var_5C], eax"], [99, "mov rax, [rbp+var_20]"], [100, "add rax, 40h "], [101, "mov rdi, rax"], [102, "call sub_403AFE"], [103, "mov rdx, [rbp+var_40]"], [104, "add rax, rdx"], [105, "mov [rbp+var_40], rax"], [106, "mov rdx, [rbp+var_38]"], [107, "mov rax, [rbp+var_20]"], [108, "mov rax, [rax+20h]"], [109, "add rax, rdx"], [110, "mov [rbp+var_38], rax"], [111, "jmp short loc_406189"], [112, "nop"], [113, "movzx eax, [rbp+var_2]"], [114, "add eax, 1"], [115, "mov [rbp+var_2], ax"], [116, "movzx edx, [rbp+var_2]"], [117, "mov rax, [rbp+var_68]"], [118, "mov rax, [rax+48h]"], [119, "cmp rdx, rax"], [120, "jb loc_406011"], [121, "mov rax, [rbp+var_18]"], [122, "cmp rax, [rbp+var_10]"], [123, "jz short loc_4061CF"], [124, "lea rdx, [rbp+var_60]"], [125, "mov rcx, [rbp+var_70]"], [126, "mov rax, [rbp+var_68]"], [127, "mov rsi, rcx"], [128, "mov rdi, rax"], [129, "call sub_405CBF"], [130, "add [rbp+var_10], 1"], [131, "mov rax, [rbp+var_68]"], [132, "movzx eax, word ptr [rax+38h]"], [133, "movzx eax, ax"], [134, "cmp [rbp+var_10], rax"], [135, "jz short loc_4061F9"], [136, "mov ecx, offset aWritePhdrs"], [137, "mov edx, 3F4h"], [138, "mov esi, offset aUsrSrcRepoUtil_0"], [139, "mov edi, offset aNumWrittenEwEh"], [140, "call ___assert_fail"], [141, "nop"], [142, "leave"], [143, "retn"]], "data_dep": [[9, 115], [9, 7], [10, 9], [11, 10], [12, 11], [13, 10], [13, 12], [14, 13], [15, 14], [15, 10], [16, 15], [17, 16], [17, 10], [18, 3], [19, 18], [19, 17], [20, 19], [21, 20], [22, 21], [23, 22], [24, 23], [25, 24], [26, 7], [26, 115], [27, 3], [28, 26], [29, 27], [31, 30], [32, 31], [33, 6], [33, 81], [34, 5], [34, 33], [34, 42], [35, 34], [36, 43], [36, 26], [37, 4], [38, 3], [39, 37], [40, 38], [42, 42], [42, 5], [44, 20], [45, 44], [46, 45], [47, 20], [48, 47], [49, 48], [50, 20], [51, 50], [52, 51], [53, 20], [54, 53], [55, 54], [57, 56], [58, 20], [59, 58], [60, 59], [62, 20], [63, 62], [64, 63], [65, 64], [66, 65], [67, 61], [68, 67], [69, 68], [70, 20], [71, 70], [72, 71], [73, 72], [74, 73], [75, 69], [75, 61], [76, 75], [77, 76], [78, 20], [79, 78], [80, 79], [81, 6], [81, 81], [83, 20], [84, 83], [85, 84], [86, 85], [87, 86], [88, 90], [88, 69], [88, 98], [88, 77], [88, 61], [89, 88], [90, 89], [91, 20], [92, 91], [93, 92], [94, 93], [95, 94], [96, 90], [96, 69], [96, 98], [96, 77], [96, 61], [97, 96], [98, 97], [99, 20], [100, 99], [101, 100], [103, 105], [103, 57], [104, 102], [104, 103], [105, 104], [106, 60], [106, 110], [107, 20], [108, 107], [109, 106], [109, 108], [110, 109], [113, 7], [113, 115], [114, 113], [115, 114], [116, 115], [116, 7], [117, 3], [118, 117], [119, 116], [119, 118], [120, 119], [121, 6], [121, 81], [122, 42], [122, 5], [122, 121], [123, 122], [124, 43], [124, 116], [125, 4], [126, 3], [127, 125], [128, 126], [130, 42], [130, 5], [131, 3], [132, 131], [133, 132], [134, 5], [134, 133], [134, 130], [134, 42], [135, 134], [143, 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/2f5d91478cdbd733b4d2f79052ff2ac977f3977372ec6e8fe63629b020783033_2f5d91478cdbd733b4d2f79052ff2ac977f3977372ec6e8fe63629b020783033.jsonl.gz", "strip_func_name": "sub_405FE6", "query": "\n\n\n__int64 __fastcall sub_405FE6(__int64 a1, __int64 a2)\n{\n__int64 v2; // rax\n__int64 result; // rax\nunsigned int v4; // [rsp+10h] [rbp-60h] BYREF\nint v5; // [rsp+14h] [rbp-5Ch]\n__int64 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]\n__int64 v10; // [rsp+38h] [rbp-38h]\n__int64 v11; // [rsp+40h] [rbp-30h]\n_QWORD *v12; // [rsp+50h] [rbp-20h]\n__int64 v13; // [rsp+58h] [rbp-18h]\n__int64 v14; // [rsp+60h] [rbp-10h]\nunsigned __int16 i; // [rsp+6Eh] [rbp-2h]\n\nv14 = 0LL;\nv13 = 0LL;\nfor ( i = 0; (unsigned __int64)i < *(_QWORD *)(a1 + 72); ++i )\n{\nv12 = (_QWORD *)(104LL * i + 80 + a1);\nif ( (v12[1] & 2LL) != 0 )\n{\nif ( sub_405EE9(a1, i) )\n{\nif ( (v12[1] & 4LL) != 0 )\nv5 |= 5u;\nif ( (v12[1] & 1LL) != 0 )\nv5 |= 2u;\nv2 = sub_403AFE((__int64)(v12 + 8));\nv9 += v2;\nv10 += v12[4];\n}\nelse\n{\nif ( v13 != v14 )\n{\nsub_405CBF(a1, a2, &v4);\n++v14;\n}\nv4 = 1;\nv6 = v12[3];\nv7 = v12[2];\nv8 = v12[2];\nv9 = sub_403AFE((__int64)(v12 + 8));\nv10 = v12[4];\nv5 = 0;\nif ( (v12[1] & 4LL) != 0 )\nv5 |= 5u;\nif ( (v12[1] & 1LL) != 0 )\nv5 |= 2u;\nv11 = v12[6];\n++v13;\n}\n}\n}\nif ( v13 != v14 )\n{\nsub_405CBF(a1, a2, &v4);\n++v14;\n}\nresult = *(unsigned __int16 *)(a1 + 56);\nif ( v14 != result )\n__assert_fail(\"num_written == ew->ehdr.e_phnum\", \"/usr/src/repo/util/cbfstool/elfheaders.c\", 0x3F4u, \"write_phdrs\");\nreturn result;\n}\n\n\n\nQ:[a1,a2,v4,v12,v13,v14,sub_405FE6,sub_405EE9,sub_403AFE,sub_405CBF,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ew', 'a2': 'phdrs', 'v4': 'phdr', 'v12': 'sec', 'v13': 'num_needs_write', 'v14': 'num_written', 'sub_405FE6': 'write_phdrs', 'sub_405EE9': 'section_consecutive', 'sub_403AFE': 'buffer_size_0', 'sub_405CBF': 'phdr_write'}"} |
|
pj_atomic_add | a919fc39a5af9b1355a81d3146876c0fc5147fd6c16c81f57145538a5f7e2e46 | asterisk | pjproject-archive | NA | PJ_DEF(void) pj_atomic_add( pj_atomic_t *atomic_var,
pj_atomic_value_t value )
{
PJ_ASSERT_ON_FAIL(atomic_var, return);
pj_atomic_add_and_get(atomic_var, value);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4303D0", "function_addr": 4391888, "binary_name": "a919fc39a5af9b1355a81d3146876c0fc5147fd6c16c81f57145538a5f7e2e46.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "cmp [rbp+var_8], 0"], [6, "jnz short loc_430400"], [7, "mov ecx, offset aPjAtomicAdd"], [8, "mov edx, 407h"], [9, "mov esi, offset aSrcPjOsCoreUni"], [10, "mov edi, offset aAtomicVar"], [11, "call ___assert_fail"], [12, "cmp [rbp+var_8], 0"], [13, "jz short loc_43041C"], [14, "mov rdx, [rbp+var_10]"], [15, "mov rax, [rbp+var_8]"], [16, "mov rsi, rdx"], [17, "mov rdi, rax"], [18, "call sub_430379"], [19, "jmp short locret_43041D"], [20, "nop"], [21, "leave"], [22, "retn"]], "data_dep": [[5, 3], [6, 5], [12, 3], [13, 12], [14, 4], [15, 3], [16, 14], [17, 15], [22, 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/a919fc39a5af9b1355a81d3146876c0fc5147fd6c16c81f57145538a5f7e2e46_a919fc39a5af9b1355a81d3146876c0fc5147fd6c16c81f57145538a5f7e2e46.jsonl.gz", "strip_func_name": "sub_4303D0", "query": "\n\n\n__int64 __fastcall sub_4303D0(_QWORD *a1, __int64 a2)\n{\nif ( !a1 )\n__assert_fail(\"atomic_var\", \"../src/pj/os_core_unix.c\", 0x407u, \"pj_atomic_add\");\nreturn sub_430379(a1, a2);\n}\n\n\n\nQ:[a1,a2,sub_4303D0,sub_430379,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'atomic_var', 'a2': 'value', 'sub_4303D0': 'pj_atomic_add', 'sub_430379': 'pj_atomic_add_and_get'}"} |
|
test_str_neq | f65f5e8b147e826f1a50579a74fd68b9cbfc76c86c0c9b63f799b793a99d184e | Telecominfraproject | OpenCellular | NA | int test_str_neq(const char* result, const char* not_expected,
const char *preamble, const char *desc, const char *comment)
{
if (!result || !not_expected) {
fprintf(stderr, "%s: %s, %s ... " COL_RED "FAILED\n" COL_STOP,
preamble, desc, comment);
fprintf(stderr, " String compare with NULL\n");
gTestSuccess = 0;
return 0;
} else if (strcmp(result, not_expected)) {
fprintf(stderr, "%s: %s, %s ... " COL_GREEN "PASSED\n" COL_STOP,
preamble, desc, comment);
return 1;
} else {
fprintf(stderr, "%s: %s, %s ... " COL_RED "FAILED\n" COL_STOP,
preamble, desc, comment);
fprintf(stderr, " Didn't expect: \"%s\", but got it\n", not_expected);
gTestSuccess = 0;
return 0;
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401B42", "function_addr": 4201282, "binary_name": "f65f5e8b147e826f1a50579a74fd68b9cbfc76c86c0c9b63f799b793a99d184e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+s1], rdi"], [4, "mov [rbp+s2], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov [rbp+var_20], rcx"], [7, "mov [rbp+var_28], r8"], [8, "cmp [rbp+s1], 0"], [9, "jz short loc_401B6C"], [10, "cmp [rbp+s2], 0"], [11, "jnz short loc_401BCA"], [12, "mov rax, cs:stderr"], [13, "mov rsi, [rbp+var_28]"], [14, "mov rcx, [rbp+var_20]"], [15, "mov rdx, [rbp+var_18]"], [16, "mov r8, rsi"], [17, "lea rsi, aSSS031mfailedM"], [18, "mov rdi, rax"], [19, "mov eax, 0"], [20, "call _fprintf"], [21, "mov rax, cs:stderr"], [22, "mov rcx, rax"], [23, "mov edx, 1Bh"], [24, "mov esi, 1"], [25, "lea rdi, aStringCompareW"], [26, "call _fwrite"], [27, "mov cs:dword_405048, 0"], [28, "mov eax, 0"], [29, "jmp locret_401C6A"], [30, "mov rdx, [rbp+s2]"], [31, "mov rax, [rbp+s1]"], [32, "mov rsi, rdx"], [33, "mov rdi, rax"], [34, "call _strcmp"], [35, "test eax, eax"], [36, "jz short loc_401C12"], [37, "mov rax, cs:stderr"], [38, "mov rsi, [rbp+var_28]"], [39, "mov rcx, [rbp+var_20]"], [40, "mov rdx, [rbp+var_18]"], [41, "mov r8, rsi"], [42, "lea rsi, aSSS132mpassedM"], [43, "mov rdi, rax"], [44, "mov eax, 0"], [45, "call _fprintf"], [46, "mov eax, 1"], [47, "jmp short locret_401C6A"], [48, "mov rax, cs:stderr"], [49, "mov rsi, [rbp+var_28]"], [50, "mov rcx, [rbp+var_20]"], [51, "mov rdx, [rbp+var_18]"], [52, "mov r8, rsi"], [53, "lea rsi, aSSS031mfailedM"], [54, "mov rdi, rax"], [55, "mov eax, 0"], [56, "call _fprintf"], [57, "mov rax, cs:stderr"], [58, "mov rdx, [rbp+s2]"], [59, "lea rsi, aDidnTExpectSBu"], [60, "mov rdi, rax"], [61, "mov eax, 0"], [62, "call _fprintf"], [63, "mov cs:dword_405048, 0"], [64, "mov eax, 0"], [65, "leave"], [66, "retn"]], "data_dep": [[8, 3], [9, 8], [10, 4], [11, 10], [13, 7], [14, 6], [15, 5], [16, 13], [17, 13], [18, 12], [22, 21], [25, 18], [30, 4], [31, 3], [32, 30], [33, 31], [35, 34], [36, 35], [38, 7], [39, 6], [40, 5], [41, 38], [42, 38], [43, 37], [49, 7], [50, 6], [51, 5], [52, 49], [53, 49], [54, 48], [58, 4], [59, 53], [60, 57], [66, 28], [66, 46], [66, 64]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f65f5e8b147e826f1a50579a74fd68b9cbfc76c86c0c9b63f799b793a99d184e_f65f5e8b147e826f1a50579a74fd68b9cbfc76c86c0c9b63f799b793a99d184e.jsonl.gz", "strip_func_name": "sub_401B42", "query": "\n\n\n__int64 __fastcall sub_401B42(const char *a1, const char *a2, const char *a3, const char *a4, const char *a5)\n{\n__int64 result; // rax\n\nif ( a1 && a2 )\n{\nif ( !strcmp(a1, a2) )\n{\nfprintf(stderr, \"%s: %s, %s ... \\x1B[0;31mFAILED\\n\\x1B[m\", a3, a4, a5);\nfprintf(stderr, \" Didn't expect: \\\"%s\\\", but got it\\n\", a2);\ndword_405048 = 0;\nresult = 0LL;\n}\nelse\n{\nfprintf(stderr, \"%s: %s, %s ... \\x1B[1;32mPASSED\\n\\x1B[m\", a3, a4, a5);\nresult = 1LL;\n}\n}\nelse\n{\nfprintf(stderr, \"%s: %s, %s ... \\x1B[0;31mFAILED\\n\\x1B[m\", a3, a4, a5);\nfwrite(\" String compare with NULL\\n\", 1uLL, 0x1BuLL, stderr);\ndword_405048 = 0;\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,sub_401B42,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'preamble', 'a4': 'desc', 'a1': 'result', 'a2': 'not_expected', 'a5': 'comment', 'sub_401B42': 'test_str_neq'}"} |
|
yrmcds_set_compression | c14e4a23af97c05c132af727554ffbc40c808655512247badf0f63aaac8465be | netdata | netdata | NA | yrmcds_error yrmcds_set_compression(yrmcds* c, size_t threshold) {
#ifdef LIBYRMCDS_USE_LZ4
if( c == NULL )
return YRMCDS_BAD_ARGUMENT;
c->compress_size = threshold;
return YRMCDS_OK;
#else
return YRMCDS_NOT_IMPLEMENTED;
#endif
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407A57", "function_addr": 4225623, "binary_name": "c14e4a23af97c05c132af727554ffbc40c808655512247badf0f63aaac8465be.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, 9"], [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/c14e4a23af97c05c132af727554ffbc40c808655512247badf0f63aaac8465be_c14e4a23af97c05c132af727554ffbc40c808655512247badf0f63aaac8465be.jsonl.gz", "strip_func_name": "sub_407A57", "query": "\n\n\n__int64 sub_407A57()\n{\nreturn 9LL;\n}\n\n\n\nQ:[sub_407A57,]\nAssistant: ", "hints": "[]", "response": "{'sub_407A57': 'yrmcds_set_compression'}"} |
|
F_EmitDebugInfo | cc514aea46329b2bbe7d1ede9a05315966bd71bcf8cc0ff6e5ffa267e88c9796 | reidrac | dan64 | NA | static void F_EmitDebugInfo (void)
/* Emit debug infos for the current function */
{
if (DebugInfo) {
/* Get the current function */
const SymEntry* Sym = CurrentFunc->FuncEntry;
/* Output info for the function itself */
AddTextLine ("\t.dbg\tfunc, \"%s\", \"00\", %s, \"%s\"",
Sym->Name,
(Sym->Flags & SC_EXTERN)? "extern" : "static",
Sym->AsmName);
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_433059", "function_addr": 4403289, "binary_name": "cc514aea46329b2bbe7d1ede9a05315966bd71bcf8cc0ff6e5ffa267e88c9796.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "movzx eax, cs:byte_46DFB1"], [4, "test al, al"], [5, "jz short loc_4330B9"], [6, "mov rax, cs:qword_46E040"], [7, "mov rax, [rax]"], [8, "mov [rbp+var_8], rax"], [9, "mov rax, [rbp+var_8]"], [10, "mov rax, [rax+40h]"], [11, "mov rdx, [rbp+var_8]"], [12, "mov edx, [rdx+28h]"], [13, "and edx, 8"], [14, "test edx, edx"], [15, "jz short loc_433097"], [16, "mov edi, offset aExtern"], [17, "jmp short loc_43309C"], [18, "mov edi, offset aStatic"], [19, "mov rdx, [rbp+var_8]"], [20, "lea rsi, [rdx+60h]"], [21, "mov rcx, rax"], [22, "mov rdx, rdi"], [23, "mov edi, offset aDbgFuncS00SS"], [24, "mov eax, 0"], [25, "call sub_404C7D"], [26, "nop"], [27, "leave"], [28, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 7], [9, 8], [10, 9], [11, 8], [12, 11], [13, 12], [14, 13], [15, 14], [19, 8], [20, 19], [21, 10], [22, 18], [22, 16], [28, 25], [28, 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/cc514aea46329b2bbe7d1ede9a05315966bd71bcf8cc0ff6e5ffa267e88c9796_cc514aea46329b2bbe7d1ede9a05315966bd71bcf8cc0ff6e5ffa267e88c9796.jsonl.gz", "strip_func_name": "sub_433059", "query": "\n\n\n__int64 __fastcall sub_433059(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 result; // rax\nconst char *v7; // rdi\n\nresult = (unsigned __int8)byte_46DFB1;\nif ( byte_46DFB1 )\n{\nif ( (*(_DWORD *)(*(_QWORD *)qword_46E040 + 40LL) & 8) != 0 )\nv7 = \"extern\";\nelse\nv7 = \"static\";\nresult = sub_404C7D(\n(__int64)\"\\t.dbg\\tfunc, \\\"%s\\\", \\\"00\\\", %s, \\\"%s\\\"\",\n*(_QWORD *)qword_46E040 + 96LL,\n(__int64)v7,\n*(_QWORD *)(*(_QWORD *)qword_46E040 + 64LL),\na5,\na6);\n}\nreturn result;\n}\n\n\n\nQ:[sub_433059,sub_404C7D,]\nAssistant: ", "hints": "[]", "response": "{'sub_433059': 'F_EmitDebugInfo', 'sub_404C7D': 'AddTextLine'}"} |
|
udp_ioqueue_test_imp | ef4c36eeacadfe8b6eb18d340137236e21f0aa384fcf9c90e7559b9d85ae03a1 | asterisk | pjproject-archive | NA | static int udp_ioqueue_test_imp(pj_bool_t allow_concur)
{
int status;
int bufsize, sock_count;
PJ_LOG(3,(THIS_FILE, "..testing with concurency=%d", allow_concur));
//goto pass1;
PJ_LOG(3, (THIS_FILE, "...compliance test (%s)", pj_ioqueue_name()));
if ((status=compliance_test(allow_concur)) != 0) {
return status;
}
PJ_LOG(3, (THIS_FILE, "....compliance test ok"));
PJ_LOG(3, (THIS_FILE, "...unregister test (%s)", pj_ioqueue_name()));
if ((status=unregister_test(allow_concur)) != 0) {
return status;
}
PJ_LOG(3, (THIS_FILE, "....unregister test ok"));
if ((status=many_handles_test(allow_concur)) != 0) {
return status;
}
//return 0;
PJ_LOG(4, (THIS_FILE, "...benchmarking different buffer size:"));
PJ_LOG(4, (THIS_FILE, "... note: buf=bytes sent, fds=# of fds, "
"elapsed=in timer ticks"));
//pass1:
PJ_LOG(3, (THIS_FILE, "...Benchmarking poll times for %s:", pj_ioqueue_name()));
PJ_LOG(3, (THIS_FILE, "...====================================="));
PJ_LOG(3, (THIS_FILE, "...Buf.size #inactive-socks Time/poll"));
PJ_LOG(3, (THIS_FILE, "... (bytes) (nanosec)"));
PJ_LOG(3, (THIS_FILE, "...====================================="));
//goto pass2;
for (bufsize=BUF_MIN_SIZE; bufsize <= BUF_MAX_SIZE; bufsize *= 2) {
if ((status=bench_test(allow_concur, bufsize, SOCK_INACTIVE_MIN)) != 0)
return status;
}
//pass2:
bufsize = 512;
for (sock_count=SOCK_INACTIVE_MIN+2;
sock_count<=SOCK_INACTIVE_MAX+2;
sock_count *= 2)
{
//PJ_LOG(3,(THIS_FILE, "...testing with %d fds", sock_count));
if ((status=bench_test(allow_concur, bufsize, sock_count-2)) != 0)
return status;
}
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40B315", "function_addr": 4240149, "binary_name": "ef4c36eeacadfe8b6eb18d340137236e21f0aa384fcf9c90e7559b9d85ae03a1.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_14], edi"], [4, "call sub_42DF15"], [5, "cmp eax, 2"], [6, "jle short loc_40B343"], [7, "mov eax, [rbp+var_14]"], [8, "mov edx, eax"], [9, "mov esi, offset aTestingWithCon_0"], [10, "mov edi, offset aTestUdp"], [11, "mov eax, 0"], [12, "call sub_42E7DE"], [13, "call sub_42DF15"], [14, "cmp eax, 2"], [15, "jle short loc_40B369"], [16, "call sub_423B39"], [17, "mov rdx, rax"], [18, "mov esi, offset aComplianceTest"], [19, "mov edi, offset aTestUdp"], [20, "mov eax, 0"], [21, "call sub_42E7DE"], [22, "mov eax, [rbp+var_14]"], [23, "mov edi, eax"], [24, "call sub_4097F8"], [25, "mov [rbp+var_C], eax"], [26, "cmp [rbp+var_C], 0"], [27, "jz short loc_40B384"], [28, "mov eax, [rbp+var_C]"], [29, "jmp locret_40B56E"], [30, "call sub_42DF15"], [31, "cmp eax, 2"], [32, "jle short loc_40B3A2"], [33, "mov esi, offset aComplianceTest_0"], [34, "mov edi, offset aTestUdp"], [35, "mov eax, 0"], [36, "call sub_42E7DE"], [37, "call sub_42DF15"], [38, "cmp eax, 2"], [39, "jle short loc_40B3C8"], [40, "call sub_423B39"], [41, "mov rdx, rax"], [42, "mov esi, offset aUnregisterTest"], [43, "mov edi, offset aTestUdp"], [44, "mov eax, 0"], [45, "call sub_42E7DE"], [46, "mov eax, [rbp+var_14]"], [47, "mov edi, eax"], [48, "call sub_40A0F6"], [49, "mov [rbp+var_C], eax"], [50, "cmp [rbp+var_C], 0"], [51, "jz short loc_40B3E3"], [52, "mov eax, [rbp+var_C]"], [53, "jmp locret_40B56E"], [54, "call sub_42DF15"], [55, "cmp eax, 2"], [56, "jle short loc_40B401"], [57, "mov esi, offset aUnregisterTest_0"], [58, "mov edi, offset aTestUdp"], [59, "mov eax, 0"], [60, "call sub_42E7DE"], [61, "mov eax, [rbp+var_14]"], [62, "mov edi, eax"], [63, "call sub_40A5A0"], [64, "mov [rbp+var_C], eax"], [65, "cmp [rbp+var_C], 0"], [66, "jz short loc_40B41C"], [67, "mov eax, [rbp+var_C]"], [68, "jmp locret_40B56E"], [69, "call sub_42DF15"], [70, "cmp eax, 3"], [71, "jle short loc_40B43A"], [72, "mov esi, offset aBenchmarkingDi"], [73, "mov edi, offset aTestUdp"], [74, "mov eax, 0"], [75, "call sub_42E889"], [76, "call sub_42DF15"], [77, "cmp eax, 3"], [78, "jle short loc_40B458"], [79, "mov esi, offset aNoteBufBytesSe"], [80, "mov edi, offset aTestUdp"], [81, "mov eax, 0"], [82, "call sub_42E889"], [83, "call sub_42DF15"], [84, "cmp eax, 2"], [85, "jle short loc_40B47E"], [86, "call sub_423B39"], [87, "mov rdx, rax"], [88, "mov esi, offset aBenchmarkingPo"], [89, "mov edi, offset aTestUdp"], [90, "mov eax, 0"], [91, "call sub_42E7DE"], [92, "call sub_42DF15"], [93, "cmp eax, 2"], [94, "jle short loc_40B49C"], [95, "mov esi, offset asc_443030"], [96, "mov edi, offset aTestUdp"], [97, "mov eax, 0"], [98, "call sub_42E7DE"], [99, "call sub_42DF15"], [100, "cmp eax, 2"], [101, "jle short loc_40B4BA"], [102, "mov esi, offset aBufSizeInactiv"], [103, "mov edi, offset aTestUdp"], [104, "mov eax, 0"], [105, "call sub_42E7DE"], [106, "call sub_42DF15"], [107, "cmp eax, 2"], [108, "jle short loc_40B4D8"], [109, "mov esi, offset aBytesNanosec"], [110, "mov edi, offset aTestUdp"], [111, "mov eax, 0"], [112, "call sub_42E7DE"], [113, "call sub_42DF15"], [114, "cmp eax, 2"], [115, "jle short loc_40B4F6"], [116, "mov esi, offset asc_443030"], [117, "mov edi, offset aTestUdp"], [118, "mov eax, 0"], [119, "call sub_42E7DE"], [120, "mov [rbp+var_4], 20h "], [121, "jmp short loc_40B524"], [122, "mov ecx, [rbp+var_4]"], [123, "mov eax, [rbp+var_14]"], [124, "mov edx, 1"], [125, "mov esi, ecx"], [126, "mov edi, eax"], [127, "call sub_40A8B3"], [128, "mov [rbp+var_C], eax"], [129, "cmp [rbp+var_C], 0"], [130, "jz short loc_40B521"], [131, "mov eax, [rbp+var_C]"], [132, "jmp short locret_40B56E"], [133, "shl [rbp+var_4], 1"], [134, "cmp [rbp+var_4], 800h"], [135, "jle short loc_40B4FF"], [136, "mov [rbp+var_4], 200h"], [137, "mov [rbp+var_8], 3"], [138, "jmp short loc_40B563"], [139, "mov eax, [rbp+var_8]"], [140, "lea edx, [rax-2]"], [141, "mov ecx, [rbp+var_4]"], [142, "mov eax, [rbp+var_14]"], [143, "mov esi, ecx"], [144, "mov edi, eax"], [145, "call sub_40A8B3"], [146, "mov [rbp+var_C], eax"], [147, "cmp [rbp+var_C], 0"], [148, "jz short loc_40B560"], [149, "mov eax, [rbp+var_C]"], [150, "jmp short locret_40B56E"], [151, "shl [rbp+var_8], 1"], [152, "cmp [rbp+var_8], 40h "], [153, "jle short loc_40B53D"], [154, "mov eax, 0"], [155, "leave"], [156, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [8, 7], [14, 13], [15, 14], [17, 16], [22, 3], [23, 22], [25, 24], [26, 25], [27, 26], [28, 25], [31, 30], [32, 31], [38, 37], [39, 38], [41, 40], [46, 3], [47, 46], [49, 48], [50, 49], [51, 50], [52, 49], [55, 54], [56, 55], [61, 3], [62, 61], [64, 63], [65, 64], [66, 65], [67, 64], [70, 69], [71, 70], [77, 76], [78, 77], [84, 83], [85, 84], [87, 86], [93, 92], [94, 93], [100, 99], [101, 100], [107, 106], [108, 107], [114, 113], [115, 114], [122, 133], [122, 120], [123, 3], [125, 122], [126, 123], [128, 127], [129, 128], [130, 129], [131, 128], [133, 120], [133, 133], [134, 133], [134, 120], [135, 134], [139, 151], [139, 137], [140, 139], [140, 8], [140, 17], [140, 140], [140, 124], [140, 87], [140, 41], [141, 136], [142, 3], [143, 141], [144, 142], [146, 145], [147, 146], [148, 147], [149, 146], [151, 137], [151, 151], [152, 151], [152, 137], [153, 152], [156, 154], [156, 28], [156, 149], [156, 52], [156, 67], [156, 131]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/ef4c36eeacadfe8b6eb18d340137236e21f0aa384fcf9c90e7559b9d85ae03a1_ef4c36eeacadfe8b6eb18d340137236e21f0aa384fcf9c90e7559b9d85ae03a1.jsonl.gz", "strip_func_name": "sub_40B315", "query": "\n\n\n__int64 __fastcall sub_40B315(unsigned int a1)\n{\nint v1; // ecx\nint v2; // er8\nint v3; // er9\nint v4; // eax\nint v5; // ecx\nint v6; // er8\nint v7; // er9\nint v9; // edx\nint v10; // ecx\nint v11; // er8\nint v12; // er9\nint v13; // eax\nint v14; // ecx\nint v15; // er8\nint v16; // er9\nint v17; // edx\nint v18; // ecx\nint v19; // er8\nint v20; // er9\nint v21; // edx\nint v22; // ecx\nint v23; // er8\nint v24; // er9\nint v25; // edx\nint v26; // ecx\nint v27; // er8\nint v28; // er9\nint v29; // eax\nint v30; // ecx\nint v31; // er8\nint v32; // er9\nint v33; // edx\nint v34; // ecx\nint v35; // er8\nint v36; // er9\nint v37; // edx\nint v38; // ecx\nint v39; // er8\nint v40; // er9\nint v41; // edx\nint v42; // ecx\nint v43; // er8\nint v44; // er9\nint v45; // edx\nint v46; // ecx\nint v47; // er8\nint v48; // er9\nunsigned int v49; // [rsp+14h] [rbp-Ch]\nunsigned int v50; // [rsp+14h] [rbp-Ch]\nunsigned int v51; // [rsp+14h] [rbp-Ch]\nunsigned int v52; // [rsp+14h] [rbp-Ch]\nunsigned int v53; // [rsp+14h] [rbp-Ch]\nint j; // [rsp+18h] [rbp-8h]\nint i; // [rsp+1Ch] [rbp-4h]\n\nif ( (int)sub_42DF15() > 2 )\nsub_42E7DE((unsigned int)\"test_udp\", (unsigned int)\"..testing with concurency=%d\", a1, v1, v2, v3);\nif ( (int)sub_42DF15() > 2 )\n{\nv4 = sub_423B39();\nsub_42E7DE((unsigned int)\"test_udp\", (unsigned int)\"...compliance test (%s)\", v4, v5, v6, v7);\n}\nv49 = sub_4097F8(a1);\nif ( v49 )\nreturn v49;\nif ( (int)sub_42DF15() > 2 )\nsub_42E7DE((unsigned int)\"test_udp\", (unsigned int)\"....compliance test ok\", v9, v10, v11, v12);\nif ( (int)sub_42DF15() > 2 )\n{\nv13 = sub_423B39();\nsub_42E7DE((unsigned int)\"test_udp\", (unsigned int)\"...unregister test (%s)\", v13, v14, v15, v16);\n}\nv50 = sub_40A0F6(a1);\nif ( v50 )\nreturn v50;\nif ( (int)sub_42DF15() > 2 )\nsub_42E7DE((unsigned int)\"test_udp\", (unsigned int)\"....unregister test ok\", v17, v18, v19, v20);\nv51 = sub_40A5A0(a1);\nif ( v51 )\nreturn v51;\nif ( (int)sub_42DF15() > 3 )\nsub_42E889((unsigned int)\"test_udp\", (unsigned int)\"...benchmarking different buffer size:\", v21, v22, v23, v24);\nif ( (int)sub_42DF15() > 3 )\nsub_42E889(\n(unsigned int)\"test_udp\",\n(unsigned int)\"... note: buf=bytes sent, fds=# of fds, elapsed=in timer ticks\",\nv25,\nv26,\nv27,\nv28);\nif ( (int)sub_42DF15() > 2 )\n{\nv29 = sub_423B39();\nsub_42E7DE((unsigned int)\"test_udp\", (unsigned int)\"...Benchmarking poll times for %s:\", v29, v30, v31, v32);\n}\nif ( (int)sub_42DF15() > 2 )\nsub_42E7DE((unsigned int)\"test_udp\", (unsigned int)\"...=====================================\", v33, v34, v35, v36);\nif ( (int)sub_42DF15() > 2 )\nsub_42E7DE((unsigned int)\"test_udp\", (unsigned int)\"...Buf.size #inactive-socks Time/poll\", v37, v38, v39, v40);\nif ( (int)sub_42DF15() > 2 )\nsub_42E7DE((unsigned int)\"test_udp\", (unsigned int)\"... (bytes) (nanosec)\", v41, v42, v43, v44);\nif ( (int)sub_42DF15() > 2 )\nsub_42E7DE((unsigned int)\"test_udp\", (unsigned int)\"...=====================================\", v45, v46, v47, v48);\nfor ( i = 32; i <= 2048; i *= 2 )\n{\nv52 = sub_40A8B3(a1, i, 1);\nif ( v52 )\nreturn v52;\n}\nfor ( j = 3; j <= 64; j *= 2 )\n{\nv53 = sub_40A8B3(a1, 512, j - 2);\nif ( v53 )\nreturn v53;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,v51,j,i,sub_40B315,sub_42DF15,sub_42E7DE,sub_423B39,sub_4097F8,sub_40A0F6,sub_40A5A0,sub_42E889,sub_40A8B3,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'allow_concur', 'v51': 'status', 'j': 'sock_count', 'i': 'bufsize', 'sub_40B315': 'udp_ioqueue_test_imp', 'sub_42DF15': 'pj_log_get_level', 'sub_42E7DE': 'pj_log_3', 'sub_423B39': 'pj_ioqueue_name', 'sub_4097F8': 'compliance_test', 'sub_40A0F6': 'unregister_test', 'sub_40A5A0': 'many_handles_test', 'sub_42E889': 'pj_log_4', 'sub_40A8B3': 'bench_test'}"} |
|
_StartData | c554d64d8507512ec7c5460397d7e8fd60edb662d620824236cdfae536ce1f50 | sraoss | pgsql-ivm | NA | static void
_StartData(ArchiveHandle *AH, TocEntry *te)
{
lclTocEntry *tctx = (lclTocEntry *) te->formatData;
lclContext *ctx = (lclContext *) AH->formatData;
char fname[MAXPGPATH];
setFilePath(AH, fname, tctx->filename);
ctx->dataFH = InitCompressFileHandle(AH->compression_spec);
if (!ctx->dataFH->open_write_func(fname, PG_BINARY_W, ctx->dataFH))
pg_fatal("could not open output file \"%s\": %m", fname);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_446819", "function_addr": 4483097, "binary_name": "c554d64d8507512ec7c5460397d7e8fd60edb662d620824236cdfae536ce1f50.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 420h"], [3, "mov [rbp+var_418], rdi"], [4, "mov [rbp+var_420], rsi"], [5, "mov rax, [rbp+var_420]"], [6, "mov rax, [rax+90h]"], [7, "mov [rbp+var_8], rax"], [8, "mov rax, [rbp+var_418]"], [9, "mov rax, [rax+248h]"], [10, "mov [rbp+var_10], rax"], [11, "mov rax, [rbp+var_8]"], [12, "mov rdx, [rax]"], [13, "lea rcx, [rbp+var_410]"], [14, "mov rax, [rbp+var_418]"], [15, "mov rsi, rcx"], [16, "mov rdi, rax"], [17, "call sub_4475BB"], [18, "mov rax, [rbp+var_418]"], [19, "push qword ptr [rax+238h]"], [20, "push qword ptr [rax+230h]"], [21, "push qword ptr [rax+228h]"], [22, "push qword ptr [rax+220h]"], [23, "call sub_4362DD"], [24, "add rsp, 20h"], [25, "mov rdx, [rbp+var_10]"], [26, "mov [rdx+8], rax"], [27, "mov rax, [rbp+var_10]"], [28, "mov rax, [rax+8]"], [29, "mov rcx, [rax+8]"], [30, "mov rax, [rbp+var_10]"], [31, "mov rdx, [rax+8]"], [32, "lea rax, [rbp+var_410]"], [33, "mov esi, offset aW_0"], [34, "mov rdi, rax"], [35, "call rcx"], [36, "xor eax, 1"], [37, "test al, al"], [38, "jz short loc_4468FF"], [39, "lea rax, [rbp+var_410]"], [40, "mov rcx, rax"], [41, "mov edx, offset aCouldNotOpenOu_3"], [42, "mov esi, 0"], [43, "mov edi, 4"], [44, "mov eax, 0"], [45, "call sub_4508F4"], [46, "mov edi, 1"], [47, "call sub_44A23A"], [48, "nop"], [49, "leave"], [50, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 6], [8, 3], [9, 8], [10, 9], [11, 7], [12, 11], [14, 3], [15, 13], [16, 14], [18, 3], [19, 18], [20, 18], [21, 18], [22, 18], [24, 2], [25, 10], [26, 23], [26, 25], [27, 10], [28, 27], [28, 26], [29, 26], [29, 28], [30, 10], [31, 26], [31, 30], [32, 30], [34, 32], [35, 29], [36, 35], [37, 36], [38, 37], [39, 37], [40, 39], [50, 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/c554d64d8507512ec7c5460397d7e8fd60edb662d620824236cdfae536ce1f50_c554d64d8507512ec7c5460397d7e8fd60edb662d620824236cdfae536ce1f50.jsonl.gz", "strip_func_name": "sub_446819", "query": "\n\n\n__int64 __fastcall sub_446819(__int64 a1, __int64 a2)\n{\n__int64 v2; // rdx\n__int64 v3; // rcx\n__int64 v4; // r8\n__int64 v5; // r9\n__int64 (__fastcall **v6)(__int64, int, const char *, __int64, __int64, int); // rax\n__int64 result; // rax\nint v8; // er8\nint v9; // er9\nchar v10[1024]; // [rsp+10h] [rbp-410h] BYREF\n__int64 v11; // [rsp+410h] [rbp-10h]\n_QWORD *v12; // [rsp+418h] [rbp-8h]\n\nv12 = *(_QWORD **)(a2 + 144);\nv11 = *(_QWORD *)(a1 + 584);\nsub_4475BB(a1, v10, *v12);\nv6 = sub_4362DD(\na1,\n(__int64)v10,\nv2,\nv3,\nv4,\nv5,\n*(__int64 (__fastcall **)(__int64, int, const char *, __int64, __int64, int))(a1 + 544),\n*(__int64 (__fastcall **)(__int64, int, const char *, __int64, __int64, int))(a1 + 552),\n*(__int64 (__fastcall **)(__int64, int, const char *, __int64, __int64, int))(a1 + 560),\n*(__int64 (__fastcall **)(__int64, int, const char *, __int64, __int64, int))(a1 + 568));\n*(_QWORD *)(v11 + 8) = v6;\nresult = (*(unsigned int (__fastcall **)(char *, const char *, _QWORD))(*(_QWORD *)(v11 + 8) + 8LL))(\nv10,\n\"w\",\n*(_QWORD *)(v11 + 8)) ^ 1;\nif ( (_BYTE)result )\n{\nsub_4508F4(4, 0, (unsigned int)\"could not open output file \\\"%s\\\": %m\", (unsigned int)v10, v8, v9);\nsub_44A23A(1LL);\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v10,v11,v12,sub_446819,sub_4475BB,sub_4362DD,sub_4508F4,sub_44A23A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'AH_0', 'a2': 'te', 'v10': 'fname', 'v11': 'ctx', 'v12': 'tctx', 'sub_446819': '_StartData_0', 'sub_4475BB': 'setFilePath', 'sub_4362DD': 'InitCompressFileHandle', 'sub_4508F4': 'pg_log_generic', 'sub_44A23A': 'exit_nicely'}"} |
|
ZSTD_compressCCtx | 865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6 | facebook | zstd | NA | size_t ZSTD_compressCCtx(ZSTD_CCtx* cctx,
void* dst, size_t dstCapacity,
const void* src, size_t srcSize,
int compressionLevel)
{
DEBUGLOG(4, "ZSTD_compressCCtx (srcSize=%u)", (unsigned)srcSize);
assert(cctx != NULL);
return ZSTD_compress_usingDict(cctx, dst, dstCapacity, src, srcSize, NULL, 0, compressionLevel);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41195F", "function_addr": 4266335, "binary_name": "865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov [rbp+var_20], rcx"], [7, "mov [rbp+var_28], r8"], [8, "mov [rbp+var_2C], r9d"], [9, "mov r8, [rbp+var_28]"], [10, "mov rcx, [rbp+var_20]"], [11, "mov rdx, [rbp+var_18]"], [12, "mov rsi, [rbp+var_10]"], [13, "mov rax, [rbp+var_8]"], [14, "mov edi, [rbp+var_2C]"], [15, "push rdi"], [16, "push 0"], [17, "mov r9d, 0"], [18, "mov rdi, rax"], [19, "call sub_411895"], [20, "add rsp, 10h"], [21, "leave"], [22, "retn"]], "data_dep": [[9, 7], [10, 6], [11, 5], [12, 4], [13, 3], [14, 8], [15, 14], [18, 13], [20, 2], [22, 19]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6_865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6.jsonl.gz", "strip_func_name": "sub_41195F", "query": "\n\n\n__int64 __fastcall sub_41195F(__int64 a1, unsigned __int8 *a2, unsigned __int64 a3, char *a4, unsigned __int64 a5, unsigned int a6)\n{\nreturn sub_411895(a1, a2, a3, a4, a5, 0LL, 0LL, a6);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,sub_41195F,sub_411895,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'dstCapacity', 'a4': 'src', 'a1': 'cctx', 'a2': 'dst', 'a5': 'srcSize', 'a6': 'compressionLevel', 'sub_41195F': 'ZSTD_compressCCtx', 'sub_411895': 'ZSTD_compress_usingDict'}"} |
|
adin_initialize | 9b85fa48a868983d7ee8c1ec5b0fcd80355cfe0cf4a097485a7f6533d5af5dbe | hecomi | node-julius | NA | boolean
adin_initialize(Recog *recog)
{
char *arg = NULL;
ADIn *adin;
Jconf *jconf;
#ifdef ENABLE_PLUGIN
FUNC_INT func;
int sid;
#endif
adin = recog->adin;
jconf = recog->jconf;
jlog("STAT: ###### initialize input device\n");
/* select input device: file, mic, netaudio, etc... */
#ifdef ENABLE_PLUGIN
sid = jconf->input.plugin_source;
if (sid >= 0) {
/* set plugin properties and functions to adin */
func = (FUNC_INT) plugin_get_func(sid, "adin_get_configuration");
if (func == NULL) {
jlog("ERROR: invalid plugin: adin_get_configuration() not exist\n");
return FALSE;
}
adin->silence_cut_default = (*func)(1);
adin->enable_thread = (*func)(2);
adin->ad_standby = (boolean (*)(int, void *)) plugin_get_func(sid, "adin_standby");
adin->ad_begin = (boolean (*)(char *)) plugin_get_func(sid, "adin_open");
adin->ad_end = (boolean (*)()) plugin_get_func(sid, "adin_close");
adin->ad_resume = (boolean (*)()) plugin_get_func(sid, "adin_resume");
adin->ad_pause = (boolean (*)()) plugin_get_func(sid, "adin_pause");
adin->ad_terminate = (boolean (*)()) plugin_get_func(sid, "adin_terminate");
adin->ad_read = (int (*)(SP16 *, int)) plugin_get_func(sid, "adin_read");
adin->ad_input_name = (char * (*)()) plugin_get_func(sid, "adin_input_name");
if (adin->ad_read == NULL) {
jlog("ERROR: m_adin: selected plugin has no function adin_read()\n");
return FALSE;
}
} else {
#endif
/* built-in */
if (adin_select(adin, jconf->input.speech_input, jconf->input.device) == FALSE) {
jlog("ERROR: m_adin: failed to select input device\n");
return FALSE;
}
/* set sampling frequency and device-dependent configuration
(argument is device-dependent) */
switch(jconf->input.speech_input) {
case SP_ADINNET: /* arg: port number */
arg = mymalloc(100);
sprintf(arg, "%d", jconf->input.adinnet_port);
break;
case SP_RAWFILE: /* arg: filename of file list (if any) */
if (jconf->input.inputlist_filename != NULL) {
arg = mymalloc(strlen(jconf->input.inputlist_filename)+1);
strcpy(arg, jconf->input.inputlist_filename);
} else {
arg = NULL;
}
break;
case SP_STDIN:
arg = NULL;
break;
#ifdef USE_NETAUDIO
case SP_NETAUDIO: /* netaudio server/port name */
arg = mymalloc(strlen(jconf->input.netaudio_devname)+1);
strcpy(arg, jconf->input.netaudio_devname);
break;
#endif
}
#ifdef ENABLE_PLUGIN
}
#endif
if (adin_setup_all(adin, jconf, arg) == FALSE) {
return FALSE;
}
if (arg != NULL) free(arg);
return TRUE;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_424EB9", "function_addr": 4345529, "binary_name": "9b85fa48a868983d7ee8c1ec5b0fcd80355cfe0cf4a097485a7f6533d5af5dbe.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+s], 0"], [5, "mov rax, [rbp+var_38]"], [6, "mov rax, [rax+8]"], [7, "mov [rbp+var_10], rax"], [8, "mov rax, [rbp+var_38]"], [9, "mov rax, [rax]"], [10, "mov [rbp+var_18], rax"], [11, "lea rdi, aStatInitialize"], [12, "mov eax, 0"], [13, "call sub_466AFB"], [14, "mov rax, [rbp+var_18]"], [15, "mov eax, [rax+0Ch]"], [16, "mov [rbp+var_1C], eax"], [17, "cmp [rbp+var_1C], 0"], [18, "js loc_425065"], [19, "mov eax, [rbp+var_1C]"], [20, "lea rsi, aAdinGetConfigu_0"], [21, "mov edi, eax"], [22, "call sub_444915"], [23, "mov [rbp+var_28], rax"], [24, "cmp [rbp+var_28], 0"], [25, "jnz short loc_424F40"], [26, "lea rdi, aErrorInvalidPl_0"], [27, "mov eax, 0"], [28, "call sub_466AFB"], [29, "mov eax, 0"], [30, "jmp locret_425188"], [31, "mov rdx, [rbp+var_28]"], [32, "mov edi, 1"], [33, "mov eax, 0"], [34, "call rdx"], [35, "mov edx, eax"], [36, "mov rax, [rbp+var_10]"], [37, "mov [rax+51h], dl"], [38, "mov rdx, [rbp+var_28]"], [39, "mov edi, 2"], [40, "mov eax, 0"], [41, "call rdx"], [42, "mov edx, eax"], [43, "mov rax, [rbp+var_10]"], [44, "mov [rax+53h], dl"], [45, "mov eax, [rbp+var_1C]"], [46, "lea rsi, aAdinStandby"], [47, "mov edi, eax"], [48, "call sub_444915"], [49, "mov rdx, [rbp+var_10]"], [50, "mov [rdx], rax"], [51, "mov eax, [rbp+var_1C]"], [52, "lea rsi, aAdinOpen"], [53, "mov edi, eax"], [54, "call sub_444915"], [55, "mov rdx, [rbp+var_10]"], [56, "mov [rdx+8], rax"], [57, "mov eax, [rbp+var_1C]"], [58, "lea rsi, aAdinClose"], [59, "mov edi, eax"], [60, "call sub_444915"], [61, "mov rdx, [rbp+var_10]"], [62, "mov [rdx+10h], rax"], [63, "mov eax, [rbp+var_1C]"], [64, "lea rsi, aAdinResume"], [65, "mov edi, eax"], [66, "call sub_444915"], [67, "mov rdx, [rbp+var_10]"], [68, "mov [rdx+18h], rax"], [69, "mov eax, [rbp+var_1C]"], [70, "lea rsi, aAdinPause"], [71, "mov edi, eax"], [72, "call sub_444915"], [73, "mov rdx, [rbp+var_10]"], [74, "mov [rdx+20h], rax"], [75, "mov eax, [rbp+var_1C]"], [76, "lea rsi, aAdinTerminate"], [77, "mov edi, eax"], [78, "call sub_444915"], [79, "mov rdx, [rbp+var_10]"], [80, "mov [rdx+28h], rax"], [81, "mov eax, [rbp+var_1C]"], [82, "lea rsi, aAdinRead"], [83, "mov edi, eax"], [84, "call sub_444915"], [85, "mov rdx, [rbp+var_10]"], [86, "mov [rdx+30h], rax"], [87, "mov eax, [rbp+var_1C]"], [88, "lea rsi, aAdinInputName"], [89, "mov edi, eax"], [90, "call sub_444915"], [91, "mov rdx, [rbp+var_10]"], [92, "mov [rdx+38h], rax"], [93, "mov rax, [rbp+var_10]"], [94, "mov rax, [rax+30h]"], [95, "test rax, rax"], [96, "jnz loc_42514E"], [97, "lea rdi, aErrorMAdinSele"], [98, "mov eax, 0"], [99, "call sub_466AFB"], [100, "mov eax, 0"], [101, "jmp locret_425188"], [102, "mov rax, [rbp+var_18]"], [103, "mov edx, [rax+8]"], [104, "mov rax, [rbp+var_18]"], [105, "mov ecx, [rax+4]"], [106, "mov rax, [rbp+var_10]"], [107, "mov esi, ecx"], [108, "mov rdi, rax"], [109, "call sub_424A65"], [110, "test al, al"], [111, "jnz short loc_4250A0"], [112, "lea rdi, aErrorMAdinFail_1"], [113, "mov eax, 0"], [114, "call sub_466AFB"], [115, "mov eax, 0"], [116, "jmp locret_425188"], [117, "mov rax, [rbp+var_18]"], [118, "mov eax, [rax+4]"], [119, "cmp eax, 5"], [120, "jz loc_425145"], [121, "cmp eax, 5"], [122, "jg loc_42514E"], [123, "test eax, eax"], [124, "jz short loc_4250F5"], [125, "cmp eax, 2"], [126, "jnz loc_42514E"], [127, "mov edi, 64h "], [128, "call sub_466C16"], [129, "mov [rbp+s], rax"], [130, "mov rax, [rbp+var_18]"], [131, "mov edx, [rax+30h]"], [132, "mov rax, [rbp+s]"], [133, "lea rsi, aD_0"], [134, "mov rdi, rax"], [135, "mov eax, 0"], [136, "call _sprintf"], [137, "jmp short loc_42514E"], [138, "mov rax, [rbp+var_18]"], [139, "mov rax, [rax+28h]"], [140, "test rax, rax"], [141, "jz short loc_42513B"], [142, "mov rax, [rbp+var_18]"], [143, "mov rax, [rax+28h]"], [144, "mov rdi, rax"], [145, "call _strlen"], [146, "add rax, 1"], [147, "mov rdi, rax"], [148, "call sub_466C16"], [149, "mov [rbp+s], rax"], [150, "mov rax, [rbp+var_18]"], [151, "mov rdx, [rax+28h]"], [152, "mov rax, [rbp+s]"], [153, "mov rsi, rdx"], [154, "mov rdi, rax"], [155, "call _strcpy"], [156, "jmp short loc_42514E"], [157, "mov [rbp+s], 0"], [158, "jmp short loc_42514E"], [159, "mov [rbp+s], 0"], [160, "nop"], [161, "mov rdx, [rbp+s]"], [162, "mov rcx, [rbp+var_18]"], [163, "mov rax, [rbp+var_10]"], [164, "mov rsi, rcx"], [165, "mov rdi, rax"], [166, "call sub_424D7C"], [167, "test al, al"], [168, "jnz short loc_425170"], [169, "mov eax, 0"], [170, "jmp short locret_425188"], [171, "cmp [rbp+s], 0"], [172, "jz short loc_425183"], [173, "mov rax, [rbp+s]"], [174, "mov rdi, rax"], [175, "call _free"], [176, "mov eax, 1"], [177, "leave"], [178, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 3], [9, 8], [10, 9], [14, 10], [15, 14], [16, 15], [17, 16], [18, 17], [19, 16], [21, 19], [23, 22], [24, 23], [25, 24], [26, 21], [31, 23], [34, 31], [35, 34], [36, 7], [37, 35], [37, 36], [38, 23], [41, 38], [42, 41], [43, 7], [44, 42], [44, 43], [45, 16], [46, 20], [47, 45], [49, 7], [50, 49], [50, 48], [51, 16], [52, 46], [53, 51], [55, 7], [56, 55], [56, 54], [57, 16], [58, 52], [59, 57], [61, 7], [62, 60], [62, 61], [63, 16], [64, 58], [65, 63], [67, 7], [68, 66], [68, 67], [69, 16], [70, 64], [71, 69], [73, 7], [74, 73], [74, 72], [75, 16], [76, 70], [77, 75], [79, 7], [80, 78], [80, 79], [81, 16], [82, 76], [83, 81], [85, 7], [86, 85], [86, 84], [87, 16], [88, 82], [89, 87], [91, 7], [92, 90], [92, 91], [93, 7], [94, 93], [94, 92], [95, 94], [96, 95], [97, 89], [102, 10], [103, 102], [104, 10], [105, 104], [106, 7], [107, 105], [108, 106], [110, 109], [111, 110], [112, 108], [117, 10], [118, 117], [119, 118], [120, 119], [121, 118], [122, 121], [123, 118], [124, 123], [125, 123], [126, 125], [129, 128], [130, 10], [131, 130], [132, 129], [133, 107], [134, 132], [138, 10], [139, 138], [140, 139], [141, 140], [142, 10], [143, 142], [144, 143], [146, 145], [147, 146], [149, 148], [150, 10], [151, 150], [152, 149], [153, 151], [154, 152], [161, 157], [161, 4], [161, 159], [161, 129], [161, 149], [162, 10], [163, 7], [164, 162], [165, 163], [167, 166], [168, 167], [171, 129], [171, 149], [171, 157], [171, 4], [171, 159], [172, 171], [173, 149], [173, 157], [173, 4], [173, 159], [173, 129], [174, 173], [178, 100], [178, 29], [178, 115], [178, 176], [178, 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/9b85fa48a868983d7ee8c1ec5b0fcd80355cfe0cf4a097485a7f6533d5af5dbe_9b85fa48a868983d7ee8c1ec5b0fcd80355cfe0cf4a097485a7f6533d5af5dbe.jsonl.gz", "strip_func_name": "sub_424EB9", "query": "\n\n\n__int64 __fastcall sub_424EB9(__int64 *a1, int a2, int a3, int a4, int a5, int a6)\n{\nint v6; // er8\nint v7; // er9\nint v8; // edx\nint v9; // ecx\nint v10; // er8\nint v11; // er9\nint v13; // ecx\nint v14; // er8\nint v15; // er9\nint v16; // esi\nint v17; // edx\nint v18; // ecx\nint v19; // eax\nint v20; // er8\nint v21; // er9\nchar v22; // al\nsize_t v23; // rax\nint v24; // er8\nint v25; // er9\n__int64 (__fastcall *v26)(__int64); // [rsp+18h] [rbp-28h]\nunsigned int v27; // [rsp+24h] [rbp-1Ch]\n__int64 v28; // [rsp+28h] [rbp-18h]\n__int64 v29; // [rsp+30h] [rbp-10h]\nchar *s; // [rsp+38h] [rbp-8h]\n\ns = 0LL;\nv29 = a1[1];\nv28 = *a1;\nsub_466AFB((unsigned int)\"STAT: ###### initialize input device\\n\", a2, a3, a4, a5, a6);\nv27 = *(_DWORD *)(v28 + 12);\nif ( (v27 & 0x80000000) == 0 )\n{\nv26 = (__int64 (__fastcall *)(__int64))sub_444915(v27, \"adin_get_configuration\");\nif ( !v26 )\n{\nsub_466AFB(\n(unsigned int)\"ERROR: invalid plugin: adin_get_configuration() not exist\\n\",\n(unsigned int)\"adin_get_configuration\",\nv8,\nv9,\nv10,\nv11);\nreturn 0LL;\n}\n*(_BYTE *)(v29 + 81) = v26(1LL);\n*(_BYTE *)(v29 + 83) = v26(2LL);\n*(_QWORD *)v29 = sub_444915(v27, \"adin_standby\");\n*(_QWORD *)(v29 + 8) = sub_444915(v27, \"adin_open\");\n*(_QWORD *)(v29 + 16) = sub_444915(v27, \"adin_close\");\n*(_QWORD *)(v29 + 24) = sub_444915(v27, \"adin_resume\");\n*(_QWORD *)(v29 + 32) = sub_444915(v27, \"adin_pause\");\n*(_QWORD *)(v29 + 40) = sub_444915(v27, \"adin_terminate\");\n*(_QWORD *)(v29 + 48) = sub_444915(v27, \"adin_read\");\n*(_QWORD *)(v29 + 56) = sub_444915(v27, \"adin_input_name\");\nif ( !*(_QWORD *)(v29 + 48) )\n{\nsub_466AFB(\n(unsigned int)\"ERROR: m_adin: selected plugin has no function adin_read()\\n\",\n(unsigned int)\"adin_input_name\",\nv29,\nv13,\nv14,\nv15);\nreturn 0LL;\n}\ngoto LABEL_17;\n}\nv16 = *(_DWORD *)(v28 + 4);\nif ( !(unsigned __int8)sub_424A65(v29, v16, *(_DWORD *)(v28 + 8), v16, v6, v7) )\n{\nsub_466AFB((unsigned int)\"ERROR: m_adin: failed to select input device\\n\", v16, v17, v18, v14, v15);\nreturn 0LL;\n}\nv19 = *(_DWORD *)(v28 + 4);\nif ( v19 == 5 )\n{\ns = 0LL;\ngoto LABEL_17;\n}\nif ( v19 > 5 )\n{\nLABEL_17:\nv22 = sub_424D7C(v29, v28, 0LL, v28, v14, v15);\ngoto LABEL_18;\n}\nif ( v19 )\n{\nif ( v19 == 2 )\n{\ns = (char *)sub_466C16(100LL);\nsprintf(s, \"%d\", *(unsigned int *)(v28 + 48));\nv22 = sub_424D7C(v29, v28, (__int64)s, v28, v20, v21);\ngoto LABEL_18;\n}\ngoto LABEL_17;\n}\nif ( *(_QWORD *)(v28 + 40) )\n{\nv23 = strlen(*(const char **)(v28 + 40));\ns = (char *)sub_466C16(v23 + 1);\nstrcpy(s, *(const char **)(v28 + 40));\nv22 = sub_424D7C(v29, v28, (__int64)s, v28, v24, v25);\n}\nelse\n{\ns = 0LL;\nv22 = sub_424D7C(v29, v28, 0LL, v28, v14, v15);\n}\nLABEL_18:\nif ( !v22 )\nreturn 0LL;\nif ( s )\nfree(s);\nreturn 1LL;\n}\n\n\n\nQ:[a1,v26,v27,v28,v29,s,sub_424EB9,sub_466AFB,sub_444915,sub_424A65,sub_424D7C,sub_466C16,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'recog', 'v26': 'func', 'v27': 'sid', 'v28': 'jconf', 'v29': 'adin', 's': 'arg', 'sub_424EB9': 'adin_initialize', 'sub_466AFB': 'jlog', 'sub_444915': 'plugin_get_func', 'sub_424A65': 'adin_select', 'sub_424D7C': 'adin_setup_all', 'sub_466C16': 'mymalloc'}"} |
|
abpoa_traverse_min_flow | 594b83b23af3712b0a50cf803faf548ee2d881811c70ba9277daabf28866ca9b | yangao07 | TideHunter | NA | void abpoa_traverse_min_flow(abpoa_graph_t *abg, int src_id, int sink_id, int *out_degree) {
int *id, i, cur_id, in_id, out_id, max_id; int max_w, max_out_i, min_w;
kdq_int_t *q = kdq_init_int(); kdq_push_int(q, sink_id);
int *max_out_weight = (int*)_err_malloc(abg->node_n * sizeof(int));
// reverse Breadth-First-Search
while ((id = kdq_shift_int(q)) != 0) {
cur_id = *id;
if (cur_id == sink_id) {
abg->node[sink_id].max_out_id = -1;
max_out_weight[sink_id] = INT32_MAX;
} else {
max_w = INT32_MIN, max_id = -1, max_out_i = -1, min_w = INT32_MAX;
for (i = 0; i < abg->node[cur_id].out_edge_n; ++i) {
out_id = abg->node[cur_id].out_id[i];
min_w = MIN_OF_TWO(max_out_weight[out_id], abg->node[cur_id].out_weight[i]);
if (max_w < min_w) {
max_w = min_w;
max_id = out_id;
max_out_i = i;
} else if (max_w == min_w && abg->node[cur_id].out_weight[max_out_i] <= abg->node[cur_id].out_weight[i]) {
max_id = out_id;
max_out_i = i;
}
}
abg->node[cur_id].max_out_id = max_id;
max_out_weight[cur_id] = max_w;
}
if (cur_id == src_id) {
kdq_destroy_int(q);
goto MF_CONS;
}
for (i = 0; i < abg->node[cur_id].in_edge_n; ++i) {
in_id = abg->node[cur_id].in_id[i];
if (--out_degree[in_id] == 0) kdq_push_int(q, in_id);
}
}
MF_CONS:
free(max_out_weight);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40B2EF", "function_addr": 4240111, "binary_name": "594b83b23af3712b0a50cf803faf548ee2d881811c70ba9277daabf28866ca9b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_48], rdi"], [4, "mov [rbp+var_4C], esi"], [5, "mov [rbp+var_50], edx"], [6, "mov [rbp+var_58], rcx"], [7, "mov eax, 0"], [8, "call sub_407CA8"], [9, "mov [rbp+var_18], rax"], [10, "mov edx, [rbp+var_50]"], [11, "mov rax, [rbp+var_18]"], [12, "mov esi, edx"], [13, "mov rdi, rax"], [14, "call sub_408081"], [15, "mov rax, [rbp+var_48]"], [16, "mov eax, [rax+8]"], [17, "cdqe"], [18, "shl rax, 2"], [19, "mov rsi, rax"], [20, "mov edi, offset aAbpoaTraverseM"], [21, "call sub_454BF9"], [22, "mov [rbp+ptr], rax"], [23, "jmp loc_40B5F1"], [24, "mov rax, [rbp+var_28]"], [25, "mov eax, [rax]"], [26, "mov [rbp+var_2C], eax"], [27, "mov eax, [rbp+var_2C]"], [28, "cmp eax, [rbp+var_50]"], [29, "jnz short loc_40B39B"], [30, "mov rax, [rbp+var_48]"], [31, "mov rcx, [rax]"], [32, "mov eax, [rbp+var_50]"], [33, "movsxd rdx, eax"], [34, "mov rax, rdx"], [35, "add rax, rax"], [36, "add rax, rdx"], [37, "shl rax, 5"], [38, "add rax, rcx"], [39, "mov dword ptr [rax+28h], 0FFFFFFFFh"], [40, "mov eax, [rbp+var_50]"], [41, "cdqe"], [42, "lea rdx, ds:0[rax*4]"], [43, "mov rax, [rbp+ptr]"], [44, "add rax, rdx"], [45, "mov dword ptr [rax], 7FFFFFFFh"], [46, "jmp loc_40B53E"], [47, "mov [rbp+var_C], 80000000h"], [48, "mov [rbp+var_8], 0FFFFFFFFh"], [49, "mov [rbp+var_10], 0FFFFFFFFh"], [50, "mov [rbp+var_30], 7FFFFFFFh"], [51, "mov [rbp+var_4], 0"], [52, "jmp loc_40B4D8"], [53, "mov rax, [rbp+var_48]"], [54, "mov rcx, [rax]"], [55, "mov eax, [rbp+var_2C]"], [56, "movsxd rdx, eax"], [57, "mov rax, rdx"], [58, "add rax, rax"], [59, "add rax, rdx"], [60, "shl rax, 5"], [61, "add rax, rcx"], [62, "mov rdx, [rax+20h]"], [63, "mov eax, [rbp+var_4]"], [64, "cdqe"], [65, "shl rax, 2"], [66, "add rax, rdx"], [67, "mov eax, [rax]"], [68, "mov [rbp+var_34], eax"], [69, "mov rax, [rbp+var_48]"], [70, "mov rcx, [rax]"], [71, "mov eax, [rbp+var_2C]"], [72, "movsxd rdx, eax"], [73, "mov rax, rdx"], [74, "add rax, rax"], [75, "add rax, rdx"], [76, "shl rax, 5"], [77, "add rax, rcx"], [78, "mov rdx, [rax+30h]"], [79, "mov eax, [rbp+var_4]"], [80, "cdqe"], [81, "shl rax, 2"], [82, "add rax, rdx"], [83, "mov edx, [rax]"], [84, "mov eax, [rbp+var_34]"], [85, "cdqe"], [86, "lea rcx, ds:0[rax*4]"], [87, "mov rax, [rbp+ptr]"], [88, "add rax, rcx"], [89, "mov eax, [rax]"], [90, "cmp edx, eax"], [91, "cmovle eax, edx"], [92, "mov [rbp+var_30], eax"], [93, "mov eax, [rbp+var_C]"], [94, "cmp eax, [rbp+var_30]"], [95, "jge short loc_40B45E"], [96, "mov eax, [rbp+var_30]"], [97, "mov [rbp+var_C], eax"], [98, "mov eax, [rbp+var_34]"], [99, "mov [rbp+var_8], eax"], [100, "mov eax, [rbp+var_4]"], [101, "mov [rbp+var_10], eax"], [102, "jmp short loc_40B4D4"], [103, "mov eax, [rbp+var_C]"], [104, "cmp eax, [rbp+var_30]"], [105, "jnz short loc_40B4D4"], [106, "mov rax, [rbp+var_48]"], [107, "mov rcx, [rax]"], [108, "mov eax, [rbp+var_2C]"], [109, "movsxd rdx, eax"], [110, "mov rax, rdx"], [111, "add rax, rax"], [112, "add rax, rdx"], [113, "shl rax, 5"], [114, "add rax, rcx"], [115, "mov rdx, [rax+30h]"], [116, "mov eax, [rbp+var_10]"], [117, "cdqe"], [118, "shl rax, 2"], [119, "add rax, rdx"], [120, "mov ecx, [rax]"], [121, "mov rax, [rbp+var_48]"], [122, "mov rsi, [rax]"], [123, "mov eax, [rbp+var_2C]"], [124, "movsxd rdx, eax"], [125, "mov rax, rdx"], [126, "add rax, rax"], [127, "add rax, rdx"], [128, "shl rax, 5"], [129, "add rax, rsi"], [130, "mov rdx, [rax+30h]"], [131, "mov eax, [rbp+var_4]"], [132, "cdqe"], [133, "shl rax, 2"], [134, "add rax, rdx"], [135, "mov eax, [rax]"], [136, "cmp ecx, eax"], [137, "jg short loc_40B4D4"], [138, "mov eax, [rbp+var_34]"], [139, "mov [rbp+var_8], eax"], [140, "mov eax, [rbp+var_4]"], [141, "mov [rbp+var_10], eax"], [142, "add [rbp+var_4], 1"], [143, "mov rax, [rbp+var_48]"], [144, "mov rcx, [rax]"], [145, "mov eax, [rbp+var_2C]"], [146, "movsxd rdx, eax"], [147, "mov rax, rdx"], [148, "add rax, rax"], [149, "add rax, rdx"], [150, "shl rax, 5"], [151, "add rax, rcx"], [152, "mov eax, [rax+18h]"], [153, "cmp [rbp+var_4], eax"], [154, "jl loc_40B3C3"], [155, "mov rax, [rbp+var_48]"], [156, "mov rcx, [rax]"], [157, "mov eax, [rbp+var_2C]"], [158, "movsxd rdx, eax"], [159, "mov rax, rdx"], [160, "add rax, rax"], [161, "add rax, rdx"], [162, "shl rax, 5"], [163, "lea rdx, [rcx+rax]"], [164, "mov eax, [rbp+var_8]"], [165, "mov [rdx+28h], eax"], [166, "mov eax, [rbp+var_2C]"], [167, "cdqe"], [168, "lea rdx, ds:0[rax*4]"], [169, "mov rax, [rbp+ptr]"], [170, "add rdx, rax"], [171, "mov eax, [rbp+var_C]"], [172, "mov [rdx], eax"], [173, "mov eax, [rbp+var_2C]"], [174, "cmp eax, [rbp+var_4C]"], [175, "jnz short loc_40B557"], [176, "mov rax, [rbp+var_18]"], [177, "mov rdi, rax"], [178, "call sub_407D33"], [179, "jmp loc_40B60D"], [180, "mov [rbp+var_4], 0"], [181, "jmp short loc_40B5C8"], [182, "mov rax, [rbp+var_48]"], [183, "mov rcx, [rax]"], [184, "mov eax, [rbp+var_2C]"], [185, "movsxd rdx, eax"], [186, "mov rax, rdx"], [187, "add rax, rax"], [188, "add rax, rdx"], [189, "shl rax, 5"], [190, "add rax, rcx"], [191, "mov rdx, [rax+10h]"], [192, "mov eax, [rbp+var_4]"], [193, "cdqe"], [194, "shl rax, 2"], [195, "add rax, rdx"], [196, "mov eax, [rax]"], [197, "mov [rbp+var_38], eax"], [198, "mov eax, [rbp+var_38]"], [199, "cdqe"], [200, "lea rdx, ds:0[rax*4]"], [201, "mov rax, [rbp+var_58]"], [202, "add rax, rdx"], [203, "mov edx, [rax]"], [204, "sub edx, 1"], [205, "mov [rax], edx"], [206, "mov eax, [rax]"], [207, "test eax, eax"], [208, "jnz short loc_40B5C4"], [209, "mov edx, [rbp+var_38]"], [210, "mov rax, [rbp+var_18]"], [211, "mov esi, edx"], [212, "mov rdi, rax"], [213, "call sub_408081"], [214, "add [rbp+var_4], 1"], [215, "mov rax, [rbp+var_48]"], [216, "mov rcx, [rax]"], [217, "mov eax, [rbp+var_2C]"], [218, "movsxd rdx, eax"], [219, "mov rax, rdx"], [220, "add rax, rax"], [221, "add rax, rdx"], [222, "shl rax, 5"], [223, "add rax, rcx"], [224, "mov eax, [rax+4]"], [225, "cmp [rbp+var_4], eax"], [226, "jl loc_40B560"], [227, "mov rax, [rbp+var_18]"], [228, "mov rdi, rax"], [229, "call sub_408191"], [230, "mov [rbp+var_28], rax"], [231, "cmp [rbp+var_28], 0"], [232, "jnz loc_40B347"], [233, "nop"], [234, "mov rax, [rbp+ptr]"], [235, "mov rdi, rax"], [236, "call _free"], [237, "nop"], [238, "leave"], [239, "retn"]], "data_dep": [[9, 8], [10, 5], [11, 9], [12, 10], [13, 11], [15, 3], [16, 15], [18, 16], [19, 18], [22, 21], [24, 230], [25, 24], [25, 205], [25, 172], [25, 45], [25, 165], [25, 39], [26, 25], [27, 26], [28, 5], [28, 27], [29, 28], [30, 3], [31, 205], [31, 172], [31, 45], [31, 165], [31, 30], [31, 39], [32, 5], [33, 32], [34, 33], [35, 34], [36, 33], [36, 35], [37, 36], [38, 31], [38, 37], [39, 38], [40, 5], [42, 33], [43, 22], [44, 42], [44, 43], [45, 44], [53, 3], [54, 45], [54, 165], [54, 53], [54, 39], [54, 205], [54, 172], [55, 26], [56, 55], [57, 56], [58, 57], [59, 58], [59, 56], [60, 59], [61, 60], [61, 54], [62, 45], [62, 165], [62, 39], [62, 205], [62, 61], [62, 172], [63, 51], [63, 142], [65, 63], [66, 62], [66, 65], [67, 45], [67, 165], [67, 39], [67, 66], [67, 205], [67, 172], [68, 67], [69, 3], [70, 45], [70, 165], [70, 39], [70, 205], [70, 172], [70, 69], [71, 26], [72, 71], [73, 72], [74, 73], [75, 72], [75, 74], [76, 75], [77, 76], [77, 70], [78, 77], [78, 45], [78, 165], [78, 39], [78, 205], [78, 172], [79, 51], [79, 142], [81, 79], [82, 78], [82, 81], [83, 39], [83, 205], [83, 172], [83, 82], [83, 45], [83, 165], [84, 68], [86, 70], [87, 22], [88, 86], [88, 87], [89, 45], [89, 165], [89, 39], [89, 205], [89, 172], [89, 88], [90, 83], [90, 89], [91, 83], [92, 91], [93, 47], [93, 97], [94, 93], [94, 92], [95, 94], [96, 92], [97, 96], [98, 68], [99, 98], [100, 142], [100, 51], [101, 100], [103, 97], [103, 47], [104, 92], [104, 103], [105, 104], [106, 3], [107, 205], [107, 172], [107, 106], [107, 45], [107, 165], [107, 39], [108, 26], [109, 108], [110, 109], [111, 110], [112, 111], [112, 109], [113, 112], [114, 113], [114, 107], [115, 205], [115, 172], [115, 45], [115, 165], [115, 39], [115, 114], [116, 49], [116, 141], [116, 101], [118, 116], [119, 118], [119, 115], [120, 172], [120, 45], [120, 165], [120, 39], [120, 119], [120, 205], [121, 3], [122, 165], [122, 39], [122, 121], [122, 205], [122, 172], [122, 45], [123, 26], [124, 123], [125, 124], [126, 125], [127, 126], [127, 124], [128, 127], [129, 128], [129, 122], [130, 45], [130, 165], [130, 39], [130, 205], [130, 172], [130, 129], [131, 51], [131, 142], [133, 131], [134, 130], [134, 133], [135, 165], [135, 39], [135, 205], [135, 172], [135, 134], [135, 45], [136, 135], [136, 120], [137, 136], [138, 68], [139, 138], [140, 51], [140, 142], [141, 140], [142, 51], [142, 142], [143, 3], [144, 143], [144, 45], [144, 165], [144, 39], [144, 205], [144, 172], [145, 26], [146, 145], [147, 146], [148, 147], [149, 146], [149, 148], [150, 149], [151, 150], [151, 144], [152, 165], [152, 39], [152, 151], [152, 205], [152, 172], [152, 45], [153, 51], [153, 152], [153, 142], [154, 153], [155, 3], [156, 205], [156, 172], [156, 45], [156, 165], [156, 39], [156, 155], [157, 26], [158, 157], [159, 158], [160, 159], [161, 158], [161, 160], [162, 161], [163, 45], [163, 165], [163, 39], [163, 205], [163, 172], [163, 158], [163, 162], [164, 139], [164, 48], [164, 99], [165, 164], [165, 163], [166, 26], [168, 163], [169, 22], [170, 169], [170, 168], [171, 97], [171, 47], [172, 171], [172, 170], [173, 26], [174, 4], [174, 173], [175, 174], [176, 9], [177, 176], [182, 3], [183, 205], [183, 182], [183, 172], [183, 45], [183, 165], [183, 39], [184, 26], [185, 184], [186, 185], [187, 186], [188, 187], [188, 185], [189, 188], [190, 189], [190, 183], [191, 205], [191, 172], [191, 190], [191, 45], [191, 165], [191, 39], [192, 214], [192, 180], [194, 192], [195, 191], [195, 194], [196, 172], [196, 45], [196, 165], [196, 39], [196, 205], [196, 195], [197, 196], [198, 197], [200, 191], [201, 6], [202, 200], [202, 201], [203, 202], [203, 165], [203, 39], [203, 205], [203, 172], [203, 45], [204, 203], [205, 204], [205, 202], [206, 202], [206, 205], [207, 206], [208, 207], [209, 197], [210, 9], [211, 209], [212, 210], [214, 214], [214, 180], [215, 3], [216, 215], [216, 205], [216, 172], [216, 45], [216, 165], [216, 39], [217, 26], [218, 217], [219, 218], [220, 219], [221, 218], [221, 220], [222, 221], [223, 222], [223, 216], [224, 205], [224, 223], [224, 172], [224, 45], [224, 165], [224, 39], [225, 224], [225, 214], [225, 180], [226, 225], [227, 9], [228, 227], [230, 229], [231, 230], [232, 231], [234, 22], [235, 234], [239, 236]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_40B2EF", "query": "\n\n\nvoid __fastcall sub_40B2EF(__int64 a1, int a2, signed int a3, __int64 a4)\n{\nsigned int v4; // eax\n_DWORD *v5; // rax\nsigned int v8; // [rsp+28h] [rbp-38h]\nint v9; // [rsp+34h] [rbp-2Ch]\nint *v10; // [rsp+38h] [rbp-28h]\n_DWORD *ptr; // [rsp+40h] [rbp-20h]\nunsigned __int64 *v12; // [rsp+48h] [rbp-18h]\nint v13; // [rsp+50h] [rbp-10h]\nsigned int v14; // [rsp+54h] [rbp-Ch]\nint v15; // [rsp+58h] [rbp-8h]\nint i; // [rsp+5Ch] [rbp-4h]\nint j; // [rsp+5Ch] [rbp-4h]\n\nv12 = (unsigned __int64 *)sub_407CA8();\nsub_408081((__int64)v12, a3);\nptr = (_DWORD *)sub_454BF9(\"abpoa_traverse_min_flow\", 4LL * *(int *)(a1 + 8));\nwhile ( 1 )\n{\nv10 = (int *)sub_408191(v12);\nif ( !v10 )\nbreak;\nv9 = *v10;\nif ( *v10 == a3 )\n{\n*(_DWORD *)(*(_QWORD *)a1 + 96LL * a3 + 40) = -1;\nptr[a3] = 0x7FFFFFFF;\n}\nelse\n{\nv14 = 0x80000000;\nv15 = -1;\nv13 = -1;\nfor ( i = 0; i < *(_DWORD *)(*(_QWORD *)a1 + 96LL * v9 + 24); ++i )\n{\nv4 = ptr[*(int *)(*(_QWORD *)(*(_QWORD *)a1 + 96LL * v9 + 32) + 4LL * i)];\nif ( *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 96LL * v9 + 48) + 4LL * i) <= v4 )\nv4 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 96LL * v9 + 48) + 4LL * i);\nif ( v14 >= v4 )\n{\nif ( v14 == v4\n&& *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 96LL * v9 + 48) + 4LL * v13) <= *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 96LL * v9 + 48)\n+ 4LL * i) )\n{\nv15 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 96LL * v9 + 32) + 4LL * i);\nv13 = i;\n}\n}\nelse\n{\nv14 = v4;\nv15 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 96LL * v9 + 32) + 4LL * i);\nv13 = i;\n}\n}\n*(_DWORD *)(*(_QWORD *)a1 + 96LL * v9 + 40) = v15;\nptr[v9] = v14;\n}\nif ( v9 == a2 )\n{\nsub_407D33((void **)v12);\nbreak;\n}\nfor ( j = 0; j < *(_DWORD *)(*(_QWORD *)a1 + 96LL * v9 + 4); ++j )\n{\nv8 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 96LL * v9 + 16) + 4LL * j);\nv5 = (_DWORD *)(4LL * v8 + a4);\nif ( !--*v5 )\nsub_408081((__int64)v12, v8);\n}\n}\nfree(ptr);\n}\n\n\n\nQ:[a3,a4,a1,a2,v8,v9,v10,ptr,v12,v13,v14,v15,sub_40B2EF,sub_407CA8,sub_408081,sub_454BF9,sub_408191,sub_407D33,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'sink_id', 'a4': 'out_degree', 'a1': 'abg', 'a2': 'src_id', 'v8': 'in_id', 'v9': 'cur_id', 'v10': 'id', 'ptr': 'max_out_weight', 'v12': 'q', 'v13': 'max_out_i', 'v14': 'max_w', 'v15': 'max_id', 'sub_40B2EF': 'abpoa_traverse_min_flow', 'sub_407CA8': 'kdq_init_int', 'sub_408081': 'kdq_push_int', 'sub_454BF9': 'err_malloc', 'sub_408191': 'kdq_shift_int', 'sub_407D33': 'kdq_destroy_int'}"} |
|
acttab_insert | f0c7d8e8df4927eaab94c7117a987427f6a198b09c330e385bbf6a16fdb67a15 | mingodad | ljs | NA | int acttab_insert(acttab *p, int makeItSafe){
int i, j, k, n, end;
assert( p->nLookahead>0 );
/* Make sure we have enough space to hold the expanded action table
** in the worst case. The worst case occurs if the transaction set
** must be appended to the current action table
*/
n = p->nsymbol + 1;
if( p->nAction + n >= p->nActionAlloc ){
int oldAlloc = p->nActionAlloc;
p->nActionAlloc = p->nAction + n + p->nActionAlloc + 20;
p->aAction = (struct lookahead_action *) realloc( p->aAction,
sizeof(p->aAction[0])*p->nActionAlloc);
if( p->aAction==0 ){
fprintf(stderr,"malloc failed\n");
exit(1);
}
for(i=oldAlloc; i<p->nActionAlloc; i++){
p->aAction[i].lookahead = -1;
p->aAction[i].action = -1;
}
}
/* Scan the existing action table looking for an offset that is a
** duplicate of the current transaction set. Fall out of the loop
** if and when the duplicate is found.
**
** i is the index in p->aAction[] where p->mnLookahead is inserted.
*/
end = makeItSafe ? p->mnLookahead : 0;
for(i=p->nAction-1; i>=end; i--){
if( p->aAction[i].lookahead==p->mnLookahead ){
/* All lookaheads and actions in the aLookahead[] transaction
** must match against the candidate aAction[i] entry. */
if( p->aAction[i].action!=p->mnAction ) continue;
for(j=0; j<p->nLookahead; j++){
k = p->aLookahead[j].lookahead - p->mnLookahead + i;
if( k<0 || k>=p->nAction ) break;
if( p->aLookahead[j].lookahead!=p->aAction[k].lookahead ) break;
if( p->aLookahead[j].action!=p->aAction[k].action ) break;
}
if( j<p->nLookahead ) continue;
/* No possible lookahead value that is not in the aLookahead[]
** transaction is allowed to match aAction[i] */
n = 0;
for(j=0; j<p->nAction; j++){
if( p->aAction[j].lookahead<0 ) continue;
if( p->aAction[j].lookahead==j+p->mnLookahead-i ) n++;
}
if( n==p->nLookahead ){
break; /* An exact match is found at offset i */
}
}
}
/* If no existing offsets exactly match the current transaction, find an
** an empty offset in the aAction[] table in which we can add the
** aLookahead[] transaction.
*/
if( i<end ){
/* Look for holes in the aAction[] table that fit the current
** aLookahead[] transaction. Leave i set to the offset of the hole.
** If no holes are found, i is left at p->nAction, which means the
** transaction will be appended. */
i = makeItSafe ? p->mnLookahead : 0;
for(; i<p->nActionAlloc - p->mxLookahead; i++){
if( p->aAction[i].lookahead<0 ){
for(j=0; j<p->nLookahead; j++){
k = p->aLookahead[j].lookahead - p->mnLookahead + i;
if( k<0 ) break;
if( p->aAction[k].lookahead>=0 ) break;
}
if( j<p->nLookahead ) continue;
for(j=0; j<p->nAction; j++){
if( p->aAction[j].lookahead==j+p->mnLookahead-i ) break;
}
if( j==p->nAction ){
break; /* Fits in empty slots */
}
}
}
}
/* Insert transaction set at index i. */
#if 0
printf("Acttab:");
for(j=0; j<p->nLookahead; j++){
printf(" %d", p->aLookahead[j].lookahead);
}
printf(" inserted at %d\n", i);
#endif
for(j=0; j<p->nLookahead; j++){
k = p->aLookahead[j].lookahead - p->mnLookahead + i;
p->aAction[k] = p->aLookahead[j];
if( k>=p->nAction ) p->nAction = k+1;
}
if( makeItSafe && i+p->nterminal>=p->nAction ) p->nAction = i+p->nterminal+1;
p->nLookahead = 0;
/* Return the offset that is added to the lookahead in order to get the
** index into yy_action of the action */
return i - p->mnLookahead;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401F23", "function_addr": 4202275, "binary_name": "f0c7d8e8df4927eaab94c7117a987427f6a198b09c330e385bbf6a16fdb67a15.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_2C], esi"], [5, "mov rax, [rbp+var_28]"], [6, "mov eax, [rax+24h]"], [7, "test eax, eax"], [8, "jg short loc_401F56"], [9, "mov ecx, offset function"], [10, "mov edx, 2C8h"], [11, "mov esi, offset file"], [12, "mov edi, offset assertion"], [13, "call ___assert_fail"], [14, "mov rax, [rbp+var_28]"], [15, "mov eax, [rax+30h]"], [16, "add eax, 1"], [17, "mov [rbp+var_C], eax"], [18, "mov rax, [rbp+var_28]"], [19, "mov edx, [rax]"], [20, "mov eax, [rbp+var_C]"], [21, "add edx, eax"], [22, "mov rax, [rbp+var_28]"], [23, "mov eax, [rax+4]"], [24, "cmp edx, eax"], [25, "jl loc_402053"], [26, "mov rax, [rbp+var_28]"], [27, "mov eax, [rax+4]"], [28, "mov [rbp+var_10], eax"], [29, "mov rax, [rbp+var_28]"], [30, "mov edx, [rax]"], [31, "mov eax, [rbp+var_C]"], [32, "add edx, eax"], [33, "mov rax, [rbp+var_28]"], [34, "mov eax, [rax+4]"], [35, "add eax, edx"], [36, "lea edx, [rax+14h]"], [37, "mov rax, [rbp+var_28]"], [38, "mov [rax+4], edx"], [39, "mov rax, [rbp+var_28]"], [40, "mov eax, [rax+4]"], [41, "cdqe"], [42, "lea rdx, ds:0[rax*8]"], [43, "mov rax, [rbp+var_28]"], [44, "mov rax, [rax+8]"], [45, "mov rsi, rdx"], [46, "mov rdi, rax"], [47, "call _realloc"], [48, "mov rdx, [rbp+var_28]"], [49, "mov [rdx+8], rax"], [50, "mov rax, [rbp+var_28]"], [51, "mov rax, [rax+8]"], [52, "test rax, rax"], [53, "jnz short loc_402006"], [54, "mov rax, cs:stderr"], [55, "mov rcx, rax"], [56, "mov edx, 0Eh"], [57, "mov esi, 1"], [58, "mov edi, offset aMallocFailed"], [59, "call _fwrite"], [60, "mov edi, 1"], [61, "call _exit"], [62, "mov eax, [rbp+var_10]"], [63, "mov [rbp+var_4], eax"], [64, "jmp short loc_402047"], [65, "mov rax, [rbp+var_28]"], [66, "mov rdx, [rax+8]"], [67, "mov eax, [rbp+var_4]"], [68, "cdqe"], [69, "shl rax, 3"], [70, "add rax, rdx"], [71, "mov dword ptr [rax], 0FFFFFFFFh"], [72, "mov rax, [rbp+var_28]"], [73, "mov rdx, [rax+8]"], [74, "mov eax, [rbp+var_4]"], [75, "cdqe"], [76, "shl rax, 3"], [77, "add rax, rdx"], [78, "mov dword ptr [rax+4], 0FFFFFFFFh"], [79, "add [rbp+var_4], 1"], [80, "mov rax, [rbp+var_28]"], [81, "mov eax, [rax+4]"], [82, "cmp [rbp+var_4], eax"], [83, "jl short loc_40200E"], [84, "cmp [rbp+var_2C], 0"], [85, "jz short loc_402062"], [86, "mov rax, [rbp+var_28]"], [87, "mov eax, [rax+18h]"], [88, "jmp short loc_402067"], [89, "mov eax, 0"], [90, "mov [rbp+var_14], eax"], [91, "mov rax, [rbp+var_28]"], [92, "mov eax, [rax]"], [93, "sub eax, 1"], [94, "mov [rbp+var_4], eax"], [95, "jmp loc_402215"], [96, "mov rax, [rbp+var_28]"], [97, "mov rdx, [rax+8]"], [98, "mov eax, [rbp+var_4]"], [99, "cdqe"], [100, "shl rax, 3"], [101, "add rax, rdx"], [102, "mov edx, [rax]"], [103, "mov rax, [rbp+var_28]"], [104, "mov eax, [rax+18h]"], [105, "cmp edx, eax"], [106, "jnz loc_402211"], [107, "mov rax, [rbp+var_28]"], [108, "mov rdx, [rax+8]"], [109, "mov eax, [rbp+var_4]"], [110, "cdqe"], [111, "shl rax, 3"], [112, "add rax, rdx"], [113, "mov edx, [rax+4]"], [114, "mov rax, [rbp+var_28]"], [115, "mov eax, [rax+1Ch]"], [116, "cmp edx, eax"], [117, "jnz loc_40220D"], [118, "mov [rbp+var_8], 0"], [119, "jmp loc_402174"], [120, "mov rax, [rbp+var_28]"], [121, "mov rdx, [rax+10h]"], [122, "mov eax, [rbp+var_8]"], [123, "cdqe"], [124, "shl rax, 3"], [125, "add rax, rdx"], [126, "mov edx, [rax]"], [127, "mov rax, [rbp+var_28]"], [128, "mov eax, [rax+18h]"], [129, "sub edx, eax"], [130, "mov eax, [rbp+var_4]"], [131, "add eax, edx"], [132, "mov [rbp+var_18], eax"], [133, "cmp [rbp+var_18], 0"], [134, "js loc_40218A"], [135, "mov rax, [rbp+var_28]"], [136, "mov eax, [rax]"], [137, "cmp [rbp+var_18], eax"], [138, "jge short loc_40218A"], [139, "mov rax, [rbp+var_28]"], [140, "mov rdx, [rax+10h]"], [141, "mov eax, [rbp+var_8]"], [142, "cdqe"], [143, "shl rax, 3"], [144, "add rax, rdx"], [145, "mov edx, [rax]"], [146, "mov rax, [rbp+var_28]"], [147, "mov rcx, [rax+8]"], [148, "mov eax, [rbp+var_18]"], [149, "cdqe"], [150, "shl rax, 3"], [151, "add rax, rcx"], [152, "mov eax, [rax]"], [153, "cmp edx, eax"], [154, "jnz short loc_402186"], [155, "mov rax, [rbp+var_28]"], [156, "mov rdx, [rax+10h]"], [157, "mov eax, [rbp+var_8]"], [158, "cdqe"], [159, "shl rax, 3"], [160, "add rax, rdx"], [161, "mov edx, [rax+4]"], [162, "mov rax, [rbp+var_28]"], [163, "mov rcx, [rax+8]"], [164, "mov eax, [rbp+var_18]"], [165, "cdqe"], [166, "shl rax, 3"], [167, "add rax, rcx"], [168, "mov eax, [rax+4]"], [169, "cmp edx, eax"], [170, "jnz short loc_402189"], [171, "add [rbp+var_8], 1"], [172, "mov rax, [rbp+var_28]"], [173, "mov eax, [rax+24h]"], [174, "cmp [rbp+var_8], eax"], [175, "jl loc_4020D2"], [176, "jmp short loc_40218A"], [177, "nop"], [178, "jmp short loc_40218A"], [179, "nop"], [180, "mov rax, [rbp+var_28]"], [181, "mov eax, [rax+24h]"], [182, "cmp [rbp+var_8], eax"], [183, "jl short loc_402210"], [184, "mov [rbp+var_C], 0"], [185, "mov [rbp+var_8], 0"], [186, "jmp short loc_4021F4"], [187, "mov rax, [rbp+var_28]"], [188, "mov rdx, [rax+8]"], [189, "mov eax, [rbp+var_8]"], [190, "cdqe"], [191, "shl rax, 3"], [192, "add rax, rdx"], [193, "mov eax, [rax]"], [194, "test eax, eax"], [195, "js short loc_4021EF"], [196, "mov rax, [rbp+var_28]"], [197, "mov rdx, [rax+8]"], [198, "mov eax, [rbp+var_8]"], [199, "cdqe"], [200, "shl rax, 3"], [201, "add rax, rdx"], [202, "mov edx, [rax]"], [203, "mov rax, [rbp+var_28]"], [204, "mov ecx, [rax+18h]"], [205, "mov eax, [rbp+var_8]"], [206, "add eax, ecx"], [207, "sub eax, [rbp+var_4]"], [208, "cmp edx, eax"], [209, "jnz short loc_4021F0"], [210, "add [rbp+var_C], 1"], [211, "jmp short loc_4021F0"], [212, "nop"], [213, "add [rbp+var_8], 1"], [214, "mov rax, [rbp+var_28]"], [215, "mov eax, [rax]"], [216, "cmp [rbp+var_8], eax"], [217, "jl short loc_4021A6"], [218, "mov rax, [rbp+var_28]"], [219, "mov eax, [rax+24h]"], [220, "cmp [rbp+var_C], eax"], [221, "jz short loc_402223"], [222, "jmp short loc_402211"], [223, "nop"], [224, "jmp short loc_402211"], [225, "nop"], [226, "sub [rbp+var_4], 1"], [227, "mov eax, [rbp+var_4]"], [228, "cmp eax, [rbp+var_14]"], [229, "jge loc_40207B"], [230, "jmp short loc_402224"], [231, "nop"], [232, "mov eax, [rbp+var_4]"], [233, "cmp eax, [rbp+var_14]"], [234, "jge loc_402350"], [235, "cmp [rbp+var_2C], 0"], [236, "jz short loc_40223F"], [237, "mov rax, [rbp+var_28]"], [238, "mov eax, [rax+18h]"], [239, "jmp short loc_402244"], [240, "mov eax, 0"], [241, "mov [rbp+var_4], eax"], [242, "jmp loc_402332"], [243, "mov rax, [rbp+var_28]"], [244, "mov rdx, [rax+8]"], [245, "mov eax, [rbp+var_4]"], [246, "cdqe"], [247, "shl rax, 3"], [248, "add rax, rdx"], [249, "mov eax, [rax]"], [250, "test eax, eax"], [251, "jns loc_40232E"], [252, "mov [rbp+var_8], 0"], [253, "jmp short loc_4022BE"], [254, "mov rax, [rbp+var_28]"], [255, "mov rdx, [rax+10h]"], [256, "mov eax, [rbp+var_8]"], [257, "cdqe"], [258, "shl rax, 3"], [259, "add rax, rdx"], [260, "mov edx, [rax]"], [261, "mov rax, [rbp+var_28]"], [262, "mov eax, [rax+18h]"], [263, "sub edx, eax"], [264, "mov eax, [rbp+var_4]"], [265, "add eax, edx"], [266, "mov [rbp+var_18], eax"], [267, "cmp [rbp+var_18], 0"], [268, "js short loc_4022CC"], [269, "mov rax, [rbp+var_28]"], [270, "mov rdx, [rax+8]"], [271, "mov eax, [rbp+var_18]"], [272, "cdqe"], [273, "shl rax, 3"], [274, "add rax, rdx"], [275, "mov eax, [rax]"], [276, "test eax, eax"], [277, "jns short loc_4022CF"], [278, "add [rbp+var_8], 1"], [279, "mov rax, [rbp+var_28]"], [280, "mov eax, [rax+24h]"], [281, "cmp [rbp+var_8], eax"], [282, "jl short loc_402273"], [283, "jmp short loc_4022D0"], [284, "nop"], [285, "jmp short loc_4022D0"], [286, "nop"], [287, "mov rax, [rbp+var_28]"], [288, "mov eax, [rax+24h]"], [289, "cmp [rbp+var_8], eax"], [290, "jl short loc_40232D"], [291, "mov [rbp+var_8], 0"], [292, "jmp short loc_402312"], [293, "mov rax, [rbp+var_28]"], [294, "mov rdx, [rax+8]"], [295, "mov eax, [rbp+var_8]"], [296, "cdqe"], [297, "shl rax, 3"], [298, "add rax, rdx"], [299, "mov edx, [rax]"], [300, "mov rax, [rbp+var_28]"], [301, "mov ecx, [rax+18h]"], [302, "mov eax, [rbp+var_8]"], [303, "add eax, ecx"], [304, "sub eax, [rbp+var_4]"], [305, "cmp edx, eax"], [306, "jz short loc_40231F"], [307, "add [rbp+var_8], 1"], [308, "mov rax, [rbp+var_28]"], [309, "mov eax, [rax]"], [310, "cmp [rbp+var_8], eax"], [311, "jl short loc_4022E5"], [312, "jmp short loc_402320"], [313, "nop"], [314, "mov rax, [rbp+var_28]"], [315, "mov eax, [rax]"], [316, "cmp [rbp+var_8], eax"], [317, "jz short loc_40234F"], [318, "jmp short loc_40232E"], [319, "nop"], [320, "add [rbp+var_4], 1"], [321, "mov rax, [rbp+var_28]"], [322, "mov edx, [rax+4]"], [323, "mov rax, [rbp+var_28]"], [324, "mov ecx, [rax+20h]"], [325, "mov eax, edx"], [326, "sub eax, ecx"], [327, "cmp [rbp+var_4], eax"], [328, "jl loc_40224C"], [329, "jmp short loc_402350"], [330, "nop"], [331, "mov [rbp+var_8], 0"], [332, "jmp short loc_4023CA"], [333, "mov rax, [rbp+var_28]"], [334, "mov rdx, [rax+10h]"], [335, "mov eax, [rbp+var_8]"], [336, "cdqe"], [337, "shl rax, 3"], [338, "add rax, rdx"], [339, "mov edx, [rax]"], [340, "mov rax, [rbp+var_28]"], [341, "mov eax, [rax+18h]"], [342, "sub edx, eax"], [343, "mov eax, [rbp+var_4]"], [344, "add eax, edx"], [345, "mov [rbp+var_18], eax"], [346, "mov rax, [rbp+var_28]"], [347, "mov rdx, [rax+10h]"], [348, "mov eax, [rbp+var_8]"], [349, "cdqe"], [350, "shl rax, 3"], [351, "lea rcx, [rdx+rax]"], [352, "mov rax, [rbp+var_28]"], [353, "mov rdx, [rax+8]"], [354, "mov eax, [rbp+var_18]"], [355, "cdqe"], [356, "shl rax, 3"], [357, "add rdx, rax"], [358, "mov rax, [rcx]"], [359, "mov [rdx], rax"], [360, "mov rax, [rbp+var_28]"], [361, "mov eax, [rax]"], [362, "cmp [rbp+var_18], eax"], [363, "jl short loc_4023C6"], [364, "mov eax, [rbp+var_18]"], [365, "lea edx, [rax+1]"], [366, "mov rax, [rbp+var_28]"], [367, "mov [rax], edx"], [368, "add [rbp+var_8], 1"], [369, "mov rax, [rbp+var_28]"], [370, "mov eax, [rax+24h]"], [371, "cmp [rbp+var_8], eax"], [372, "jl short loc_402359"], [373, "cmp [rbp+var_2C], 0"], [374, "jz short loc_402407"], [375, "mov rax, [rbp+var_28]"], [376, "mov edx, [rax+2Ch]"], [377, "mov eax, [rbp+var_4]"], [378, "add edx, eax"], [379, "mov rax, [rbp+var_28]"], [380, "mov eax, [rax]"], [381, "cmp edx, eax"], [382, "jl short loc_402407"], [383, "mov rax, [rbp+var_28]"], [384, "mov edx, [rax+2Ch]"], [385, "mov eax, [rbp+var_4]"], [386, "add eax, edx"], [387, "lea edx, [rax+1]"], [388, "mov rax, [rbp+var_28]"], [389, "mov [rax], edx"], [390, "mov rax, [rbp+var_28]"], [391, "mov dword ptr [rax+24h], 0"], [392, "mov rax, [rbp+var_28]"], [393, "mov edx, [rax+18h]"], [394, "mov eax, [rbp+var_4]"], [395, "sub eax, edx"], [396, "leave"], [397, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [14, 3], [15, 14], [16, 15], [17, 16], [18, 3], [19, 18], [20, 17], [21, 20], [21, 19], [22, 3], [23, 22], [24, 21], [24, 23], [25, 24], [26, 3], [27, 26], [28, 27], [29, 3], [30, 29], [31, 17], [32, 31], [32, 30], [33, 3], [34, 33], [35, 34], [35, 32], [36, 32], [36, 35], [37, 3], [38, 36], [38, 37], [39, 3], [40, 39], [40, 38], [42, 36], [43, 3], [44, 38], [44, 43], [45, 42], [46, 44], [48, 3], [49, 48], [49, 47], [50, 3], [51, 50], [51, 49], [52, 51], [53, 52], [55, 54], [62, 28], [63, 62], [65, 3], [66, 71], [66, 38], [66, 65], [66, 78], [66, 49], [67, 63], [67, 79], [69, 67], [70, 66], [70, 69], [71, 70], [72, 3], [73, 72], [73, 71], [74, 79], [74, 63], [76, 74], [77, 76], [77, 73], [78, 77], [79, 63], [79, 79], [80, 3], [81, 78], [81, 49], [81, 71], [81, 80], [81, 38], [82, 79], [82, 63], [82, 81], [83, 82], [84, 4], [85, 84], [86, 3], [87, 78], [87, 49], [87, 86], [87, 71], [87, 38], [90, 87], [90, 89], [91, 3], [92, 78], [92, 49], [92, 91], [92, 71], [92, 38], [93, 92], [94, 93], [96, 3], [97, 49], [97, 71], [97, 38], [97, 78], [97, 96], [98, 226], [98, 94], [100, 98], [101, 97], [101, 100], [102, 71], [102, 38], [102, 101], [102, 78], [102, 49], [103, 3], [104, 71], [104, 38], [104, 78], [104, 49], [104, 103], [105, 104], [105, 102], [106, 105], [107, 3], [108, 49], [108, 71], [108, 38], [108, 107], [108, 78], [109, 226], [109, 94], [111, 109], [112, 111], [112, 108], [113, 71], [113, 38], [113, 112], [113, 78], [113, 49], [114, 3], [115, 71], [115, 38], [115, 78], [115, 49], [115, 114], [116, 113], [116, 115], [117, 116], [120, 3], [121, 71], [121, 38], [121, 120], [121, 78], [121, 49], [122, 118], [122, 171], [124, 122], [125, 121], [125, 124], [126, 71], [126, 125], [126, 78], [126, 49], [126, 38], [127, 3], [128, 78], [128, 49], [128, 127], [128, 71], [128, 38], [129, 128], [129, 126], [130, 226], [130, 94], [131, 130], [131, 129], [132, 131], [133, 132], [134, 133], [135, 3], [136, 135], [136, 78], [136, 49], [136, 38], [136, 71], [137, 132], [137, 136], [138, 137], [139, 3], [140, 71], [140, 38], [140, 139], [140, 78], [140, 49], [141, 118], [141, 171], [143, 141], [144, 143], [144, 140], [145, 71], [145, 38], [145, 144], [145, 78], [145, 49], [146, 3], [147, 78], [147, 49], [147, 71], [147, 146], [147, 38], [148, 132], [150, 148], [151, 150], [151, 147], [152, 78], [152, 49], [152, 71], [152, 151], [152, 38], [153, 152], [153, 145], [154, 153], [155, 3], [156, 71], [156, 78], [156, 49], [156, 155], [156, 38], [157, 118], [157, 171], [159, 157], [160, 156], [160, 159], [161, 78], [161, 49], [161, 160], [161, 38], [161, 71], [162, 3], [163, 78], [163, 49], [163, 71], [163, 38], [163, 162], [164, 132], [166, 164], [167, 163], [167, 166], [168, 49], [168, 71], [168, 38], [168, 167], [168, 78], [169, 161], [169, 168], [170, 169], [171, 118], [171, 171], [172, 3], [173, 49], [173, 71], [173, 38], [173, 172], [173, 78], [174, 171], [174, 173], [174, 118], [175, 174], [180, 3], [181, 71], [181, 38], [181, 78], [181, 180], [181, 49], [182, 118], [182, 181], [182, 171], [183, 182], [187, 3], [188, 187], [188, 78], [188, 49], [188, 71], [188, 38], [189, 213], [189, 185], [191, 189], [192, 188], [192, 191], [193, 49], [193, 71], [193, 192], [193, 38], [193, 78], [194, 193], [195, 194], [196, 3], [197, 196], [197, 78], [197, 49], [197, 71], [197, 38], [198, 213], [198, 185], [200, 198], [201, 197], [201, 200], [202, 78], [202, 49], [202, 71], [202, 201], [202, 38], [203, 3], [204, 203], [204, 49], [204, 71], [204, 38], [204, 78], [205, 213], [205, 185], [206, 205], [206, 204], [207, 226], [207, 206], [207, 94], [208, 207], [208, 202], [209, 208], [210, 184], [210, 210], [213, 185], [213, 213], [214, 3], [215, 49], [215, 71], [215, 38], [215, 214], [215, 78], [216, 215], [216, 213], [216, 185], [217, 216], [218, 3], [219, 38], [219, 218], [219, 78], [219, 49], [219, 71], [220, 184], [220, 210], [220, 219], [221, 220], [226, 226], [226, 94], [227, 94], [227, 226], [228, 90], [228, 227], [229, 228], [232, 94], [232, 226], [233, 90], [233, 232], [234, 233], [235, 4], [236, 235], [237, 3], [238, 71], [238, 38], [238, 237], [238, 78], [238, 49], [241, 238], [241, 240], [243, 3], [244, 49], [244, 71], [244, 38], [244, 243], [244, 78], [245, 320], [245, 241], [247, 245], [248, 244], [248, 247], [249, 71], [249, 38], [249, 78], [249, 248], [249, 49], [250, 249], [251, 250], [254, 3], [255, 49], [255, 71], [255, 38], [255, 78], [255, 254], [256, 278], [256, 252], [258, 256], [259, 255], [259, 258], [260, 71], [260, 38], [260, 78], [260, 49], [260, 259], [261, 3], [262, 261], [262, 78], [262, 49], [262, 71], [262, 38], [263, 262], [263, 260], [264, 320], [264, 241], [265, 264], [265, 263], [266, 265], [267, 266], [268, 267], [269, 3], [270, 78], [270, 269], [270, 49], [270, 71], [270, 38], [271, 266], [273, 271], [274, 270], [274, 273], [275, 78], [275, 49], [275, 71], [275, 38], [275, 274], [276, 275], [277, 276], [278, 278], [278, 252], [279, 3], [280, 49], [280, 71], [280, 38], [280, 279], [280, 78], [281, 278], [281, 280], [281, 252], [282, 281], [287, 3], [288, 49], [288, 71], [288, 38], [288, 78], [288, 287], [289, 278], [289, 252], [289, 288], [290, 289], [293, 3], [294, 78], [294, 49], [294, 71], [294, 38], [294, 293], [295, 307], [295, 291], [297, 295], [298, 294], [298, 297], [299, 49], [299, 71], [299, 38], [299, 298], [299, 78], [300, 3], [301, 71], [301, 38], [301, 78], [301, 49], [301, 300], [302, 291], [302, 307], [303, 302], [303, 301], [304, 303], [304, 241], [304, 320], [305, 304], [305, 299], [306, 305], [307, 307], [307, 291], [308, 3], [309, 71], [309, 308], [309, 38], [309, 78], [309, 49], [310, 291], [310, 309], [310, 307], [311, 310], [314, 3], [315, 71], [315, 38], [315, 78], [315, 49], [315, 314], [316, 315], [316, 291], [316, 307], [317, 316], [320, 241], [320, 320], [321, 3], [322, 38], [322, 321], [322, 78], [322, 49], [322, 71], [323, 3], [324, 78], [324, 49], [324, 323], [324, 71], [324, 38], [325, 322], [326, 325], [326, 324], [327, 241], [327, 320], [327, 326], [328, 327], [333, 3], [334, 359], [334, 71], [334, 38], [334, 367], [334, 78], [334, 333], [334, 49], [335, 368], [335, 331], [337, 335], [338, 334], [338, 337], [339, 359], [339, 71], [339, 38], [339, 367], [339, 78], [339, 338], [339, 49], [340, 3], [341, 367], [341, 78], [341, 49], [341, 359], [341, 71], [341, 340], [341, 38], [342, 341], [342, 339], [343, 241], [343, 320], [343, 226], [343, 94], [344, 343], [344, 342], [345, 344], [346, 3], [347, 346], [347, 359], [347, 71], [347, 38], [347, 367], [347, 78], [347, 49], [348, 368], [348, 331], [350, 348], [351, 204], [351, 78], [351, 324], [351, 301], [351, 49], [351, 147], [351, 351], [351, 350], [351, 359], [351, 71], [351, 38], [351, 163], [351, 367], [352, 3], [353, 359], [353, 71], [353, 38], [353, 367], [353, 78], [353, 352], [353, 49], [354, 345], [356, 354], [357, 353], [357, 356], [358, 351], [358, 359], [358, 71], [358, 38], [358, 367], [358, 78], [358, 49], [359, 358], [359, 357], [360, 3], [361, 360], [361, 359], [361, 71], [361, 367], [362, 361], [362, 345], [363, 362], [364, 345], [365, 367], [365, 357], [365, 78], [365, 49], [365, 364], [365, 359], [365, 71], [365, 38], [366, 3], [367, 365], [367, 366], [368, 368], [368, 331], [369, 3], [370, 78], [370, 49], [370, 369], [370, 359], [370, 71], [370, 38], [370, 367], [371, 368], [371, 370], [371, 331], [372, 371], [373, 4], [374, 373], [375, 3], [376, 367], [376, 78], [376, 49], [376, 375], [376, 359], [376, 71], [376, 38], [377, 94], [377, 241], [377, 226], [377, 320], [378, 377], [378, 376], [379, 3], [380, 379], [380, 359], [380, 71], [380, 38], [380, 367], [380, 78], [380, 49], [381, 378], [381, 380], [382, 381], [383, 3], [384, 367], [384, 78], [384, 49], [384, 389], [384, 383], [384, 359], [384, 71], [384, 38], [385, 241], [385, 226], [385, 320], [385, 94], [386, 384], [386, 385], [387, 386], [387, 367], [387, 389], [387, 78], [387, 49], [387, 384], [387, 359], [387, 71], [387, 38], [388, 3], [389, 388], [389, 387], [390, 3], [391, 390], [392, 3], [393, 391], [393, 392], [394, 94], [394, 320], [394, 241], [394, 226], [395, 394], [395, 393], [397, 395]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f0c7d8e8df4927eaab94c7117a987427f6a198b09c330e385bbf6a16fdb67a15_f0c7d8e8df4927eaab94c7117a987427f6a198b09c330e385bbf6a16fdb67a15.jsonl.gz", "strip_func_name": "sub_401F23", "query": "\n\n\n__int64 __fastcall sub_401F23(__int64 a1, int a2)\n{\nint v2; // eax\nint v3; // eax\nint v5; // [rsp+18h] [rbp-18h]\nint v6; // [rsp+18h] [rbp-18h]\nint v7; // [rsp+18h] [rbp-18h]\nint v8; // [rsp+20h] [rbp-10h]\nint v9; // [rsp+24h] [rbp-Ch]\nint v10; // [rsp+24h] [rbp-Ch]\nint k; // [rsp+28h] [rbp-8h]\nint l; // [rsp+28h] [rbp-8h]\nint m; // [rsp+28h] [rbp-8h]\nint n; // [rsp+28h] [rbp-8h]\nint ii; // [rsp+28h] [rbp-8h]\nint i; // [rsp+2Ch] [rbp-4h]\nint j; // [rsp+2Ch] [rbp-4h]\n\nif ( *(int *)(a1 + 36) <= 0 )\n__assert_fail(\"p->nLookahead>0\", \"lemon.c\", 0x2C8u, \"acttab_insert\");\nv9 = *(_DWORD *)(a1 + 48) + 1;\nif ( v9 + *(_DWORD *)a1 >= *(_DWORD *)(a1 + 4) )\n{\nv8 = *(_DWORD *)(a1 + 4);\n*(_DWORD *)(a1 + 4) = v9 + *(_DWORD *)a1 + v8 + 20;\n*(_QWORD *)(a1 + 8) = realloc(*(void **)(a1 + 8), 8LL * *(int *)(a1 + 4));\nif ( !*(_QWORD *)(a1 + 8) )\n{\nfwrite(\"malloc failed\\n\", 1uLL, 0xEuLL, stderr);\nexit(1);\n}\nfor ( i = v8; i < *(_DWORD *)(a1 + 4); ++i )\n{\n*(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * i) = -1;\n*(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * i + 4) = -1;\n}\n}\nif ( a2 )\nv2 = *(_DWORD *)(a1 + 24);\nelse\nv2 = 0;\nfor ( j = *(_DWORD *)a1 - 1; j >= v2; --j )\n{\nif ( *(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * j) == *(_DWORD *)(a1 + 24)\n&& *(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * j + 4) == *(_DWORD *)(a1 + 28) )\n{\nfor ( k = 0; k < *(_DWORD *)(a1 + 36); ++k )\n{\nv5 = *(_DWORD *)(*(_QWORD *)(a1 + 16) + 8LL * k) - *(_DWORD *)(a1 + 24) + j;\nif ( v5 < 0\n|| v5 >= *(_DWORD *)a1\n|| *(_DWORD *)(*(_QWORD *)(a1 + 16) + 8LL * k) != *(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * v5)\n|| *(_DWORD *)(*(_QWORD *)(a1 + 16) + 8LL * k + 4) != *(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * v5 + 4) )\n{\nbreak;\n}\n}\nif ( k >= *(_DWORD *)(a1 + 36) )\n{\nv10 = 0;\nfor ( l = 0; l < *(_DWORD *)a1; ++l )\n{\nif ( *(int *)(*(_QWORD *)(a1 + 8) + 8LL * l) >= 0\n&& *(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * l) == *(_DWORD *)(a1 + 24) + l - j )\n{\n++v10;\n}\n}\nif ( v10 == *(_DWORD *)(a1 + 36) )\nbreak;\n}\n}\n}\nif ( j < v2 )\n{\nif ( a2 )\nv3 = *(_DWORD *)(a1 + 24);\nelse\nv3 = 0;\nfor ( j = v3; j < *(_DWORD *)(a1 + 4) - *(_DWORD *)(a1 + 32); ++j )\n{\nif ( *(int *)(*(_QWORD *)(a1 + 8) + 8LL * j) < 0 )\n{\nfor ( m = 0; m < *(_DWORD *)(a1 + 36); ++m )\n{\nv6 = *(_DWORD *)(*(_QWORD *)(a1 + 16) + 8LL * m) - *(_DWORD *)(a1 + 24) + j;\nif ( v6 < 0 || *(int *)(*(_QWORD *)(a1 + 8) + 8LL * v6) >= 0 )\nbreak;\n}\nif ( m >= *(_DWORD *)(a1 + 36) )\n{\nfor ( n = 0; n < *(_DWORD *)a1 && *(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL * n) != *(_DWORD *)(a1 + 24) + n - j; ++n )\n;\nif ( n == *(_DWORD *)a1 )\nbreak;\n}\n}\n}\n}\nfor ( ii = 0; ii < *(_DWORD *)(a1 + 36); ++ii )\n{\nv7 = *(_DWORD *)(*(_QWORD *)(a1 + 16) + 8LL * ii) - *(_DWORD *)(a1 + 24) + j;\n*(_QWORD *)(8LL * v7 + *(_QWORD *)(a1 + 8)) = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * ii);\nif ( v7 >= *(_DWORD *)a1 )\n*(_DWORD *)a1 = v7 + 1;\n}\nif ( a2 && j + *(_DWORD *)(a1 + 44) >= *(_DWORD *)a1 )\n*(_DWORD *)a1 = *(_DWORD *)(a1 + 44) + j + 1;\n*(_DWORD *)(a1 + 36) = 0;\nreturn (unsigned int)(j - *(_DWORD *)(a1 + 24));\n}\n\n\n\nQ:[a1,a2,v7,v8,v9,l,sub_401F23,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'p', 'a2': 'makeItSafe', 'v7': 'kb', 'v8': 'oldAlloc', 'v9': 'na', 'l': 'ja', 'sub_401F23': 'acttab_insert'}"} |
|
sl_bt_coex_set_parameters | 529e6a3b5772392e8c5f2e0a72b05b900d791e2079b304076f17133868aedcd0 | openthread | ot-efr32 | NA | sl_status_t sl_bt_coex_set_parameters(uint8_t priority,
uint8_t request,
uint8_t pwm_period,
uint8_t pwm_dutycycle) {
struct sl_bt_packet *cmd = (struct sl_bt_packet *)sl_bt_cmd_msg;
struct sl_bt_packet *rsp = (struct sl_bt_packet *)sl_bt_rsp_msg;
cmd->data.cmd_coex_set_parameters.priority=priority;
cmd->data.cmd_coex_set_parameters.request=request;
cmd->data.cmd_coex_set_parameters.pwm_period=pwm_period;
cmd->data.cmd_coex_set_parameters.pwm_dutycycle=pwm_dutycycle;
cmd->header=sl_bt_cmd_coex_set_parameters_id+(((4)&0xff)<<8)+(((4)&0x700)>>8);
sl_bt_host_handle_command();
return rsp->data.rsp_coex_set_parameters.result;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4081C2", "function_addr": 4227522, "binary_name": "529e6a3b5772392e8c5f2e0a72b05b900d791e2079b304076f17133868aedcd0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov eax, ecx"], [4, "mov ecx, edi"], [5, "mov [rbp+var_14], cl"], [6, "mov ecx, esi"], [7, "mov [rbp+var_18], cl"], [8, "mov [rbp+var_1C], dl"], [9, "mov [rbp+var_20], al"], [10, "mov rax, cs:off_410200"], [11, "mov [rbp+var_8], rax"], [12, "mov rax, cs:off_410208"], [13, "mov [rbp+var_10], rax"], [14, "mov rax, [rbp+var_8]"], [15, "movzx edx, [rbp+var_14]"], [16, "mov [rax+4], dl"], [17, "mov rax, [rbp+var_8]"], [18, "movzx edx, [rbp+var_18]"], [19, "mov [rax+5], dl"], [20, "mov rax, [rbp+var_8]"], [21, "movzx edx, [rbp+var_1C]"], [22, "mov [rax+6], dl"], [23, "mov rax, [rbp+var_8]"], [24, "movzx edx, [rbp+var_20]"], [25, "mov [rax+7], dl"], [26, "mov rax, [rbp+var_8]"], [27, "mov dword ptr [rax], 2200420h"], [28, "mov eax, 0"], [29, "call sub_402A9E"], [30, "mov rax, [rbp+var_10]"], [31, "movzx eax, word ptr [rax+4]"], [32, "movzx eax, ax"], [33, "leave"], [34, "retn"]], "data_dep": [[5, 4], [7, 6], [9, 3], [11, 10], [13, 12], [14, 11], [15, 5], [16, 15], [16, 14], [17, 11], [18, 7], [19, 18], [19, 17], [20, 11], [21, 8], [22, 20], [22, 21], [23, 11], [24, 9], [25, 23], [25, 24], [26, 11], [27, 26], [30, 13], [31, 16], [31, 30], [31, 27], [32, 31], [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/529e6a3b5772392e8c5f2e0a72b05b900d791e2079b304076f17133868aedcd0_529e6a3b5772392e8c5f2e0a72b05b900d791e2079b304076f17133868aedcd0.jsonl.gz", "strip_func_name": "sub_4081C2", "query": "\n\n\n__int64 __fastcall sub_4081C2(__int64 a1, __int64 a2, char a3, char a4)\n{\nunsigned __int16 *v5; // [rsp+10h] [rbp-10h]\n_BYTE *v6; // [rsp+18h] [rbp-8h]\n\nv6 = off_410200;\nv5 = (unsigned __int16 *)off_410208;\n*((_BYTE *)off_410200 + 4) = a1;\nv6[5] = a2;\nv6[6] = a3;\nv6[7] = a4;\n*(_DWORD *)v6 = 35652640;\nsub_402A9E(a1, a2);\nreturn v5[2];\n}\n\n\n\nQ:[a3,a4,a1,a2,v5,v6,sub_4081C2,sub_402A9E,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'pwm_period', 'a4': 'pwm_dutycycle', 'a1': 'priority', 'a2': 'request', 'v5': 'rsp_0', 'v6': 'cmd', 'sub_4081C2': 'sl_bt_coex_set_parameters', 'sub_402A9E': 'sl_bt_host_handle_command'}"} |
|
bpf_program__pin | dbf98db2a0f1b887d4bf144dd282b41d458f005787ca0a1575346fa1b41f63d5 | intel | uintr-linux-kernel | NA | int bpf_program__pin(struct bpf_program *prog, const char *path)
{
char *cp, errmsg[STRERR_BUFSIZE];
int err;
if (prog->fd < 0) {
pr_warn("prog '%s': can't pin program that wasn't loaded\n", prog->name);
return libbpf_err(-EINVAL);
}
err = make_parent_dir(path);
if (err)
return libbpf_err(err);
err = check_path(path);
if (err)
return libbpf_err(err);
if (bpf_obj_pin(prog->fd, path)) {
err = -errno;
cp = libbpf_strerror_r(err, errmsg, sizeof(errmsg));
pr_warn("prog '%s': failed to pin at '%s': %s\n", prog->name, path, cp);
return libbpf_err(err);
}
pr_debug("prog '%s': pinned at '%s'\n", prog->name, path);
return 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41C1E2", "function_addr": 4309474, "binary_name": "dbf98db2a0f1b887d4bf144dd282b41d458f005787ca0a1575346fa1b41f63d5.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0A0h"], [3, "mov [rbp+var_98], rdi"], [4, "mov [rbp+var_A0], rsi"], [5, "mov rax, [rbp+var_98]"], [6, "mov eax, [rax+78h]"], [7, "test eax, eax"], [8, "jns short loc_41C239"], [9, "mov rax, [rbp+var_98]"], [10, "mov rax, [rax]"], [11, "mov rdx, rax"], [12, "mov esi, offset aLibbpfProgSCan"], [13, "mov edi, 0"], [14, "mov eax, 0"], [15, "call sub_40A1CF"], [16, "mov edi, 0FFFFFFEAh"], [17, "call sub_40A000"], [18, "jmp locret_41C33D"], [19, "mov rax, [rbp+var_A0]"], [20, "mov rdi, rax"], [21, "call sub_41BFF4"], [22, "mov [rbp+var_4], eax"], [23, "cmp [rbp+var_4], 0"], [24, "jz short loc_41C260"], [25, "mov eax, [rbp+var_4]"], [26, "mov edi, eax"], [27, "call sub_40A000"], [28, "jmp locret_41C33D"], [29, "mov rax, [rbp+var_A0]"], [30, "mov rdi, rax"], [31, "call sub_41C0CB"], [32, "mov [rbp+var_4], eax"], [33, "cmp [rbp+var_4], 0"], [34, "jz short loc_41C287"], [35, "mov eax, [rbp+var_4]"], [36, "mov edi, eax"], [37, "call sub_40A000"], [38, "jmp locret_41C33D"], [39, "mov rax, [rbp+var_98]"], [40, "mov eax, [rax+78h]"], [41, "mov rdx, [rbp+var_A0]"], [42, "mov rsi, rdx"], [43, "mov edi, eax"], [44, "call sub_428789"], [45, "test eax, eax"], [46, "jz short loc_41C30D"], [47, "call ___errno_location"], [48, "mov eax, [rax]"], [49, "neg eax"], [50, "mov [rbp+var_4], eax"], [51, "lea rcx, [rbp+var_90]"], [52, "mov eax, [rbp+var_4]"], [53, "mov edx, 80h"], [54, "mov rsi, rcx"], [55, "mov edi, eax"], [56, "call sub_433CC6"], [57, "mov [rbp+var_10], rax"], [58, "mov rax, [rbp+var_98]"], [59, "mov rax, [rax]"], [60, "mov rcx, [rbp+var_10]"], [61, "mov rdx, [rbp+var_A0]"], [62, "mov r8, rcx"], [63, "mov rcx, rdx"], [64, "mov rdx, rax"], [65, "mov esi, offset aLibbpfProgSFai_6"], [66, "mov edi, 0"], [67, "mov eax, 0"], [68, "call sub_40A1CF"], [69, "mov eax, [rbp+var_4]"], [70, "mov edi, eax"], [71, "call sub_40A000"], [72, "jmp short locret_41C33D"], [73, "mov rax, [rbp+var_98]"], [74, "mov rax, [rax]"], [75, "mov rdx, [rbp+var_A0]"], [76, "mov rcx, rdx"], [77, "mov rdx, rax"], [78, "mov esi, offset aLibbpfProgSPin"], [79, "mov edi, 2"], [80, "mov eax, 0"], [81, "call sub_40A1CF"], [82, "mov eax, 0"], [83, "leave"], [84, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [9, 3], [10, 9], [11, 10], [19, 4], [20, 19], [22, 21], [23, 22], [24, 23], [25, 22], [26, 25], [29, 4], [30, 29], [32, 31], [33, 32], [34, 33], [35, 32], [36, 35], [39, 3], [40, 39], [41, 4], [42, 41], [43, 40], [45, 44], [46, 45], [48, 47], [49, 48], [50, 49], [52, 50], [54, 51], [55, 52], [57, 56], [58, 3], [59, 58], [60, 57], [61, 4], [62, 60], [63, 61], [64, 59], [69, 50], [70, 69], [73, 3], [74, 73], [75, 4], [76, 75], [77, 74], [84, 17], [84, 71], [84, 37], [84, 82], [84, 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/dbf98db2a0f1b887d4bf144dd282b41d458f005787ca0a1575346fa1b41f63d5_dbf98db2a0f1b887d4bf144dd282b41d458f005787ca0a1575346fa1b41f63d5.jsonl.gz", "strip_func_name": "sub_41C1E2", "query": "\n\n\n__int64 __fastcall sub_41C1E2(__int64 a1, const char *a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 result; // rax\n__int64 v7; // r8\n__int64 v8; // r9\n__int64 v9; // r9\nchar v10[128]; // [rsp+10h] [rbp-90h] BYREF\n__int64 v11; // [rsp+90h] [rbp-10h]\nunsigned int v12; // [rsp+9Ch] [rbp-4h]\n\nif ( *(int *)(a1 + 120) >= 0 )\n{\nv12 = sub_41BFF4(a2);\nif ( v12 || (v12 = sub_41C0CB(a2)) != 0 )\n{\nresult = sub_40A000(v12);\n}\nelse if ( (unsigned int)sub_428789(*(unsigned int *)(a1 + 120), a2) )\n{\nv12 = -*__errno_location();\nv11 = sub_433CC6(v12, v10, 128LL);\nsub_40A1CF(0, (__int64)\"libbpf: prog '%s': failed to pin at '%s': %s\\n\", *(_QWORD *)a1, (__int64)a2, v11, v9);\nresult = sub_40A000(v12);\n}\nelse\n{\nsub_40A1CF(2u, (__int64)\"libbpf: prog '%s': pinned at '%s'\\n\", *(_QWORD *)a1, (__int64)a2, v7, v8);\nresult = 0LL;\n}\n}\nelse\n{\nsub_40A1CF(0, (__int64)\"libbpf: prog '%s': can't pin program that wasn't loaded\\n\", *(_QWORD *)a1, a4, a5, a6);\nresult = sub_40A000(-22);\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v10,v11,v12,sub_41C1E2,sub_41BFF4,sub_41C0CB,sub_40A000,sub_428789,sub_433CC6,sub_40A1CF,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'prog', 'a2': 'path', 'v10': 'errmsg', 'v11': 'cp', 'v12': 'err', 'sub_41C1E2': 'bpf_program__pin', 'sub_41BFF4': 'make_parent_dir', 'sub_41C0CB': 'check_path', 'sub_40A000': 'libbpf_err', 'sub_428789': 'bpf_obj_pin', 'sub_433CC6': 'libbpf_strerror_r', 'sub_40A1CF': 'libbpf_print'}"} |
|
load_and_run | c67a45b606b1e401da6a64dcaa2fb5a203009677d0b64885b9df30abfcc14882 | rdebath | Brainfuck | NA | void
load_and_run(char ** filelist, int filecount)
{
FILE * ifd;
int ch, lastch=']', c=0, m, b=0, lc=0, ar, inp=0;
int digits = 0, number = 0, ov_flg = 0, multi = 1;
int qstring = 0;
char * xc = 0;
if (disable_init_optim)
lastch = 0;
/* Now we do it ... */
outrun('!', 0);
for(ar=0; ar<filecount; ar++) {
if (strcmp(filelist[ar], "-") == 0) {
ifd = stdin;
current_file = "stdin";
} else if((ifd = fopen(filelist[ar],"r")) == 0) {
perror(filelist[ar]); exit(1);
} else
current_file = filelist[ar];
while((ch = getc(ifd)) != EOF && (ifd!=stdin || ch != '!' ||
b || !inp || lc || qstring)) {
/* Quoted strings are printed. (And set current cell) */
if (qstring) {
if (ch == '"') {
qstring++;
if (qstring == 2) continue;
if (qstring == 3) qstring = 1;
}
if (qstring == 2) {
qstring = 0;
} else {
outrun('=', ch); outrun('.', 0);
lastch = '.'; c = 0;
continue;
}
}
/* Source RLE decoding */
if (ch >= '0' && ch <= '9') {
digits = 1;
number = ov_iadd(ov_imul(number, 10, &ov_flg), ch-'0', &ov_flg);
continue;
}
if (ch == ' ' || ch == '\t') continue;
if (!digits || ov_flg) number = 1;
/*GCC*/ digits=ov_flg=0;
multi = enable_rle?number:1; number = 0;
/* These chars are RLE */
m = (ch == '>' || ch == '<' || ch == '+' || ch == '-');
/* These ones are not */
if(!m && ch != '[' && ch != ']' && ch != '.' && ch != ',' &&
(ch != '#' || !enable_debug) &&
(!extra_commands || (xc = strchr(extra_commands, ch)) == 0) &&
((ch != '"' && ch != '=') || !enable_rle)) continue;
/* Check for loop comments; ie: ][ comment ] */
if (lc || (ch=='[' && lastch==']' && enable_optim)) {
lc += (ch=='[') - (ch==']'); continue;
}
if (lc) continue;
/* Do the RLE */
if (m && ch == lastch) {
int ov=0, res;
res = ov_iadd(c, multi, &ov);
if (!ov) { c = res; continue; }
}
/* Post the RLE token onward */
if (c) { outrun(lastch, c); c=0; }
if (!m) {
/* Non RLE tokens here */
if (xc) {
outrun(256+(xc-extra_commands), 0);
xc = 0;
continue;
}
if (ch == '"') { qstring++; continue; }
if (ch == ',') {
inp = 1;
if (eofcell == 1) outrun('=', 0);
if (eofcell == 2) outrun('=', -1);
}
if (!b && ch == ']') {
fprintf(stderr, "Warning: skipping unbalanced ']' command.\n");
continue; /* Ignore too many ']' */
}
b += (ch=='[') - (ch==']');
if (lastch == '[' && ch == ']') outrun('X', 1);
outrun(ch, 0);
} else
c = multi;
lastch = ch;
}
if (ifd != stdin) fclose(ifd);
}
if(c) outrun(lastch, c);
if(b>0) {
fprintf(stderr, "Warning: closing unbalanced '[' command.\n");
outrun('=', 0);
while(b>0){ outrun(']', 0); b--;} /* Not enough ']', add some. */
}
if (enable_debug && lastch != '#') outrun('#', 0);
outrun('~', 0);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402C83", "function_addr": 4205699, "binary_name": "c67a45b606b1e401da6a64dcaa2fb5a203009677d0b64885b9df30abfcc14882.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 68h"], [4, "mov [rbp+var_68], rdi"], [5, "mov [rbp+var_6C], esi"], [6, "mov [rbp+var_1C], 5Dh "], [7, "mov [rbp+var_20], 0"], [8, "mov [rbp+var_24], 0"], [9, "mov [rbp+var_28], 0"], [10, "mov [rbp+var_30], 0"], [11, "mov [rbp+var_34], 0"], [12, "mov [rbp+var_38], 0"], [13, "mov [rbp+var_5C], 0"], [14, "mov [rbp+var_4C], 1"], [15, "mov [rbp+var_3C], 0"], [16, "mov [rbp+var_48], 0"], [17, "mov eax, cs:dword_409180"], [18, "test eax, eax"], [19, "jz short loc_402CF2"], [20, "mov [rbp+var_1C], 0"], [21, "mov esi, 0"], [22, "mov edi, 21h "], [23, "call sub_403840"], [24, "mov [rbp+var_2C], 0"], [25, "jmp loc_403189"], [26, "mov eax, [rbp+var_2C]"], [27, "cdqe"], [28, "lea rdx, ds:0[rax*8]"], [29, "mov rax, [rbp+var_68]"], [30, "add rax, rdx"], [31, "mov rax, [rax]"], [32, "mov esi, offset asc_406F13"], [33, "mov rdi, rax"], [34, "call _strcmp"], [35, "test eax, eax"], [36, "jnz short loc_402D50"], [37, "mov rax, cs:stdin"], [38, "mov [rbp+stream], rax"], [39, "mov cs:qword_409188, offset aStdin_0"], [40, "jmp loc_403114"], [41, "mov eax, [rbp+var_2C]"], [42, "cdqe"], [43, "lea rdx, ds:0[rax*8]"], [44, "mov rax, [rbp+var_68]"], [45, "add rax, rdx"], [46, "mov rax, [rax]"], [47, "mov esi, offset modes"], [48, "mov rdi, rax"], [49, "call _fopen"], [50, "mov [rbp+stream], rax"], [51, "cmp [rbp+stream], 0"], [52, "jnz short loc_402DA8"], [53, "mov eax, [rbp+var_2C]"], [54, "cdqe"], [55, "lea rdx, ds:0[rax*8]"], [56, "mov rax, [rbp+var_68]"], [57, "add rax, rdx"], [58, "mov rax, [rax]"], [59, "mov rdi, rax"], [60, "call _perror"], [61, "mov edi, 1"], [62, "call _exit"], [63, "mov eax, [rbp+var_2C]"], [64, "cdqe"], [65, "lea rdx, ds:0[rax*8]"], [66, "mov rax, [rbp+var_68]"], [67, "add rax, rdx"], [68, "mov rax, [rax]"], [69, "mov cs:qword_409188, rax"], [70, "jmp loc_403114"], [71, "cmp [rbp+var_3C], 0"], [72, "jz short loc_402E33"], [73, "cmp [rbp+c], 22h "], [74, "jnz short loc_402DF3"], [75, "add [rbp+var_3C], 1"], [76, "cmp [rbp+var_3C], 2"], [77, "jnz short loc_402DE6"], [78, "jmp loc_403114"], [79, "cmp [rbp+var_3C], 3"], [80, "jnz short loc_402DF3"], [81, "mov [rbp+var_3C], 1"], [82, "cmp [rbp+var_3C], 2"], [83, "jnz short loc_402E02"], [84, "mov [rbp+var_3C], 0"], [85, "jmp short loc_402E33"], [86, "mov eax, [rbp+c]"], [87, "mov esi, eax"], [88, "mov edi, 3Dh "], [89, "call sub_403840"], [90, "mov esi, 0"], [91, "mov edi, 2Eh "], [92, "call sub_403840"], [93, "mov [rbp+var_1C], 2Eh "], [94, "mov [rbp+var_20], 0"], [95, "jmp loc_403114"], [96, "cmp [rbp+c], 2Fh "], [97, "jle short loc_402E79"], [98, "cmp [rbp+c], 39h "], [99, "jg short loc_402E79"], [100, "mov [rbp+var_34], 1"], [101, "mov eax, [rbp+c]"], [102, "lea ebx, [rax-30h]"], [103, "lea rdx, [rbp+var_5C]"], [104, "mov eax, [rbp+var_38]"], [105, "mov esi, 0Ah"], [106, "mov edi, eax"], [107, "call sub_40249C"], [108, "mov ecx, eax"], [109, "lea rax, [rbp+var_5C]"], [110, "mov rdx, rax"], [111, "mov esi, ebx"], [112, "mov edi, ecx"], [113, "call sub_4024F1"], [114, "mov [rbp+var_38], eax"], [115, "jmp loc_403114"], [116, "cmp [rbp+c], 20h "], [117, "jz loc_403114"], [118, "cmp [rbp+c], 9"], [119, "jnz short loc_402E8E"], [120, "jmp loc_403114"], [121, "cmp [rbp+var_34], 0"], [122, "jz short loc_402E9B"], [123, "mov eax, [rbp+var_5C]"], [124, "test eax, eax"], [125, "jz short loc_402EA2"], [126, "mov [rbp+var_38], 1"], [127, "mov [rbp+var_5C], 0"], [128, "mov eax, [rbp+var_5C]"], [129, "mov [rbp+var_34], eax"], [130, "mov eax, cs:dword_409190"], [131, "test eax, eax"], [132, "jz short loc_402EBE"], [133, "mov eax, [rbp+var_38]"], [134, "jmp short loc_402EC3"], [135, "mov eax, 1"], [136, "mov [rbp+var_4C], eax"], [137, "mov [rbp+var_38], 0"], [138, "cmp [rbp+c], 3Eh "], [139, "jz short loc_402EE5"], [140, "cmp [rbp+c], 3Ch "], [141, "jz short loc_402EE5"], [142, "cmp [rbp+c], 2Bh "], [143, "jz short loc_402EE5"], [144, "cmp [rbp+c], 2Dh "], [145, "jnz short loc_402EEC"], [146, "mov eax, 1"], [147, "jmp short loc_402EF1"], [148, "mov eax, 0"], [149, "mov [rbp+var_54], eax"], [150, "cmp [rbp+var_54], 0"], [151, "jnz short loc_402F6C"], [152, "cmp [rbp+c], 5Bh "], [153, "jz short loc_402F6C"], [154, "cmp [rbp+c], 5Dh "], [155, "jz short loc_402F6C"], [156, "cmp [rbp+c], 2Eh "], [157, "jz short loc_402F6C"], [158, "cmp [rbp+c], 2Ch "], [159, "jz short loc_402F6C"], [160, "cmp [rbp+c], 23h "], [161, "jnz short loc_402F22"], [162, "mov eax, cs:dword_409118"], [163, "test eax, eax"], [164, "jnz short loc_402F6C"], [165, "mov rax, cs:qword_409120"], [166, "test rax, rax"], [167, "jz short loc_402F4D"], [168, "mov rax, cs:qword_409120"], [169, "mov edx, [rbp+c]"], [170, "mov esi, edx"], [171, "mov rdi, rax"], [172, "call _strchr"], [173, "mov [rbp+var_48], rax"], [174, "cmp [rbp+var_48], 0"], [175, "jnz short loc_402F6C"], [176, "cmp [rbp+c], 22h "], [177, "jz short loc_402F5D"], [178, "cmp [rbp+c], 3Dh "], [179, "jnz loc_403114"], [180, "mov eax, cs:dword_409190"], [181, "test eax, eax"], [182, "jnz short loc_402F6C"], [183, "jmp loc_403114"], [184, "cmp [rbp+var_28], 0"], [185, "jnz short loc_402F88"], [186, "cmp [rbp+c], 5Bh "], [187, "jnz short loc_402FA6"], [188, "cmp [rbp+var_1C], 5Dh "], [189, "jnz short loc_402FA6"], [190, "mov eax, cs:dword_40910C"], [191, "test eax, eax"], [192, "jz short loc_402FA6"], [193, "cmp [rbp+c], 5Bh "], [194, "setz al"], [195, "movzx eax, al"], [196, "cmp [rbp+c], 5Dh "], [197, "setz dl"], [198, "movzx edx, dl"], [199, "sub eax, edx"], [200, "add [rbp+var_28], eax"], [201, "jmp loc_403114"], [202, "cmp [rbp+var_28], 0"], [203, "jz short loc_402FB1"], [204, "jmp loc_403114"], [205, "cmp [rbp+var_54], 0"], [206, "jz short loc_402FEE"], [207, "mov eax, [rbp+c]"], [208, "cmp eax, [rbp+var_1C]"], [209, "jnz short loc_402FEE"], [210, "mov [rbp+var_60], 0"], [211, "lea rdx, [rbp+var_60]"], [212, "mov ecx, [rbp+var_4C]"], [213, "mov eax, [rbp+var_20]"], [214, "mov esi, ecx"], [215, "mov edi, eax"], [216, "call sub_4024F1"], [217, "mov [rbp+var_58], eax"], [218, "mov eax, [rbp+var_60]"], [219, "test eax, eax"], [220, "jnz short loc_402FEE"], [221, "mov eax, [rbp+var_58]"], [222, "mov [rbp+var_20], eax"], [223, "jmp loc_403114"], [224, "cmp [rbp+var_20], 0"], [225, "jz short loc_40300A"], [226, "mov edx, [rbp+var_20]"], [227, "mov eax, [rbp+var_1C]"], [228, "mov esi, edx"], [229, "mov edi, eax"], [230, "call sub_403840"], [231, "mov [rbp+var_20], 0"], [232, "cmp [rbp+var_54], 0"], [233, "jnz loc_403108"], [234, "cmp [rbp+var_48], 0"], [235, "jz short loc_403047"], [236, "mov rdx, cs:qword_409120"], [237, "mov rax, [rbp+var_48]"], [238, "sub rax, rdx"], [239, "add eax, 100h"], [240, "mov esi, 0"], [241, "mov edi, eax"], [242, "call sub_403840"], [243, "mov [rbp+var_48], 0"], [244, "jmp loc_403114"], [245, "cmp [rbp+c], 22h "], [246, "jnz short loc_403056"], [247, "add [rbp+var_3C], 1"], [248, "jmp loc_403114"], [249, "cmp [rbp+c], 2Ch "], [250, "jnz short loc_403097"], [251, "mov [rbp+var_30], 1"], [252, "mov eax, cs:dword_409198"], [253, "cmp eax, 1"], [254, "jnz short loc_40307D"], [255, "mov esi, 0"], [256, "mov edi, 3Dh "], [257, "call sub_403840"], [258, "mov eax, cs:dword_409198"], [259, "cmp eax, 2"], [260, "jnz short loc_403097"], [261, "mov esi, 0FFFFFFFFh"], [262, "mov edi, 3Dh "], [263, "call sub_403840"], [264, "cmp [rbp+var_24], 0"], [265, "jnz short loc_4030C3"], [266, "cmp [rbp+c], 5Dh "], [267, "jnz short loc_4030C3"], [268, "mov rax, cs:stderr"], [269, "mov rcx, rax"], [270, "mov edx, 2Ah "], [271, "mov esi, 1"], [272, "mov edi, offset aWarningSkippin"], [273, "call _fwrite"], [274, "jmp short loc_403114"], [275, "cmp [rbp+c], 5Bh "], [276, "setz al"], [277, "movzx eax, al"], [278, "cmp [rbp+c], 5Dh "], [279, "setz dl"], [280, "movzx edx, dl"], [281, "sub eax, edx"], [282, "add [rbp+var_24], eax"], [283, "cmp [rbp+var_1C], 5Bh "], [284, "jnz short loc_4030F7"], [285, "cmp [rbp+c], 5Dh "], [286, "jnz short loc_4030F7"], [287, "mov esi, 1"], [288, "mov edi, 58h "], [289, "call sub_403840"], [290, "mov eax, [rbp+c]"], [291, "mov esi, 0"], [292, "mov edi, eax"], [293, "call sub_403840"], [294, "jmp short loc_40310E"], [295, "mov eax, [rbp+var_4C]"], [296, "mov [rbp+var_20], eax"], [297, "mov eax, [rbp+c]"], [298, "mov [rbp+var_1C], eax"], [299, "mov rax, [rbp+stream]"], [300, "mov rdi, rax"], [301, "call _getc"], [302, "mov [rbp+c], eax"], [303, "cmp [rbp+c], 0FFFFFFFFh"], [304, "jz short loc_40316C"], [305, "mov rax, cs:stdin"], [306, "cmp [rbp+stream], rax"], [307, "jnz loc_402DCB"], [308, "cmp [rbp+c], 21h "], [309, "jnz loc_402DCB"], [310, "cmp [rbp+var_24], 0"], [311, "jnz loc_402DCB"], [312, "cmp [rbp+var_30], 0"], [313, "jz loc_402DCB"], [314, "cmp [rbp+var_28], 0"], [315, "jnz loc_402DCB"], [316, "cmp [rbp+var_3C], 0"], [317, "jnz loc_402DCB"], [318, "mov rax, cs:stdin"], [319, "cmp [rbp+stream], rax"], [320, "jz short loc_403185"], [321, "mov rax, [rbp+stream]"], [322, "mov rdi, rax"], [323, "call _fclose"], [324, "add [rbp+var_2C], 1"], [325, "mov eax, [rbp+var_2C]"], [326, "cmp eax, [rbp+var_6C]"], [327, "jl loc_402D0D"], [328, "cmp [rbp+var_20], 0"], [329, "jz short loc_4031AA"], [330, "mov edx, [rbp+var_20]"], [331, "mov eax, [rbp+var_1C]"], [332, "mov esi, edx"], [333, "mov edi, eax"], [334, "call sub_403840"], [335, "cmp [rbp+var_24], 0"], [336, "jle short loc_4031F8"], [337, "mov rax, cs:stderr"], [338, "mov rcx, rax"], [339, "mov edx, 29h "], [340, "mov esi, 1"], [341, "mov edi, offset aWarningClosing"], [342, "call _fwrite"], [343, "mov esi, 0"], [344, "mov edi, 3Dh "], [345, "call sub_403840"], [346, "jmp short loc_4031F2"], [347, "mov esi, 0"], [348, "mov edi, 5Dh "], [349, "call sub_403840"], [350, "sub [rbp+var_24], 1"], [351, "cmp [rbp+var_24], 0"], [352, "jg short loc_4031DF"], [353, "mov eax, cs:dword_409118"], [354, "test eax, eax"], [355, "jz short loc_403217"], [356, "cmp [rbp+var_1C], 23h "], [357, "jz short loc_403217"], [358, "mov esi, 0"], [359, "mov edi, 23h "], [360, "call sub_403840"], [361, "mov esi, 0"], [362, "mov edi, 7Eh "], [363, "call sub_403840"], [364, "nop"], [365, "mov rbx, [rbp+var_8]"], [366, "leave"], [367, "retn"]], "data_dep": [[18, 17], [19, 18], [26, 24], [26, 324], [28, 169], [28, 280], [28, 28], [28, 270], [28, 236], [28, 65], [28, 198], [28, 110], [28, 226], [28, 211], [29, 4], [30, 29], [30, 28], [31, 30], [33, 31], [35, 34], [36, 35], [38, 37], [41, 24], [41, 324], [43, 28], [44, 4], [45, 43], [45, 44], [46, 45], [48, 46], [50, 49], [51, 50], [52, 51], [53, 24], [53, 324], [55, 43], [56, 4], [57, 55], [57, 56], [58, 57], [59, 58], [63, 24], [63, 324], [65, 43], [66, 4], [67, 66], [67, 65], [68, 67], [69, 68], [71, 15], [71, 247], [71, 81], [71, 75], [71, 84], [72, 71], [73, 302], [74, 73], [75, 81], [75, 75], [75, 15], [75, 247], [75, 84], [76, 75], [77, 76], [79, 75], [80, 79], [82, 15], [82, 247], [82, 81], [82, 75], [82, 84], [83, 82], [86, 302], [87, 86], [96, 302], [97, 96], [98, 302], [99, 98], [101, 302], [102, 102], [102, 101], [103, 236], [103, 110], [103, 226], [103, 198], [103, 169], [103, 280], [103, 127], [103, 211], [103, 65], [103, 28], [103, 270], [103, 13], [104, 12], [104, 137], [104, 114], [106, 104], [108, 107], [109, 13], [109, 107], [109, 127], [110, 109], [111, 102], [112, 108], [114, 113], [116, 302], [117, 116], [118, 302], [119, 118], [121, 11], [121, 100], [121, 129], [122, 121], [123, 13], [123, 127], [124, 123], [125, 124], [128, 127], [129, 128], [131, 130], [132, 131], [133, 12], [133, 137], [133, 114], [133, 126], [136, 135], [136, 133], [138, 302], [139, 138], [140, 302], [141, 140], [142, 302], [143, 142], [144, 302], [145, 144], [149, 146], [149, 148], [150, 149], [151, 150], [152, 302], [153, 152], [154, 302], [155, 154], [156, 302], [157, 156], [158, 302], [159, 158], [160, 302], [161, 160], [163, 162], [164, 163], [166, 165], [167, 166], [169, 302], [170, 169], [171, 168], [173, 172], [174, 173], [175, 174], [176, 302], [177, 176], [178, 302], [179, 178], [181, 180], [182, 181], [184, 200], [184, 9], [185, 184], [186, 302], [187, 186], [188, 298], [188, 20], [188, 6], [188, 93], [189, 188], [191, 190], [192, 191], [193, 302], [194, 191], [194, 163], [194, 172], [194, 181], [194, 148], [194, 193], [194, 146], [195, 194], [196, 302], [197, 280], [197, 28], [197, 270], [197, 196], [197, 65], [197, 236], [197, 110], [197, 226], [197, 198], [197, 211], [197, 169], [198, 197], [199, 195], [199, 198], [200, 200], [200, 199], [200, 9], [202, 200], [202, 9], [203, 202], [205, 149], [206, 205], [207, 302], [208, 20], [208, 6], [208, 93], [208, 298], [208, 207], [209, 208], [211, 169], [211, 280], [211, 28], [211, 270], [211, 210], [211, 65], [211, 236], [211, 110], [211, 226], [211, 198], [211, 211], [212, 136], [213, 94], [213, 296], [213, 222], [213, 231], [213, 7], [214, 212], [215, 213], [217, 216], [218, 210], [219, 218], [220, 219], [221, 217], [222, 221], [224, 94], [224, 296], [224, 7], [224, 222], [224, 231], [225, 224], [226, 296], [226, 7], [226, 222], [226, 231], [226, 94], [227, 20], [227, 6], [227, 298], [227, 93], [228, 226], [229, 227], [232, 149], [233, 232], [234, 16], [234, 173], [234, 243], [235, 234], [237, 16], [237, 173], [237, 243], [238, 237], [238, 236], [239, 238], [241, 239], [245, 302], [246, 245], [247, 81], [247, 15], [247, 247], [247, 75], [247, 84], [249, 302], [250, 249], [253, 252], [254, 253], [259, 258], [260, 259], [264, 8], [264, 282], [265, 264], [266, 302], [267, 266], [269, 268], [275, 302], [276, 191], [276, 163], [276, 275], [276, 219], [276, 172], [276, 181], [276, 148], [276, 263], [276, 146], [276, 258], [276, 230], [276, 207], [277, 276], [278, 302], [279, 169], [279, 280], [279, 28], [279, 270], [279, 65], [279, 278], [279, 236], [279, 110], [279, 226], [279, 198], [279, 211], [280, 279], [281, 277], [281, 280], [282, 8], [282, 282], [282, 281], [283, 20], [283, 6], [283, 298], [283, 93], [284, 283], [285, 302], [286, 285], [290, 302], [292, 290], [295, 136], [296, 295], [297, 302], [298, 297], [299, 38], [299, 50], [300, 299], [302, 301], [303, 302], [304, 303], [306, 38], [306, 50], [306, 305], [307, 306], [308, 302], [309, 308], [310, 8], [310, 282], [311, 310], [312, 10], [312, 251], [313, 312], [314, 9], [314, 200], [315, 314], [316, 81], [316, 75], [316, 84], [316, 15], [316, 247], [317, 316], [319, 50], [319, 318], [319, 38], [320, 319], [321, 50], [321, 38], [322, 321], [324, 324], [324, 24], [325, 24], [325, 324], [326, 5], [326, 325], [327, 326], [328, 94], [328, 222], [328, 231], [328, 296], [328, 7], [329, 328], [330, 222], [330, 231], [330, 296], [330, 7], [330, 94], [331, 298], [331, 93], [331, 20], [331, 6], [332, 330], [333, 331], [335, 282], [335, 8], [336, 335], [338, 337], [350, 350], [350, 8], [350, 282], [351, 8], [351, 282], [351, 350], [352, 351], [354, 353], [355, 354], [356, 20], [356, 6], [356, 93], [356, 298], [357, 356], [367, 363]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c67a45b606b1e401da6a64dcaa2fb5a203009677d0b64885b9df30abfcc14882_c67a45b606b1e401da6a64dcaa2fb5a203009677d0b64885b9df30abfcc14882.jsonl.gz", "strip_func_name": "sub_402C83", "query": "\n\n\n__int64 __fastcall sub_402C83(__int64 a1, int a2)\n{\nint v2; // ebx\nint v3; // eax\nunsigned int v4; // eax\n_BOOL4 v5; // eax\n_BOOL4 v7; // [rsp+10h] [rbp-60h] BYREF\n_BOOL4 v8; // [rsp+14h] [rbp-5Ch] BYREF\nunsigned int v9; // [rsp+18h] [rbp-58h]\n_BOOL4 v10; // [rsp+1Ch] [rbp-54h]\nint c; // [rsp+20h] [rbp-50h]\nint v12; // [rsp+24h] [rbp-4Ch]\nchar *v13; // [rsp+28h] [rbp-48h]\nint v14; // [rsp+34h] [rbp-3Ch]\nunsigned int v15; // [rsp+38h] [rbp-38h]\nint v16; // [rsp+3Ch] [rbp-34h]\nint v17; // [rsp+40h] [rbp-30h]\nint v18; // [rsp+44h] [rbp-2Ch]\nint v19; // [rsp+48h] [rbp-28h]\nint v20; // [rsp+4Ch] [rbp-24h]\nunsigned int v21; // [rsp+50h] [rbp-20h]\nunsigned int v22; // [rsp+54h] [rbp-1Ch]\nFILE *stream; // [rsp+58h] [rbp-18h]\n\nv22 = 93;\nv21 = 0;\nv20 = 0;\nv19 = 0;\nv17 = 0;\nv16 = 0;\nv15 = 0;\nv8 = 0;\nv12 = 1;\nv14 = 0;\nv13 = 0LL;\nif ( dword_409180 )\nv22 = 0;\nsub_403840(33LL, 0LL);\nv18 = 0;\nLABEL_86:\nif ( v18 < a2 )\n{\nif ( !strcmp(*(const char **)(8LL * v18 + a1), \"-\") )\n{\nstream = (FILE *)stdin;\nqword_409188 = (__int64)\"stdin\";\n}\nelse\n{\nstream = fopen(*(const char **)(8LL * v18 + a1), \"r\");\nif ( !stream )\n{\nperror(*(const char **)(8LL * v18 + a1));\nexit(1);\n}\nqword_409188 = *(_QWORD *)(8LL * v18 + a1);\n}\nwhile ( 1 )\n{\nwhile ( 1 )\n{\nc = getc(stream);\nif ( c == -1 || stream == (FILE *)stdin && c == 33 && !v20 && v17 && !v19 && !v14 )\n{\nif ( stream != (FILE *)stdin )\nfclose(stream);\n++v18;\ngoto LABEL_86;\n}\nif ( !v14 )\ngoto LABEL_17;\nif ( c == 34 )\nbreak;\nLABEL_14:\nif ( v14 == 2 )\n{\nv14 = 0;\nLABEL_17:\nif ( c <= 47 || c > 57 )\n{\nif ( c != 32 && c != 9 )\n{\nif ( !v16 || v8 )\nv15 = 1;\nv8 = 0;\nv16 = 0;\nv4 = dword_409190 ? v15 : 1;\nv12 = v4;\nv15 = 0;\nv5 = c == 62 || c == 60 || c == 43 || c == 45;\nif ( (v10 = v5)\n|| c == 91\n|| c == 93\n|| c == 46\n|| c == 44\n|| c == 35 && dword_409118\n|| qword_409120 && (v13 = strchr(qword_409120, c)) != 0LL\n|| (c == 34 || c == 61) && dword_409190 )\n{\nif ( v19 || c == 91 && v22 == 93 && dword_40910C )\n{\nv19 += (c == 91) - (c == 93);\n}\nelse if ( v10 && c == v22 && (v7 = 0, v9 = sub_4024F1(v21, v12, &v7), !v7) )\n{\nv21 = v9;\n}\nelse\n{\nif ( v21 )\n{\nsub_403840(v22, v21);\nv21 = 0;\n}\nif ( v10 )\n{\nv21 = v12;\ngoto LABEL_75;\n}\nif ( v13 )\n{\nsub_403840((unsigned int)((_DWORD)v13 - (_DWORD)qword_409120 + 256), 0LL);\nv13 = 0LL;\n}\nelse if ( c == 34 )\n{\n++v14;\n}\nelse\n{\nif ( c == 44 )\n{\nv17 = 1;\nif ( dword_409198 == 1 )\nsub_403840(61LL, 0LL);\nif ( dword_409198 == 2 )\nsub_403840(61LL, 0xFFFFFFFFLL);\n}\nif ( v20 || c != 93 )\n{\nv20 += (c == 91) - (c == 93);\nif ( v22 == 91 && c == 93 )\nsub_403840(88LL, 1LL);\nsub_403840((unsigned int)c, 0LL);\nLABEL_75:\nv22 = c;\n}\nelse\n{\nfwrite(\"Warning: skipping unbalanced ']' command.\\n\", 1uLL, 0x2AuLL, stderr);\n}\n}\n}\n}\n}\n}\nelse\n{\nv16 = 1;\nv2 = c - 48;\nv3 = sub_40249C(v15, 0xAu, &v8);\nv15 = sub_4024F1(v3, v2, &v8);\n}\n}\nelse\n{\nsub_403840(61LL, (unsigned int)c);\nsub_403840(46LL, 0LL);\nv22 = 46;\nv21 = 0;\n}\n}\nif ( ++v14 != 2 )\n{\nif ( v14 == 3 )\nv14 = 1;\ngoto LABEL_14;\n}\n}\n}\nif ( v21 )\nsub_403840(v22, v21);\nif ( v20 > 0 )\n{\nfwrite(\"Warning: closing unbalanced '[' command.\\n\", 1uLL, 0x29uLL, stderr);\nsub_403840(61LL, 0LL);\nwhile ( v20 > 0 )\n{\nsub_403840(93LL, 0LL);\n--v20;\n}\n}\nif ( dword_409118 && v22 != 35 )\nsub_403840(35LL, 0LL);\nreturn sub_403840(126LL, 0LL);\n}\n\n\n\nQ:[a1,a2,v7,v8,v9,v10,c,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,stream,sub_402C83,sub_403840,sub_4024F1,sub_40249C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'filelist', 'a2': 'filecount', 'v7': 'ov', 'v8': 'ov_flg', 'v9': 'res', 'v10': 'm', 'c': 'ch_0', 'v12': 'multi', 'v13': 'xc', 'v14': 'qstring', 'v15': 'number', 'v16': 'digits', 'v17': 'inp', 'v18': 'ar', 'v19': 'lc', 'v20': 'b', 'v21': 'c', 'v22': 'lastch', 'stream': 'ifd', 'sub_402C83': 'load_and_run', 'sub_403840': 'outrun', 'sub_4024F1': 'ov_iadd', 'sub_40249C': 'ov_imul'}"} |
|
runjob | 15644b9297325e86cc048086043d30bfb5fb26cad6194335f55e27ff962a281b | dyne | dowse | NA | static void
runjob(char *cmd)
{
struct jobentry *je;
time_t t;
pid_t pid;
t = time(NULL);
/* If command is already running, skip it */
TAILQ_FOREACH(je, &jobhead, entry) {
if (strcmp(je->cmd, cmd) == 0) {
loginfo("already running %s pid: %d at %s",
je->cmd, je->pid, ctime(&t));
return;
}
}
pid = fork();
if (pid < 0) {
logerr("error: failed to fork job: %s time: %s",
cmd, ctime(&t));
return;
} else if (pid == 0) {
setsid();
loginfo("run: %s pid: %d at %s",
cmd, getpid(), ctime(&t));
execl("/bin/sh", "/bin/sh", "-c", cmd, (char *)NULL);
logerr("error: failed to execute job: %s time: %s",
cmd, ctime(&t));
_exit(EXIT_FAILURE);
} else {
je = emalloc(sizeof(*je));
je->cmd = estrdup(cmd);
je->pid = pid;
TAILQ_INSERT_TAIL(&jobhead, je, entry);
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401697", "function_addr": 4200087, "binary_name": "15644b9297325e86cc048086043d30bfb5fb26cad6194335f55e27ff962a281b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 38h"], [4, "mov [rbp+s2], rdi"], [5, "mov edi, 0"], [6, "call _time"], [7, "mov [rbp+timer], rax"], [8, "mov rax, cs:qword_405160"], [9, "mov [rbp+var_18], rax"], [10, "jmp short loc_401719"], [11, "mov rax, [rbp+var_18]"], [12, "mov rax, [rax]"], [13, "mov rdx, [rbp+s2]"], [14, "mov rsi, rdx"], [15, "mov rdi, rax"], [16, "call _strcmp"], [17, "test eax, eax"], [18, "jnz short loc_40170D"], [19, "lea rax, [rbp+timer]"], [20, "mov rdi, rax"], [21, "call _ctime"], [22, "mov rcx, rax"], [23, "mov rax, [rbp+var_18]"], [24, "mov edx, [rax+8]"], [25, "mov rax, [rbp+var_18]"], [26, "mov rax, [rax]"], [27, "mov rsi, rax"], [28, "mov edi, offset aAlreadyRunning"], [29, "mov eax, 0"], [30, "call sub_401362"], [31, "jmp loc_40184E"], [32, "mov rax, [rbp+var_18]"], [33, "mov rax, [rax+10h]"], [34, "mov [rbp+var_18], rax"], [35, "cmp [rbp+var_18], 0"], [36, "jnz short loc_4016BF"], [37, "call _fork"], [38, "mov [rbp+var_1C], eax"], [39, "cmp [rbp+var_1C], 0"], [40, "jns short loc_401758"], [41, "lea rax, [rbp+timer]"], [42, "mov rdi, rax"], [43, "call _ctime"], [44, "mov rdx, rax"], [45, "mov rax, [rbp+s2]"], [46, "mov rsi, rax"], [47, "mov edi, offset aErrorFailedToF"], [48, "mov eax, 0"], [49, "call sub_401511"], [50, "jmp loc_40184E"], [51, "cmp [rbp+var_1C], 0"], [52, "jnz loc_4017EB"], [53, "call _setsid"], [54, "lea rax, [rbp+timer]"], [55, "mov rdi, rax"], [56, "call _ctime"], [57, "mov rbx, rax"], [58, "call _getpid"], [59, "mov edx, eax"], [60, "mov rax, [rbp+s2]"], [61, "mov rcx, rbx"], [62, "mov rsi, rax"], [63, "mov edi, offset aRunSPidDAtS"], [64, "mov eax, 0"], [65, "call sub_401362"], [66, "mov rax, [rbp+s2]"], [67, "mov r8d, 0"], [68, "mov rcx, rax"], [69, "mov edx, offset aC"], [70, "mov esi, offset arg"], [71, "mov edi, offset arg"], [72, "mov eax, 0"], [73, "call _execl"], [74, "lea rax, [rbp+timer]"], [75, "mov rdi, rax"], [76, "call _ctime"], [77, "mov rdx, rax"], [78, "mov rax, [rbp+s2]"], [79, "mov rsi, rax"], [80, "mov edi, offset aErrorFailedToE"], [81, "mov eax, 0"], [82, "call sub_401511"], [83, "mov edi, 1"], [84, "call __exit"], [85, "mov edi, 20h "], [86, "call sub_4015E1"], [87, "mov [rbp+var_18], rax"], [88, "mov rax, [rbp+s2]"], [89, "mov rdi, rax"], [90, "call sub_40163C"], [91, "mov rdx, [rbp+var_18]"], [92, "mov [rdx], rax"], [93, "mov rax, [rbp+var_18]"], [94, "mov edx, [rbp+var_1C]"], [95, "mov [rax+8], edx"], [96, "mov rax, [rbp+var_18]"], [97, "mov qword ptr [rax+10h], 0"], [98, "mov rdx, cs:off_405168"], [99, "mov rax, [rbp+var_18]"], [100, "mov [rax+18h], rdx"], [101, "mov rax, cs:off_405168"], [102, "mov rdx, [rbp+var_18]"], [103, "mov [rax], rdx"], [104, "mov rax, [rbp+var_18]"], [105, "add rax, 10h"], [106, "mov cs:off_405168, rax"], [107, "mov rbx, [rbp+var_8]"], [108, "leave"], [109, "retn"]], "data_dep": [[7, 6], [9, 8], [11, 9], [11, 34], [12, 11], [13, 4], [14, 13], [15, 12], [17, 16], [18, 17], [19, 17], [19, 7], [20, 19], [22, 21], [23, 34], [23, 9], [24, 23], [25, 34], [25, 9], [26, 25], [27, 26], [32, 9], [32, 34], [33, 32], [34, 33], [35, 9], [35, 34], [36, 35], [38, 37], [39, 38], [40, 39], [41, 37], [41, 7], [42, 41], [44, 43], [45, 4], [46, 45], [51, 38], [52, 51], [54, 53], [54, 7], [55, 54], [57, 56], [59, 58], [60, 4], [61, 57], [62, 60], [66, 4], [68, 66], [74, 73], [74, 7], [75, 74], [77, 76], [78, 4], [79, 78], [87, 86], [88, 4], [89, 88], [91, 87], [92, 90], [92, 91], [93, 87], [94, 38], [95, 93], [95, 94], [96, 87], [97, 96], [99, 87], [100, 98], [100, 99], [102, 87], [103, 102], [103, 101], [104, 87], [105, 104], [106, 105], [109, 49], [109, 30], [109, 105]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/15644b9297325e86cc048086043d30bfb5fb26cad6194335f55e27ff962a281b_15644b9297325e86cc048086043d30bfb5fb26cad6194335f55e27ff962a281b.jsonl.gz", "strip_func_name": "sub_401697", "query": "\n\n\nvoid __fastcall sub_401697(const char *a1, __int64 a2)\n{\nchar *v2; // rax\n__int64 v3; // r8\n__int64 v4; // r9\nchar *v5; // rax\n__int64 v6; // rcx\n__int64 v7; // r8\n__int64 v8; // r9\nchar *v9; // rbx\nunsigned int v10; // eax\n__int64 v11; // r8\n__int64 v12; // r9\nchar *v13; // rax\n__int64 v14; // rcx\n__int64 v15; // r8\n__int64 v16; // r9\ntime_t timer; // [rsp+18h] [rbp-28h] BYREF\n__pid_t v18; // [rsp+24h] [rbp-1Ch]\n__int64 *i; // [rsp+28h] [rbp-18h]\n\ntimer = time(0LL);\nfor ( i = (__int64 *)qword_405160; i; i = (__int64 *)i[2] )\n{\na2 = (__int64)a1;\nif ( !strcmp((const char *)*i, a1) )\n{\nv2 = ctime(&timer);\nsub_401362(\"already running %s pid: %d at %s\", *i, *((unsigned int *)i + 2), (__int64)v2, v3, v4);\nreturn;\n}\n}\nv18 = fork();\nif ( v18 >= 0 )\n{\nif ( !v18 )\n{\nsetsid();\nv9 = ctime(&timer);\nv10 = getpid();\nsub_401362(\"run: %s pid: %d at %s\", (__int64)a1, v10, (__int64)v9, v11, v12);\nexecl(\"/bin/sh\", \"/bin/sh\", \"-c\", a1, 0LL);\nv13 = ctime(&timer);\nsub_401511(\"error: failed to execute job: %s time: %s\", (__int64)a1, (__int64)v13, v14, v15, v16);\n_exit(1);\n}\ni = (__int64 *)sub_4015E1(0x20uLL, a2);\n*i = (__int64)sub_40163C(a1, a2);\n*((_DWORD *)i + 2) = v18;\ni[2] = 0LL;\ni[3] = off_405168;\n*(_QWORD *)off_405168 = i;\noff_405168 = (__int64)(i + 2);\n}\nelse\n{\nv5 = ctime(&timer);\nsub_401511(\"error: failed to fork job: %s time: %s\", (__int64)a1, (__int64)v5, v6, v7, v8);\n}\n}\n\n\n\nQ:[a1,timer,v18,i,sub_401697,sub_401362,sub_401511,sub_4015E1,sub_40163C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'cmd', 'timer': 't', 'v18': 'pid', 'i': 'je', 'sub_401697': 'runjob', 'sub_401362': 'loginfo', 'sub_401511': 'logerr', 'sub_4015E1': 'emalloc', 'sub_40163C': 'estrdup'}"} |
|
LDL_Frame_dataOverhead | 3ae2edc0817bfb033af0e03268594e8786df74b8f67d0ab9a053017e278e279c | cjhdev | lora_device_lib | NA | uint8_t LDL_Frame_dataOverhead(void)
{
/* DevAddr + FCtrl + FCnt + FOpts + FPort */
return (4 + 1 + 2) + (1);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403457", "function_addr": 4207703, "binary_name": "3ae2edc0817bfb033af0e03268594e8786df74b8f67d0ab9a053017e278e279c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:qword_41CD68"], [3, "add rax, 1"], [4, "mov cs:qword_41CD68, rax"], [5, "mov eax, 8"], [6, "pop rbp"], [7, "retn"]], "data_dep": [[3, 2], [4, 3], [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/3ae2edc0817bfb033af0e03268594e8786df74b8f67d0ab9a053017e278e279c_3ae2edc0817bfb033af0e03268594e8786df74b8f67d0ab9a053017e278e279c.jsonl.gz", "strip_func_name": "sub_403457", "query": "\n\n\n__int64 sub_403457()\n{\n++qword_41CD68;\nreturn 8LL;\n}\n\n\n\nQ:[sub_403457,]\nAssistant: ", "hints": "[]", "response": "{'sub_403457': 'LDL_Frame_dataOverhead'}"} |
|
dexInstr_hasVRegB | adf8f3f32558035a43de6a2794e05c617fd356387dc6999991cbc942fd311076 | anestisb | vdexExtractor | NA | bool dexInstr_hasVRegB(u2 *code_ptr) {
switch (kInstructionDescriptors[dexInstr_getOpcode(code_ptr)].format) {
case k11n:
return true;
case k12x:
return true;
case k21c:
return true;
case k21h:
return true;
case k21s:
return true;
case k21t:
return true;
case k22b:
return true;
case k22c:
return true;
case k22s:
return true;
case k22t:
return true;
case k22x:
return true;
case k23x:
return true;
case k31c:
return true;
case k31i:
return true;
case k31t:
return true;
case k32x:
return true;
case k35c:
return true;
case k3rc:
return true;
case k45cc:
return true;
case k4rcc:
return true;
case k51l:
return true;
default:
return false;
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406A85", "function_addr": 4221573, "binary_name": "adf8f3f32558035a43de6a2794e05c617fd356387dc6999991cbc942fd311076.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_405727"], [7, "mov eax, eax"], [8, "shl rax, 4"], [9, "add rax, 41F924h"], [10, "mov eax, [rax]"], [11, "cmp eax, 19h"], [12, "ja def_406ABE"], [13, "mov eax, eax"], [14, "mov rax, ds:jpt_406ABE[rax*8]"], [15, "jmp rax"], [16, "mov eax, 1"], [17, "jmp locret_406B61"], [18, "mov eax, 1"], [19, "jmp locret_406B61"], [20, "mov eax, 1"], [21, "jmp locret_406B61"], [22, "mov eax, 1"], [23, "jmp short locret_406B61"], [24, "mov eax, 1"], [25, "jmp short locret_406B61"], [26, "mov eax, 1"], [27, "jmp short locret_406B61"], [28, "mov eax, 1"], [29, "jmp short locret_406B61"], [30, "mov eax, 1"], [31, "jmp short locret_406B61"], [32, "mov eax, 1"], [33, "jmp short locret_406B61"], [34, "mov eax, 1"], [35, "jmp short locret_406B61"], [36, "mov eax, 1"], [37, "jmp short locret_406B61"], [38, "mov eax, 1"], [39, "jmp short locret_406B61"], [40, "mov eax, 1"], [41, "jmp short locret_406B61"], [42, "mov eax, 1"], [43, "jmp short locret_406B61"], [44, "mov eax, 1"], [45, "jmp short locret_406B61"], [46, "mov eax, 1"], [47, "jmp short locret_406B61"], [48, "mov eax, 1"], [49, "jmp short locret_406B61"], [50, "mov eax, 1"], [51, "jmp short locret_406B61"], [52, "mov eax, 1"], [53, "jmp short locret_406B61"], [54, "mov eax, 1"], [55, "jmp short locret_406B61"], [56, "mov eax, 1"], [57, "jmp short locret_406B61"], [58, "mov eax, 0"], [59, "leave"], [60, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 10], [15, 14], [60, 50], [60, 56], [60, 16], [60, 22], [60, 28], [60, 34], [60, 40], [60, 46], [60, 52], [60, 58], [60, 18], [60, 24], [60, 30], [60, 36], [60, 42], [60, 48], [60, 54], [60, 20], [60, 26], [60, 32], [60, 38], [60, 44]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/adf8f3f32558035a43de6a2794e05c617fd356387dc6999991cbc942fd311076_adf8f3f32558035a43de6a2794e05c617fd356387dc6999991cbc942fd311076.jsonl.gz", "strip_func_name": "sub_406A85", "query": "\n\n\n__int64 __fastcall sub_406A85(_WORD *a1)\n{\n__int64 result; // rax\n\nswitch ( dword_41F924[4 * (unsigned int)sub_405727(a1)] )\n{\ncase 1:\nresult = 1LL;\nbreak;\ncase 2:\nresult = 1LL;\nbreak;\ncase 6:\nresult = 1LL;\nbreak;\ncase 7:\nresult = 1LL;\nbreak;\ncase 8:\nresult = 1LL;\nbreak;\ncase 9:\nresult = 1LL;\nbreak;\ncase 0xA:\nresult = 1LL;\nbreak;\ncase 0xB:\nresult = 1LL;\nbreak;\ncase 0xC:\nresult = 1LL;\nbreak;\ncase 0xD:\nresult = 1LL;\nbreak;\ncase 0xE:\nresult = 1LL;\nbreak;\ncase 0xF:\nresult = 1LL;\nbreak;\ncase 0x10:\nresult = 1LL;\nbreak;\ncase 0x12:\nresult = 1LL;\nbreak;\ncase 0x13:\nresult = 1LL;\nbreak;\ncase 0x14:\nresult = 1LL;\nbreak;\ncase 0x15:\nresult = 1LL;\nbreak;\ncase 0x16:\nresult = 1LL;\nbreak;\ncase 0x17:\nresult = 1LL;\nbreak;\ncase 0x18:\nresult = 1LL;\nbreak;\ncase 0x19:\nresult = 1LL;\nbreak;\ndefault:\nresult = 0LL;\nbreak;\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_406A85,sub_405727,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'code_ptr', 'sub_406A85': 'dexInstr_hasVRegB', 'sub_405727': 'dexInstr_getOpcode'}"} |
|
js_number_toPrecision | bff35f3b7ff0bbf5e5e52ae6499ba776520880a991546f99df7df7f4351bfb13 | sunnyxx | quickjs-debug | NA | static JSValue js_number_toPrecision(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv)
{
JSValue val;
int p;
double d;
val = js_thisNumberValue(ctx, this_val);
if (JS_IsException(val))
return val;
if (JS_ToFloat64Free(ctx, &d, val))
return JS_EXCEPTION;
if (JS_IsUndefined(argv[0]))
goto to_string;
if (JS_ToInt32Sat(ctx, &p, argv[0]))
return JS_EXCEPTION;
if (!isfinite(d)) {
to_string:
return JS_ToStringFree(ctx, __JS_NewFloat64(ctx, d));
}
if (p < 1 || p > 100)
return JS_ThrowRangeError(ctx, "invalid number of digits");
return js_dtoa(ctx, d, 10, p, JS_DTOA_FIXED_FORMAT);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_46040F", "function_addr": 4588559, "binary_name": "bff35f3b7ff0bbf5e5e52ae6499ba776520880a991546f99df7df7f4351bfb13.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "sub rsp, 58h"], [4, "mov [rbp+var_38], rdi"], [5, "mov rax, rsi"], [6, "mov rsi, rdx"], [7, "mov rdx, rsi"], [8, "mov [rbp+var_50], rax"], [9, "mov [rbp+var_48], rdx"], [10, "mov [rbp+var_3C], ecx"], [11, "mov [rbp+var_58], r8"], [12, "mov rcx, [rbp+var_50]"], [13, "mov rdx, [rbp+var_48]"], [14, "mov rax, [rbp+var_38]"], [15, "mov rsi, rcx"], [16, "mov rdi, rax"], [17, "call sub_45FEA1"], [18, "mov [rbp+var_20], rax"], [19, "mov [rbp+var_18], rdx"], [20, "mov rdx, [rbp+var_20]"], [21, "mov rax, [rbp+var_18]"], [22, "mov rdi, rdx"], [23, "mov rsi, rax"], [24, "call sub_405118"], [25, "test eax, eax"], [26, "jz short loc_460477"], [27, "mov rax, [rbp+var_20]"], [28, "mov rdx, [rbp+var_18]"], [29, "jmp loc_460591"], [30, "mov rax, [rbp+var_20]"], [31, "mov rdx, [rbp+var_18]"], [32, "lea rsi, [rbp+var_30]"], [33, "mov rdi, [rbp+var_38]"], [34, "mov rcx, rdx"], [35, "mov rdx, rax"], [36, "call sub_41C3E0"], [37, "test eax, eax"], [38, "jz short loc_4604AA"], [39, "mov eax, 0"], [40, "mov edx, 0"], [41, "mov edx, 6"], [42, "jmp loc_460591"], [43, "mov rax, [rbp+var_58]"], [44, "mov rdx, [rax]"], [45, "mov rax, [rax+8]"], [46, "mov rdi, rdx"], [47, "mov rsi, rax"], [48, "call sub_4050F4"], [49, "test eax, eax"], [50, "jnz short loc_46051B"], [51, "mov rax, [rbp+var_58]"], [52, "mov rdx, [rax+8]"], [53, "mov rax, [rax]"], [54, "lea rsi, [rbp+var_24]"], [55, "mov rdi, [rbp+var_38]"], [56, "mov rcx, rdx"], [57, "mov rdx, rax"], [58, "call sub_41C80C"], [59, "test eax, eax"], [60, "jz short loc_4604FA"], [61, "mov eax, 0"], [62, "mov edx, 0"], [63, "mov edx, 6"], [64, "jmp loc_460591"], [65, "movsd xmm0, [rbp+var_30]"], [66, "movq xmm1, cs:qword_4A2D50"], [67, "andpd xmm1, xmm0"], [68, "movsd xmm0, cs:qword_4A2D60"], [69, "ucomisd xmm0, xmm1"], [70, "jnb short loc_460548"], [71, "jmp short loc_46051C"], [72, "nop"], [73, "mov rdx, [rbp+var_30]"], [74, "mov rax, [rbp+var_38]"], [75, "movq xmm0, rdx"], [76, "mov rdi, rax"], [77, "call sub_4050A7"], [78, "mov rcx, rax"], [79, "mov rbx, rdx"], [80, "mov rax, [rbp+var_38]"], [81, "mov rsi, rcx"], [82, "mov rdi, rax"], [83, "call sub_41E05E"], [84, "jmp short loc_460591"], [85, "mov eax, [rbp+var_24]"], [86, "test eax, eax"], [87, "jle short loc_460557"], [88, "mov eax, [rbp+var_24]"], [89, "cmp eax, 64h "], [90, "jle short loc_46056F"], [91, "mov rax, [rbp+var_38]"], [92, "mov esi, offset aInvalidNumberO_0"], [93, "mov rdi, rax"], [94, "mov eax, 0"], [95, "call sub_411DF2"], [96, "jmp short loc_460591"], [97, "mov edx, [rbp+var_24]"], [98, "mov rdi, [rbp+var_30]"], [99, "mov rax, [rbp+var_38]"], [100, "mov ecx, 1"], [101, "mov esi, 0Ah"], [102, "movq xmm0, rdi"], [103, "mov rdi, rax"], [104, "call sub_41DD74"], [105, "mov rbx, [rbp+var_8]"], [106, "leave"], [107, "retn"]], "data_dep": [[7, 6], [8, 5], [9, 7], [12, 8], [13, 9], [14, 4], [15, 12], [16, 14], [18, 17], [19, 13], [20, 18], [21, 19], [22, 20], [23, 21], [25, 24], [26, 25], [27, 18], [28, 19], [30, 18], [31, 19], [32, 23], [33, 4], [34, 31], [35, 30], [37, 36], [38, 37], [43, 11], [44, 43], [45, 43], [46, 44], [47, 45], [49, 48], [50, 49], [51, 11], [52, 51], [53, 51], [54, 47], [55, 4], [56, 52], [57, 53], [59, 58], [60, 59], [67, 65], [67, 66], [69, 68], [69, 67], [70, 59], [74, 4], [75, 73], [76, 74], [78, 77], [79, 73], [80, 4], [81, 78], [82, 80], [86, 85], [87, 86], [89, 88], [90, 89], [91, 4], [93, 91], [99, 4], [102, 98], [103, 99], [107, 95], [107, 104], [107, 61], [107, 27], [107, 39], [107, 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/bff35f3b7ff0bbf5e5e52ae6499ba776520880a991546f99df7df7f4351bfb13_bff35f3b7ff0bbf5e5e52ae6499ba776520880a991546f99df7df7f4351bfb13.jsonl.gz", "strip_func_name": "sub_46040F", "query": "\n\n\n_DWORD *__fastcall sub_46040F(__int64 *a1, __int64 a2, unsigned int a3, __int64 a4, __int64 *a5)\n{\n__int64 v5; // rdx\n__int64 v6; // r8\n__int64 v7; // r9\n_DWORD *result; // rax\n__int64 v9; // rdx\n__int64 v10; // rcx\n__int64 v11; // r8\n__int64 v12; // r9\n_DWORD *v13; // rax\n__int64 v14; // rdx\n__int64 v15; // r8\n__int64 v16; // r9\ndouble v18; // [rsp+30h] [rbp-30h] BYREF\nint v19; // [rsp+3Ch] [rbp-24h] BYREF\n_DWORD *v20; // [rsp+40h] [rbp-20h]\n__int64 v21; // [rsp+48h] [rbp-18h]\n\nv20 = sub_45FEA1(a1, a2, a3);\nv21 = v5;\nif ( sub_405118((__int64)v20, v5) )\nreturn v20;\nif ( (unsigned int)sub_41C3E0(a1, &v18, v20, v21, v6, v7) )\nreturn 0LL;\nif ( sub_4050F4(*a5, a5[1]) )\ngoto LABEL_9;\nif ( (unsigned int)sub_41C80C(a1, &v19, (_DWORD *)*a5, a5[1]) )\nreturn 0LL;\nif ( fabs(v18) > 1.797693134862316e308 )\n{\nLABEL_9:\nv13 = (_DWORD *)sub_4050A7(v18);\nresult = sub_41E05E(a1, v13, v14, (__int64)v13, v15, v16);\n}\nelse if ( v19 > 0 && v19 <= 100 )\n{\nresult = sub_41DD74(a1, 0xAu, v19, 1, v18);\n}\nelse\n{\nresult = (_DWORD *)sub_411DF2(a1, \"invalid number of digits\", v9, v10, v11, v12);\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,a5,a4,v6,v10,v18,v19,v20,sub_46040F,sub_45FEA1,sub_405118,sub_41C3E0,sub_4050F4,sub_41C80C,sub_41E05E,sub_41DD74,sub_411DF2,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ctx', 'a2': 'this_val', 'a5': 'argv', 'a4': 'argc', 'v6': 'argv', 'v10': 'argc', 'v18': 'd', 'v19': 'p', 'v20': 'val', 'sub_46040F': 'js_number_toPrecision', 'sub_45FEA1': 'js_thisNumberValue', 'sub_405118': 'JS_IsException_0', 'sub_41C3E0': 'JS_ToFloat64Free', 'sub_4050F4': 'JS_IsUndefined', 'sub_41C80C': 'JS_ToInt32Sat', 'sub_41E05E': 'JS_ToStringFree', 'sub_41DD74': 'js_dtoa', 'sub_411DF2': 'JS_ThrowRangeError'}"} |
|
vid_register_gamepad_button_callback | 5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99 | open-simh | simh | NA | t_stat vid_register_gamepad_button_callback (VID_GAMEPAD_CALLBACK callback)
{
int n = sizeof (button_callback) / sizeof (callback);
return register_callback ((void **)button_callback, n, (void *)callback);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_48FD13", "function_addr": 4783379, "binary_name": "5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 18h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_4], 0Ah"], [5, "mov rdx, [rbp+var_18]"], [6, "mov eax, [rbp+var_4]"], [7, "mov esi, eax"], [8, "mov edi, offset unk_551180"], [9, "call sub_48FC37"], [10, "leave"], [11, "retn"]], "data_dep": [[5, 3], [6, 4], [7, 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/5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99_5a51c9d5ef2814c801fdc67e9191b92af84684b5df3273cfc43b189428836e99.jsonl.gz", "strip_func_name": "sub_48FD13", "query": "\n\n\n__int64 __fastcall sub_48FD13(__int64 a1)\n{\nreturn sub_48FC37((__int64)&unk_551180, 10, a1);\n}\n\n\n\nQ:[a1,sub_48FD13,sub_48FC37,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'callback', 'sub_48FD13': 'vid_register_gamepad_button_callback', 'sub_48FC37': 'register_callback'}"} |
|
keccak_rotl64_1 | 0511078c936c19812cbd063131c8fc4bf53b68db755f45db14e314be4aa05414 | oriansj | stage0-posix | NA | uint32_t keccak_rotl64_1(uint32_t val1, uint32_t val2, int howfar)
{
if (howfar < 32) {
return (val1 >> (32 - howfar)) | (val2 << howfar);
} else {
return (val1 << (howfar - 32)) | (val2 >> (64 - howfar));
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4016D4", "function_addr": 4200148, "binary_name": "0511078c936c19812cbd063131c8fc4bf53b68db755f45db14e314be4aa05414.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_4], edi"], [3, "mov [rbp+var_8], esi"], [4, "mov [rbp+var_C], edx"], [5, "cmp [rbp+var_C], 1Fh"], [6, "jg short loc_401708"], [7, "mov eax, 20h "], [8, "sub eax, [rbp+var_C]"], [9, "mov edx, [rbp+var_4]"], [10, "mov esi, edx"], [11, "mov ecx, eax"], [12, "shr esi, cl"], [13, "mov eax, [rbp+var_C]"], [14, "mov edx, [rbp+var_8]"], [15, "mov ecx, eax"], [16, "shl edx, cl"], [17, "mov eax, edx"], [18, "or eax, esi"], [19, "jmp short loc_40172A"], [20, "mov eax, [rbp+var_C]"], [21, "sub eax, 20h "], [22, "mov edx, [rbp+var_4]"], [23, "mov esi, edx"], [24, "mov ecx, eax"], [25, "shl esi, cl"], [26, "mov eax, 40h "], [27, "sub eax, [rbp+var_C]"], [28, "mov edx, [rbp+var_8]"], [29, "mov ecx, eax"], [30, "shr edx, cl"], [31, "mov eax, edx"], [32, "or eax, esi"], [33, "pop rbp"], [34, "retn"]], "data_dep": [[5, 4], [6, 5], [8, 4], [8, 7], [9, 2], [10, 9], [11, 8], [12, 10], [12, 11], [13, 4], [14, 3], [15, 13], [16, 15], [16, 14], [17, 16], [18, 17], [18, 12], [20, 4], [21, 20], [22, 2], [23, 22], [24, 21], [25, 23], [25, 24], [27, 4], [27, 26], [28, 3], [29, 27], [30, 29], [30, 28], [31, 30], [32, 31], [32, 25], [33, 0], [34, 18], [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/0511078c936c19812cbd063131c8fc4bf53b68db755f45db14e314be4aa05414_0511078c936c19812cbd063131c8fc4bf53b68db755f45db14e314be4aa05414.jsonl.gz", "strip_func_name": "sub_4016D4", "query": "\n\n\n__int64 __fastcall sub_4016D4(unsigned int a1, unsigned int a2, int a3)\n{\n__int64 result; // rax\n\nif ( a3 > 31 )\nresult = (a1 << (a3 - 32)) | (a2 >> (64 - a3));\nelse\nresult = (a1 >> (32 - a3)) | (a2 << a3);\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_4016D4,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'howfar', 'a1': 'val1', 'a2': 'val2', 'sub_4016D4': 'keccak_rotl64_1'}"} |
|
DecodeScst16 | d6f1c4fccbb8fc2066c0c7749389636df7b33c67e152dc8852a86b3a79bd4c3d | google | honggfuzz | NA | static DecodeStatus DecodeScst16(MCInst *Inst, unsigned Val,
uint64_t Address, void *Decoder)
{
int32_t imm;
imm = Val;
/* Sign extend 16 bit value */
if(imm & (1 << (16 - 1)))
imm |= ~((1 << 16) - 1);
MCOperand_CreateImm0(Inst, imm);
return MCDisassembler_Success;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_51C403", "function_addr": 5358595, "binary_name": "d6f1c4fccbb8fc2066c0c7749389636df7b33c67e152dc8852a86b3a79bd4c3d.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, "mov [rbp+var_4], eax"], [9, "mov eax, [rbp+var_4]"], [10, "and eax, 8000h"], [11, "test eax, eax"], [12, "jz short loc_51C433"], [13, "or [rbp+var_4], 0FFFF0000h"], [14, "mov eax, [rbp+var_4]"], [15, "movsxd rdx, eax"], [16, "mov rax, [rbp+var_18]"], [17, "mov rsi, rdx"], [18, "mov rdi, rax"], [19, "call sub_438268"], [20, "mov eax, 3"], [21, "leave"], [22, "retn"]], "data_dep": [[7, 4], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 8], [14, 8], [14, 13], [15, 14], [16, 3], [17, 15], [18, 16], [22, 20]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d6f1c4fccbb8fc2066c0c7749389636df7b33c67e152dc8852a86b3a79bd4c3d_d6f1c4fccbb8fc2066c0c7749389636df7b33c67e152dc8852a86b3a79bd4c3d.jsonl.gz", "strip_func_name": "sub_51C403", "query": "\n\n\n__int64 __fastcall sub_51C403(__int64 a1, signed int a2)\n{\nsigned int v3; // [rsp+2Ch] [rbp-4h]\n\nv3 = a2;\nif ( (a2 & 0x8000) != 0 )\nv3 = a2 | 0xFFFF0000;\nsub_438268(a1, v3);\nreturn 3LL;\n}\n\n\n\nQ:[a1,a2,v3,sub_51C403,sub_438268,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'Inst', 'a2': 'Val', 'v3': 'imm', 'sub_51C403': 'DecodeScst16', 'sub_438268': 'MCOperand_CreateImm0'}"} |
|
sim_CreateVirtualDisk | 13f2671241114a962235990a8a53447d965ef69e183b81e214ebbded998f318a | open-simh | simh | NA | static VHDHANDLE
sim_CreateVirtualDisk(const char *szVHDPath,
uint32 SizeInSectors,
uint32 BlockSize,
t_bool bFixedVHD)
{
VHD_Footer Footer;
VHD_DynamicDiskHeader Dynamic;
uint32 *BAT = NULL;
time_t now;
uint32 i;
FILE *File = NULL;
uint32 Status = 0;
uint32 BytesPerSector = 512;
uint64 SizeInBytes = ((uint64)SizeInSectors) * BytesPerSector;
uint64 TableOffset;
uint32 MaxTableEntries;
VHDHANDLE hVHD = NULL;
if (SizeInBytes > ((uint64)(1024 * 1024 * 1024)) * 2040) {
Status = EFBIG;
goto Cleanup_Return;
}
File = sim_fopen (szVHDPath, "rb");
if (File) {
fclose (File);
File = NULL;
Status = EEXIST;
goto Cleanup_Return;
}
File = sim_fopen (szVHDPath, "wb");
if (!File) {
Status = errno;
goto Cleanup_Return;
}
memset (&Footer, 0, sizeof(Footer));
memcpy (Footer.Cookie, "conectix", 8);
Footer.Features = NtoHl (0x00000002);;
Footer.FileFormatVersion = NtoHl (0x00010000);;
Footer.DataOffset = NtoHll (bFixedVHD ? ((long long)-1) : (long long)(sizeof(Footer)));
time (&now);
Footer.TimeStamp = NtoHl ((uint32)(now - 946684800));
memcpy (Footer.CreatorApplication, "simh", 4);
Footer.CreatorVersion = NtoHl (0x00040000);
memcpy (Footer.CreatorHostOS, "Wi2k", 4);
Footer.OriginalSize = NtoHll (SizeInBytes);
Footer.CurrentSize = NtoHll (SizeInBytes);
uuid_gen (Footer.UniqueID);
Footer.DiskType = NtoHl (bFixedVHD ? VHD_DT_Fixed : VHD_DT_Dynamic);
Footer.DiskGeometry = NtoHl (0xFFFF10FF);
if (1) { /* CHS Calculation */
uint32 totalSectors = (uint32)(SizeInBytes/BytesPerSector);/* Total data sectors present in the disk image */
uint32 cylinders; /* Number of cylinders present on the disk */
uint32 heads; /* Number of heads present on the disk */
uint32 sectorsPerTrack; /* Sectors per track on the disk */
uint32 cylinderTimesHeads; /* Cylinders x heads */
if (totalSectors > 65535 * 16 * 255)
totalSectors = 65535 * 16 * 255;
if (totalSectors >= 65535 * 16 * 63) {
sectorsPerTrack = 255;
heads = 16;
cylinderTimesHeads = totalSectors / sectorsPerTrack;
}
else {
sectorsPerTrack = 17;
cylinderTimesHeads = totalSectors / sectorsPerTrack;
heads = (cylinderTimesHeads + 1023) / 1024;
if (heads < 4)
heads = 4;
if (cylinderTimesHeads >= (heads * 1024) || heads > 16)
{
sectorsPerTrack = 31;
heads = 16;
cylinderTimesHeads = totalSectors / sectorsPerTrack;
}
if (cylinderTimesHeads >= (heads * 1024))
{
sectorsPerTrack = 63;
heads = 16;
cylinderTimesHeads = totalSectors / sectorsPerTrack;
}
}
cylinders = (totalSectors + sectorsPerTrack * heads - 1) / (sectorsPerTrack * heads);
Footer.DiskGeometry = NtoHl ((cylinders<<16)|(heads<<8)|sectorsPerTrack);
}
Footer.Checksum = NtoHl (CalculateVhdFooterChecksum(&Footer, sizeof(Footer)));
if (bFixedVHD) {
if (WriteFilePosition(File,
&Footer,
sizeof(Footer),
NULL,
SizeInBytes))
Status = errno;
goto Cleanup_Return;
}
/* Dynamic Disk */
memset (&Dynamic, 0, sizeof(Dynamic));
memcpy (Dynamic.Cookie, "cxsparse", 8);
Dynamic.DataOffset = NtoHll ((uint64)0xFFFFFFFFFFFFFFFFLL);
TableOffset = NtoHll(Footer.DataOffset)+sizeof(Dynamic);
Dynamic.TableOffset = NtoHll (TableOffset);
Dynamic.HeaderVersion = NtoHl (0x00010000);
if (0 == BlockSize)
BlockSize = 2*1024*1024;
Dynamic.BlockSize = NtoHl (BlockSize);
MaxTableEntries = (uint32)((SizeInBytes+BlockSize-1)/BlockSize);
Dynamic.MaxTableEntries = NtoHl (MaxTableEntries);
Dynamic.Checksum = NtoHl (CalculateVhdFooterChecksum(&Dynamic, sizeof(Dynamic)));
BAT = (uint32*) malloc (BytesPerSector*((MaxTableEntries*sizeof(*BAT)+BytesPerSector-1)/BytesPerSector));
memset (BAT, 0, BytesPerSector*((MaxTableEntries*sizeof(*BAT)+BytesPerSector-1)/BytesPerSector));
for (i=0; i<MaxTableEntries; ++i)
BAT[i] = VHD_BAT_FREE_ENTRY;
if (WriteFilePosition(File,
&Footer,
sizeof(Footer),
NULL,
0)) {
Status = errno;
goto Cleanup_Return;
}
if (WriteFilePosition(File,
&Dynamic,
sizeof(Dynamic),
NULL,
NtoHll(Footer.DataOffset))) {
Status = errno;
goto Cleanup_Return;
}
if (WriteFilePosition(File,
BAT,
BytesPerSector*((MaxTableEntries*sizeof(*BAT)+BytesPerSector-1)/BytesPerSector),
NULL,
NtoHll(Dynamic.TableOffset))) {
Status = errno;
goto Cleanup_Return;
}
if (WriteFilePosition(File,
&Footer,
sizeof(Footer),
NULL,
NtoHll(Dynamic.TableOffset)+BytesPerSector*((MaxTableEntries*sizeof(*BAT)+BytesPerSector-1)/BytesPerSector))) {
Status = errno;
goto Cleanup_Return;
}
Cleanup_Return:
free (BAT);
if (File)
fclose (File);
if (Status) {
if (Status != EEXIST)
(void)remove (szVHDPath);
}
else {
hVHD = (VHDHANDLE)sim_vhd_disk_open (szVHDPath, "rb+");
if (!hVHD)
Status = errno;
}
errno = Status;
return hVHD;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_486BC1", "function_addr": 4746177, "binary_name": "13f2671241114a962235990a8a53447d965ef69e183b81e214ebbded998f318a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 690h"], [3, "mov [rbp+filename], rdi"], [4, "mov [rbp+var_67C], esi"], [5, "mov [rbp+var_680], edx"], [6, "mov [rbp+var_684], ecx"], [7, "mov [rbp+ptr], 0"], [8, "mov [rbp+stream], 0"], [9, "mov [rbp+var_1C], 0"], [10, "mov [rbp+var_3C], 200h"], [11, "mov edx, [rbp+var_67C]"], [12, "mov eax, [rbp+var_3C]"], [13, "imul rax, rdx"], [14, "mov [rbp+var_48], rax"], [15, "mov [rbp+var_28], 0"], [16, "mov rax, 1FE00000000h"], [17, "cmp [rbp+var_48], rax"], [18, "jbe short loc_486C38"], [19, "mov [rbp+var_1C], 1Bh"], [20, "jmp loc_48720C"], [21, "mov rax, [rbp+filename]"], [22, "mov esi, offset aRb_3"], [23, "mov rdi, rax"], [24, "call sub_446889"], [25, "mov [rbp+stream], rax"], [26, "cmp [rbp+stream], 0"], [27, "jz short loc_486C77"], [28, "mov rax, [rbp+stream]"], [29, "mov rdi, rax"], [30, "call _fclose"], [31, "mov [rbp+stream], 0"], [32, "mov [rbp+var_1C], 11h"], [33, "jmp loc_48720C"], [34, "mov rax, [rbp+filename]"], [35, "mov esi, offset aWb_4"], [36, "mov rdi, rax"], [37, "call sub_446889"], [38, "mov [rbp+stream], rax"], [39, "cmp [rbp+stream], 0"], [40, "jnz short loc_486CA5"], [41, "call ___errno_location"], [42, "mov eax, [rax]"], [43, "mov [rbp+var_1C], eax"], [44, "jmp loc_48720C"], [45, "lea rax, [rbp+s]"], [46, "mov edx, 200h"], [47, "mov esi, 0"], [48, "mov rdi, rax"], [49, "call _memset"], [50, "mov rax, 78697463656E6F63h"], [51, "mov [rbp+s], rax"], [52, "mov edi, 2"], [53, "call sub_478E65"], [54, "mov [rbp+var_258], eax"], [55, "mov edi, 10000h"], [56, "call sub_478E65"], [57, "mov [rbp+var_254], eax"], [58, "cmp [rbp+var_684], 0"], [59, "jz short loc_486D01"], [60, "mov rax, 0FFFFFFFFFFFFFFFFh"], [61, "jmp short loc_486D06"], [62, "mov eax, 200h"], [63, "mov rdi, rax"], [64, "call sub_4851FD"], [65, "mov [rbp+var_250], rax"], [66, "lea rax, [rbp+timer]"], [67, "mov rdi, rax"], [68, "call _time"], [69, "mov rax, [rbp+timer]"], [70, "sub eax, 386D4380h"], [71, "mov edi, eax"], [72, "call sub_478E65"], [73, "mov [rbp+var_248], eax"], [74, "mov [rbp+var_244], 686D6973h"], [75, "mov edi, 40000h"], [76, "call sub_478E65"], [77, "mov [rbp+var_240], eax"], [78, "mov [rbp+var_23C], 6B326957h"], [79, "mov rax, [rbp+var_48]"], [80, "mov rdi, rax"], [81, "call sub_4851FD"], [82, "mov [rbp+var_238], rax"], [83, "mov rax, [rbp+var_48]"], [84, "mov rdi, rax"], [85, "call sub_4851FD"], [86, "mov [rbp+var_230], rax"], [87, "lea rax, [rbp+s]"], [88, "add rax, 44h "], [89, "mov rdi, rax"], [90, "call sub_486B46"], [91, "cmp [rbp+var_684], 0"], [92, "jz short loc_486DAA"], [93, "mov eax, 2"], [94, "jmp short loc_486DAF"], [95, "mov eax, 3"], [96, "mov edi, eax"], [97, "call sub_478E65"], [98, "mov [rbp+var_224], eax"], [99, "mov edi, 0FFFF10FFh"], [100, "call sub_478E65"], [101, "mov [rbp+var_228], eax"], [102, "mov ecx, [rbp+var_3C]"], [103, "mov rax, [rbp+var_48]"], [104, "mov edx, 0"], [105, "div rcx"], [106, "mov [rbp+var_2C], eax"], [107, "cmp [rbp+var_2C], 0FEFF010h"], [108, "jbe short loc_486DEE"], [109, "mov [rbp+var_2C], 0FEFF010h"], [110, "cmp [rbp+var_2C], 3EFFC0Fh"], [111, "jbe short loc_486E18"], [112, "mov [rbp+var_34], 0FFh"], [113, "mov [rbp+var_30], 10h"], [114, "mov eax, [rbp+var_2C]"], [115, "mov edx, 0"], [116, "div [rbp+var_34]"], [117, "mov [rbp+var_38], eax"], [118, "jmp loc_486E9C"], [119, "mov [rbp+var_34], 11h"], [120, "mov eax, [rbp+var_2C]"], [121, "mov edx, 0"], [122, "div [rbp+var_34]"], [123, "mov [rbp+var_38], eax"], [124, "mov eax, [rbp+var_38]"], [125, "add eax, 3FFh"], [126, "shr eax, 0Ah"], [127, "mov [rbp+var_30], eax"], [128, "cmp [rbp+var_30], 3"], [129, "ja short loc_486E48"], [130, "mov [rbp+var_30], 4"], [131, "mov eax, [rbp+var_30]"], [132, "shl eax, 0Ah"], [133, "cmp [rbp+var_38], eax"], [134, "jnb short loc_486E59"], [135, "cmp [rbp+var_30], 10h"], [136, "jbe short loc_486E75"], [137, "mov [rbp+var_34], 1Fh"], [138, "mov [rbp+var_30], 10h"], [139, "mov eax, [rbp+var_2C]"], [140, "mov edx, 0"], [141, "div [rbp+var_34]"], [142, "mov [rbp+var_38], eax"], [143, "mov eax, [rbp+var_30]"], [144, "shl eax, 0Ah"], [145, "cmp [rbp+var_38], eax"], [146, "jb short loc_486E9C"], [147, "mov [rbp+var_34], 3Fh "], [148, "mov [rbp+var_30], 10h"], [149, "mov eax, [rbp+var_2C]"], [150, "mov edx, 0"], [151, "div [rbp+var_34]"], [152, "mov [rbp+var_38], eax"], [153, "mov eax, [rbp+var_38]"], [154, "mov edx, 0"], [155, "div [rbp+var_30]"], [156, "mov [rbp+var_4C], eax"], [157, "mov eax, [rbp+var_4C]"], [158, "shl eax, 10h"], [159, "mov edx, eax"], [160, "mov eax, [rbp+var_30]"], [161, "shl eax, 8"], [162, "or eax, edx"], [163, "or eax, [rbp+var_34]"], [164, "mov edi, eax"], [165, "call sub_478E65"], [166, "mov [rbp+var_228], eax"], [167, "lea rax, [rbp+s]"], [168, "mov esi, 200h"], [169, "mov rdi, rax"], [170, "call sub_4851B3"], [171, "mov edi, eax"], [172, "call sub_478E65"], [173, "mov [rbp+var_220], eax"], [174, "cmp [rbp+var_684], 0"], [175, "jz short loc_486F2F"], [176, "mov rdx, [rbp+var_48]"], [177, "lea rsi, [rbp+s]"], [178, "mov rax, [rbp+stream]"], [179, "mov r8, rdx"], [180, "mov ecx, 0"], [181, "mov edx, 200h"], [182, "mov rdi, rax"], [183, "call sub_485112"], [184, "test eax, eax"], [185, "jz loc_487208"], [186, "call ___errno_location"], [187, "mov eax, [rax]"], [188, "mov [rbp+var_1C], eax"], [189, "jmp loc_487208"], [190, "lea rax, [rbp+var_660]"], [191, "mov edx, 400h"], [192, "mov esi, 0"], [193, "mov rdi, rax"], [194, "call _memset"], [195, "mov rax, 6573726170737863h"], [196, "mov [rbp+var_660], rax"], [197, "mov rdi, 0FFFFFFFFFFFFFFFFh"], [198, "call sub_4851FD"], [199, "mov [rbp+var_658], rax"], [200, "mov rax, [rbp+var_250]"], [201, "mov rdi, rax"], [202, "call sub_4851FD"], [203, "add rax, 400h"], [204, "mov [rbp+var_58], rax"], [205, "mov rax, [rbp+var_58]"], [206, "mov rdi, rax"], [207, "call sub_4851FD"], [208, "mov [rbp+var_650], rax"], [209, "mov edi, 10000h"], [210, "call sub_478E65"], [211, "mov [rbp+var_648], eax"], [212, "cmp [rbp+var_680], 0"], [213, "jnz short loc_486FBB"], [214, "mov [rbp+var_680], 200000h"], [215, "mov eax, [rbp+var_680]"], [216, "mov edi, eax"], [217, "call sub_478E65"], [218, "mov [rbp+var_640], eax"], [219, "mov edx, [rbp+var_680]"], [220, "mov rax, [rbp+var_48]"], [221, "add rax, rdx"], [222, "sub rax, 1"], [223, "mov ecx, [rbp+var_680]"], [224, "mov edx, 0"], [225, "div rcx"], [226, "mov [rbp+var_5C], eax"], [227, "mov eax, [rbp+var_5C]"], [228, "mov edi, eax"], [229, "call sub_478E65"], [230, "mov [rbp+var_644], eax"], [231, "lea rax, [rbp+var_660]"], [232, "mov esi, 400h"], [233, "mov rdi, rax"], [234, "call sub_4851B3"], [235, "mov edi, eax"], [236, "call sub_478E65"], [237, "mov [rbp+var_63C], eax"], [238, "mov ecx, [rbp+var_3C]"], [239, "mov eax, [rbp+var_5C]"], [240, "lea rdx, ds:0[rax*4]"], [241, "mov eax, [rbp+var_3C]"], [242, "add rax, rdx"], [243, "sub rax, 1"], [244, "mov esi, [rbp+var_3C]"], [245, "mov edx, 0"], [246, "div rsi"], [247, "imul rax, rcx"], [248, "mov rdi, rax"], [249, "call _malloc"], [250, "mov [rbp+ptr], rax"], [251, "mov ecx, [rbp+var_3C]"], [252, "mov eax, [rbp+var_5C]"], [253, "lea rdx, ds:0[rax*4]"], [254, "mov eax, [rbp+var_3C]"], [255, "add rax, rdx"], [256, "sub rax, 1"], [257, "mov esi, [rbp+var_3C]"], [258, "mov edx, 0"], [259, "div rsi"], [260, "imul rcx, rax"], [261, "mov rdx, rcx"], [262, "mov rax, [rbp+ptr]"], [263, "mov esi, 0"], [264, "mov rdi, rax"], [265, "call _memset"], [266, "mov [rbp+var_C], 0"], [267, "jmp short loc_4870B4"], [268, "mov eax, [rbp+var_C]"], [269, "lea rdx, ds:0[rax*4]"], [270, "mov rax, [rbp+ptr]"], [271, "add rax, rdx"], [272, "mov dword ptr [rax], 0FFFFFFFFh"], [273, "add [rbp+var_C], 1"], [274, "mov eax, [rbp+var_C]"], [275, "cmp eax, [rbp+var_5C]"], [276, "jb short loc_487098"], [277, "lea rsi, [rbp+s]"], [278, "mov rax, [rbp+stream]"], [279, "mov r8d, 0"], [280, "mov ecx, 0"], [281, "mov edx, 200h"], [282, "mov rdi, rax"], [283, "call sub_485112"], [284, "test eax, eax"], [285, "jz short loc_4870F2"], [286, "call ___errno_location"], [287, "mov eax, [rax]"], [288, "mov [rbp+var_1C], eax"], [289, "jmp loc_48720C"], [290, "mov rax, [rbp+var_250]"], [291, "mov rdi, rax"], [292, "call sub_4851FD"], [293, "mov rdx, rax"], [294, "lea rsi, [rbp+var_660]"], [295, "mov rax, [rbp+stream]"], [296, "mov r8, rdx"], [297, "mov ecx, 0"], [298, "mov edx, 400h"], [299, "mov rdi, rax"], [300, "call sub_485112"], [301, "test eax, eax"], [302, "jz short loc_487137"], [303, "call ___errno_location"], [304, "mov eax, [rax]"], [305, "mov [rbp+var_1C], eax"], [306, "jmp loc_48720C"], [307, "mov rax, [rbp+var_650]"], [308, "mov rdi, rax"], [309, "call sub_4851FD"], [310, "mov rcx, rax"], [311, "mov esi, [rbp+var_3C]"], [312, "mov eax, [rbp+var_5C]"], [313, "lea rdx, ds:0[rax*4]"], [314, "mov eax, [rbp+var_3C]"], [315, "add rax, rdx"], [316, "sub rax, 1"], [317, "mov edi, [rbp+var_3C]"], [318, "mov edx, 0"], [319, "div rdi"], [320, "imul rsi, rax"], [321, "mov rdx, rsi"], [322, "mov rsi, [rbp+ptr]"], [323, "mov rax, [rbp+stream]"], [324, "mov r8, rcx"], [325, "mov ecx, 0"], [326, "mov rdi, rax"], [327, "call sub_485112"], [328, "test eax, eax"], [329, "jz short loc_48719B"], [330, "call ___errno_location"], [331, "mov eax, [rax]"], [332, "mov [rbp+var_1C], eax"], [333, "jmp short loc_48720C"], [334, "mov rax, [rbp+var_650]"], [335, "mov rdi, rax"], [336, "call sub_4851FD"], [337, "mov rsi, rax"], [338, "mov ecx, [rbp+var_3C]"], [339, "mov eax, [rbp+var_5C]"], [340, "lea rdx, ds:0[rax*4]"], [341, "mov eax, [rbp+var_3C]"], [342, "add rax, rdx"], [343, "sub rax, 1"], [344, "mov edi, [rbp+var_3C]"], [345, "mov edx, 0"], [346, "div rdi"], [347, "imul rax, rcx"], [348, "lea rdx, [rsi+rax]"], [349, "lea rsi, [rbp+s]"], [350, "mov rax, [rbp+stream]"], [351, "mov r8, rdx"], [352, "mov ecx, 0"], [353, "mov edx, 200h"], [354, "mov rdi, rax"], [355, "call sub_485112"], [356, "test eax, eax"], [357, "jz short loc_48720B"], [358, "call ___errno_location"], [359, "mov eax, [rax]"], [360, "mov [rbp+var_1C], eax"], [361, "jmp short loc_48720C"], [362, "nop"], [363, "jmp short loc_48720C"], [364, "nop"], [365, "mov rax, [rbp+ptr]"], [366, "mov rdi, rax"], [367, "call _free"], [368, "cmp [rbp+stream], 0"], [369, "jz short loc_48722B"], [370, "mov rax, [rbp+stream]"], [371, "mov rdi, rax"], [372, "call _fclose"], [373, "cmp [rbp+var_1C], 0"], [374, "jz short loc_487248"], [375, "cmp [rbp+var_1C], 11h"], [376, "jz short loc_487271"], [377, "mov rax, [rbp+filename]"], [378, "mov rdi, rax"], [379, "call _remove"], [380, "jmp short loc_487271"], [381, "mov rax, [rbp+filename]"], [382, "mov esi, offset aRb_2"], [383, "mov rdi, rax"], [384, "call sub_485FED"], [385, "mov [rbp+var_28], rax"], [386, "cmp [rbp+var_28], 0"], [387, "jnz short loc_487271"], [388, "call ___errno_location"], [389, "mov eax, [rax]"], [390, "mov [rbp+var_1C], eax"], [391, "call ___errno_location"], [392, "mov edx, [rbp+var_1C]"], [393, "mov [rax], edx"], [394, "mov rax, [rbp+var_28]"], [395, "leave"], [396, "retn"]], "data_dep": [[11, 4], [12, 10], [13, 12], [13, 11], [14, 13], [17, 14], [17, 16], [18, 17], [21, 3], [23, 21], [25, 24], [26, 25], [27, 26], [28, 25], [29, 28], [34, 3], [36, 34], [38, 37], [39, 38], [40, 39], [42, 41], [43, 42], [45, 37], [48, 45], [51, 50], [54, 53], [57, 56], [58, 6], [59, 58], [63, 60], [63, 62], [65, 64], [66, 64], [67, 66], [70, 69], [71, 70], [73, 72], [77, 76], [79, 14], [80, 79], [82, 81], [83, 14], [84, 83], [86, 85], [87, 85], [87, 51], [88, 87], [89, 88], [91, 6], [92, 91], [96, 95], [96, 93], [98, 97], [101, 100], [102, 10], [103, 14], [105, 102], [106, 103], [107, 106], [108, 107], [110, 109], [110, 106], [111, 110], [114, 106], [114, 109], [116, 112], [117, 114], [120, 106], [120, 109], [122, 119], [123, 120], [124, 123], [125, 124], [126, 125], [127, 126], [128, 127], [129, 128], [131, 130], [131, 127], [132, 131], [133, 123], [133, 132], [134, 133], [135, 127], [135, 130], [136, 135], [139, 106], [139, 109], [141, 137], [142, 139], [143, 127], [143, 130], [143, 138], [144, 143], [145, 144], [145, 142], [145, 123], [146, 145], [149, 109], [149, 106], [151, 147], [152, 149], [153, 152], [153, 142], [153, 123], [153, 117], [155, 130], [155, 148], [155, 138], [155, 127], [155, 113], [156, 153], [157, 156], [158, 157], [159, 158], [160, 155], [161, 160], [162, 161], [162, 159], [163, 116], [163, 151], [163, 141], [163, 122], [163, 162], [164, 163], [166, 165], [167, 51], [167, 165], [169, 167], [171, 170], [173, 172], [174, 6], [175, 174], [176, 14], [177, 168], [177, 51], [178, 38], [179, 176], [182, 178], [184, 183], [185, 184], [187, 186], [188, 187], [190, 172], [193, 190], [196, 195], [199, 198], [200, 65], [201, 200], [203, 202], [204, 203], [205, 204], [206, 205], [208, 207], [211, 210], [212, 5], [213, 212], [215, 5], [215, 214], [216, 215], [218, 217], [219, 5], [219, 214], [220, 14], [221, 219], [221, 220], [222, 221], [223, 5], [223, 214], [225, 223], [226, 222], [227, 226], [228, 227], [230, 229], [231, 229], [231, 196], [233, 231], [235, 234], [237, 236], [238, 10], [239, 226], [240, 224], [241, 10], [242, 241], [242, 240], [243, 242], [244, 10], [246, 244], [247, 243], [247, 238], [248, 247], [250, 249], [251, 10], [252, 226], [253, 245], [254, 10], [255, 253], [255, 254], [256, 255], [257, 10], [259, 257], [260, 256], [260, 251], [261, 260], [262, 250], [264, 262], [268, 266], [268, 273], [269, 261], [269, 269], [270, 250], [271, 270], [271, 269], [272, 271], [273, 266], [273, 273], [274, 266], [274, 273], [275, 226], [275, 274], [276, 275], [277, 263], [277, 51], [278, 38], [282, 278], [284, 283], [285, 284], [287, 286], [287, 272], [288, 287], [290, 65], [291, 290], [293, 292], [294, 277], [294, 196], [295, 38], [296, 293], [299, 295], [301, 300], [302, 301], [304, 272], [304, 303], [305, 304], [307, 208], [308, 307], [310, 309], [311, 10], [312, 226], [313, 298], [314, 10], [315, 313], [315, 314], [316, 315], [317, 10], [319, 317], [320, 316], [320, 311], [321, 320], [322, 250], [323, 38], [324, 310], [326, 323], [328, 327], [329, 328], [331, 330], [331, 272], [332, 331], [334, 208], [335, 334], [337, 336], [338, 10], [339, 226], [340, 321], [341, 10], [342, 341], [342, 340], [343, 342], [344, 10], [346, 344], [347, 343], [347, 338], [348, 272], [348, 345], [348, 347], [349, 337], [349, 51], [350, 38], [351, 348], [354, 350], [356, 355], [357, 356], [359, 272], [359, 358], [360, 359], [365, 250], [365, 7], [366, 365], [368, 8], [368, 31], [368, 38], [369, 368], [370, 31], [370, 38], [370, 8], [371, 370], [373, 305], [373, 332], [373, 188], [373, 43], [373, 360], [373, 19], [373, 32], [373, 288], [373, 9], [374, 373], [375, 305], [375, 188], [375, 360], [375, 332], [375, 43], [375, 19], [375, 32], [375, 288], [375, 9], [376, 375], [377, 3], [378, 377], [381, 3], [383, 381], [385, 384], [386, 385], [387, 386], [389, 272], [389, 388], [390, 389], [392, 305], [392, 188], [392, 360], [392, 332], [392, 43], [392, 19], [392, 32], [392, 288], [392, 9], [392, 390], [393, 391], [393, 392], [394, 15], [394, 385], [396, 394]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/13f2671241114a962235990a8a53447d965ef69e183b81e214ebbded998f318a_13f2671241114a962235990a8a53447d965ef69e183b81e214ebbded998f318a.jsonl.gz", "strip_func_name": "sub_486BC1", "query": "\n\n\n__int64 __fastcall sub_486BC1(const char *a1, unsigned int a2, unsigned int a3, int a4)\n{\n__int64 v4; // rax\nunsigned int v5; // eax\nunsigned int v6; // eax\nunsigned int v7; // eax\n__int64 v8; // rax\n__int64 v9; // rax\n__int64 v10; // rax\ntime_t timer; // [rsp+28h] [rbp-668h] BYREF\n__int64 v15[2]; // [rsp+30h] [rbp-660h] BYREF\n__int64 v16; // [rsp+40h] [rbp-650h]\nint v17; // [rsp+48h] [rbp-648h]\nint v18; // [rsp+4Ch] [rbp-644h]\nint v19; // [rsp+50h] [rbp-640h]\nint v20; // [rsp+54h] [rbp-63Ch]\n__int64 s; // [rsp+430h] [rbp-260h] BYREF\nint v22; // [rsp+438h] [rbp-258h]\nint v23; // [rsp+43Ch] [rbp-254h]\n__int64 v24; // [rsp+440h] [rbp-250h]\nint v25; // [rsp+448h] [rbp-248h]\nint v26; // [rsp+44Ch] [rbp-244h]\nint v27; // [rsp+450h] [rbp-240h]\nint v28; // [rsp+454h] [rbp-23Ch]\n__int64 v29; // [rsp+458h] [rbp-238h]\n__int64 v30; // [rsp+460h] [rbp-230h]\nint v31; // [rsp+468h] [rbp-228h]\nint v32; // [rsp+46Ch] [rbp-224h]\nint v33; // [rsp+470h] [rbp-220h]\nunsigned int v34[112]; // [rsp+474h] [rbp-21Ch] BYREF\nunsigned int v35; // [rsp+634h] [rbp-5Ch]\n__int64 v36; // [rsp+638h] [rbp-58h]\nunsigned int v37; // [rsp+644h] [rbp-4Ch]\nunsigned __int64 v38; // [rsp+648h] [rbp-48h]\nunsigned int v39; // [rsp+654h] [rbp-3Ch]\nunsigned int v40; // [rsp+658h] [rbp-38h]\nint v41; // [rsp+65Ch] [rbp-34h]\nunsigned int v42; // [rsp+660h] [rbp-30h]\nunsigned int v43; // [rsp+664h] [rbp-2Ch]\n__int64 v44; // [rsp+668h] [rbp-28h]\n_QWORD v45[2]; // [rsp+674h] [rbp-1Ch]\nunsigned int i; // [rsp+684h] [rbp-Ch]\nvoid *ptr; // [rsp+688h] [rbp-8h]\n\nptr = 0LL;\n*(_QWORD *)((char *)v45 + 4) = 0LL;\nLODWORD(v45[0]) = 0;\nv39 = 512;\nv38 = (unsigned __int64)a2 << 9;\nv44 = 0LL;\nif ( v38 > 0x1FE00000000LL )\n{\nLODWORD(v45[0]) = 27;\ngoto LABEL_38;\n}\n*(_QWORD *)((char *)v45 + 4) = sub_446889(a1, \"rb\");\nif ( *(_QWORD *)((char *)v45 + 4) )\n{\nfclose(*(FILE **)((char *)v45 + 4));\n*(_QWORD *)((char *)v45 + 4) = 0LL;\nLODWORD(v45[0]) = 17;\ngoto LABEL_38;\n}\n*(_QWORD *)((char *)v45 + 4) = sub_446889(a1, \"wb\");\nif ( !*(_QWORD *)((char *)v45 + 4) )\n{\nv45[0] = (unsigned int)*__errno_location();\ngoto LABEL_38;\n}\nmemset(&s, 0, 0x200uLL);\ns = 0x78697463656E6F63LL;\nv22 = sub_478E65(2u);\nv23 = sub_478E65(0x10000u);\nif ( a4 )\nv4 = -1LL;\nelse\nv4 = 512LL;\nv24 = sub_4851FD(v4);\ntime(&timer);\nv25 = sub_478E65((int)timer - 946684800);\nv26 = 1752000883;\nv27 = sub_478E65(0x40000u);\nv28 = 1798465879;\nv29 = sub_4851FD(v38);\nv30 = sub_4851FD(v38);\nsub_486B46(v34);\nif ( a4 )\nv5 = 2;\nelse\nv5 = 3;\nv32 = sub_478E65(v5);\nv31 = sub_478E65(0xFFFF10FF);\nv43 = v38 / v39;\nif ( v43 > 0xFEFF010 )\nv43 = 267382800;\nif ( v43 <= 0x3EFFC0F )\n{\nv41 = 17;\nv40 = v43 / 0x11;\nv42 = (v43 / 0x11 + 1023) >> 10;\nif ( v42 <= 3 )\nv42 = 4;\nif ( v40 >= v42 << 10 || v42 > 0x10 )\n{\nv41 = 31;\nv42 = 16;\nv40 = v43 / 0x1F;\n}\nif ( v40 >= v42 << 10 )\n{\nv41 = 63;\nv42 = 16;\nv40 = v43 / 0x3F;\n}\n}\nelse\n{\nv41 = 255;\nv42 = 16;\nv40 = v43 / 0xFF;\n}\nv37 = v40 / v42;\nv31 = sub_478E65(v41 | ((v40 / v42) << 16) | (v42 << 8));\nv6 = sub_4851B3((unsigned __int8 *)&s, 512LL);\nv33 = sub_478E65(v6);\nif ( a4 )\n{\nif ( !(unsigned int)sub_485112(*(FILE **)((char *)v45 + 4), &s, 0x200uLL, 0LL, v38) )\ngoto LABEL_38;\ngoto LABEL_26;\n}\nmemset(v15, 0, 0x400uLL);\nv15[0] = 0x6573726170737863LL;\nv15[1] = sub_4851FD(-1LL);\nv36 = sub_4851FD(v24) + 1024;\nv16 = sub_4851FD(v36);\nv17 = sub_478E65(0x10000u);\nif ( !a3 )\na3 = 0x200000;\nv19 = sub_478E65(a3);\nv35 = (a3 + v38 - 1) / a3;\nv18 = sub_478E65(v35);\nv7 = sub_4851B3((unsigned __int8 *)v15, 1024LL);\nv20 = sub_478E65(v7);\nptr = malloc(v39 * ((4LL * v35 + (unsigned __int64)v39 - 1) / v39));\nmemset(ptr, 0, (4LL * v35 + (unsigned __int64)v39 - 1) / v39 * v39);\nfor ( i = 0; i < v35; ++i )\n*((_DWORD *)ptr + i) = -1;\nif ( (unsigned int)sub_485112(*(FILE **)((char *)v45 + 4), &s, 0x200uLL, 0LL, 0LL)\n|| (v8 = sub_4851FD(v24), (unsigned int)sub_485112(*(FILE **)((char *)v45 + 4), v15, 0x400uLL, 0LL, v8))\n|| (v9 = sub_4851FD(v16),\n(unsigned int)sub_485112(\n*(FILE **)((char *)v45 + 4),\nptr,\n(4LL * v35 + (unsigned __int64)v39 - 1) / v39 * v39,\n0LL,\nv9))\n|| (v10 = sub_4851FD(v16),\n(unsigned int)sub_485112(\n*(FILE **)((char *)v45 + 4),\n&s,\n0x200uLL,\n0LL,\nv10 + v39 * ((4LL * v35 + (unsigned __int64)v39 - 1) / v39))) )\n{\nLABEL_26:\nLODWORD(v45[0]) = *__errno_location();\n}\nLABEL_38:\nfree(ptr);\nif ( *(_QWORD *)((char *)v45 + 4) )\nfclose(*(FILE **)((char *)v45 + 4));\nif ( LODWORD(v45[0]) )\n{\nif ( LODWORD(v45[0]) != 17 )\nremove(a1);\n}\nelse\n{\nv44 = sub_485FED(a1, \"rb+\");\nif ( !v44 )\nLODWORD(v45[0]) = *__errno_location();\n}\n*__errno_location() = v45[0];\nreturn v44;\n}\n\n\n\nQ:[a3,a4,a1,a2,timer,v15,s,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,ptr,sub_486BC1,sub_446889,sub_478E65,sub_4851FD,sub_486B46,sub_4851B3,sub_485112,sub_485FED,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'BlockSize', 'a4': 'bFixedVHD', 'a1': 'szVHDPath', 'a2': 'SizeInSectors', 'timer': 'now', 'v15': 'Dynamic', 's': 'Footer', 'v35': 'MaxTableEntries', 'v36': 'TableOffset', 'v37': 'cylinders', 'v38': 'SizeInBytes', 'v39': 'BytesPerSector', 'v40': 'cylinderTimesHeads', 'v41': 'sectorsPerTrack', 'v42': 'heads', 'v43': 'totalSectors', 'v44': 'hVHD', 'v45': 'Status', 'ptr': 'BAT', 'sub_486BC1': 'sim_CreateVirtualDisk', 'sub_446889': 'sim_fopen', 'sub_478E65': 'NtoHl', 'sub_4851FD': 'NtoHll', 'sub_486B46': 'uuid_gen', 'sub_4851B3': 'CalculateVhdFooterChecksum', 'sub_485112': 'WriteFilePosition', 'sub_485FED': 'sim_vhd_disk_open'}"} |
|
u8x8_d_lc7981_128x128 | 2b9fe636105b1c217d646f6f505ec5c5841c21218c68c54bdc83f742f945e2b5 | Ai-Thinker-Open | Ai-Thinker-WB2 | NA | uint8_t u8x8_d_lc7981_128x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
{
/* call common procedure first and handle messages there */
if ( u8x8_d_lc7981_common(u8x8, msg, arg_int, arg_ptr) == 0 )
{
/* msg not handled, then try here */
switch(msg)
{
case U8X8_MSG_DISPLAY_SETUP_MEMORY:
u8x8_d_helper_display_setup_memory(u8x8, &u8x8_lc7981_128x128_display_info);
break;
case U8X8_MSG_DISPLAY_INIT:
u8x8_d_helper_display_init(u8x8);
u8x8_cad_SendSequence(u8x8, u8x8_d_lc7981_128x128_init_seq);
break;
default:
return 0; /* msg unknown */
}
}
return 1;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_408F1B", "function_addr": 4230939, "binary_name": "2b9fe636105b1c217d646f6f505ec5c5841c21218c68c54bdc83f742f945e2b5.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov eax, edx"], [5, "mov [rbp+var_18], rcx"], [6, "mov edx, esi"], [7, "mov [rbp+var_C], dl"], [8, "mov [rbp+var_10], al"], [9, "movzx edx, [rbp+var_10]"], [10, "movzx esi, [rbp+var_C]"], [11, "mov rcx, [rbp+var_18]"], [12, "mov rax, [rbp+var_8]"], [13, "mov rdi, rax"], [14, "call sub_408B9B"], [15, "test al, al"], [16, "jnz short loc_408F9A"], [17, "movzx eax, [rbp+var_C]"], [18, "cmp eax, 9"], [19, "jz short loc_408F61"], [20, "cmp eax, 0Ah"], [21, "jz short loc_408F74"], [22, "jmp short loc_408F93"], [23, "mov rax, [rbp+var_8]"], [24, "mov esi, offset unk_43ACA0"], [25, "mov rdi, rax"], [26, "call sub_42D0C4"], [27, "jmp short loc_408F9B"], [28, "mov rax, [rbp+var_8]"], [29, "mov rdi, rax"], [30, "call sub_42D0F0"], [31, "mov rax, [rbp+var_8]"], [32, "mov esi, offset unk_43ACC0"], [33, "mov rdi, rax"], [34, "call sub_42267E"], [35, "jmp short loc_408F9B"], [36, "mov eax, 0"], [37, "jmp short locret_408FA0"], [38, "nop"], [39, "mov eax, 1"], [40, "leave"], [41, "retn"]], "data_dep": [[7, 6], [8, 4], [9, 8], [10, 7], [11, 5], [12, 3], [13, 12], [15, 14], [16, 15], [17, 7], [18, 17], [19, 18], [20, 17], [21, 20], [23, 3], [25, 23], [28, 3], [29, 28], [31, 3], [33, 31], [41, 39], [41, 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/2b9fe636105b1c217d646f6f505ec5c5841c21218c68c54bdc83f742f945e2b5_2b9fe636105b1c217d646f6f505ec5c5841c21218c68c54bdc83f742f945e2b5.jsonl.gz", "strip_func_name": "sub_408F1B", "query": "\n\n\n__int64 __fastcall sub_408F1B(__int64 a1, char a2, unsigned __int8 a3, __int64 a4)\n{\nif ( !(unsigned __int8)sub_408B9B(a1, a2, a3, a4) )\n{\nif ( a2 == 9 )\n{\nsub_42D0C4(a1, &unk_43ACA0);\n}\nelse\n{\nif ( a2 != 10 )\nreturn 0LL;\nsub_42D0F0(a1);\nsub_42267E(a1, &unk_43ACC0);\n}\n}\nreturn 1LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,sub_408F1B,sub_408B9B,sub_42D0C4,sub_42D0F0,sub_42267E,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'arg_int', 'a4': 'arg_ptr', 'a1': 'u8x8', 'a2': 'msg', 'sub_408F1B': 'u8x8_d_lc7981_128x128', 'sub_408B9B': 'u8x8_d_lc7981_common', 'sub_42D0C4': 'u8x8_d_helper_display_setup_memory', 'sub_42D0F0': 'u8x8_d_helper_display_init', 'sub_42267E': 'u8x8_cad_SendSequence'}"} |
|
from_mont | 95e177443c92e9336339d9c26a5541ae5fa392d2aad4553c2fd270fbab25eae9 | microsoft | PQCrypto-SIDH | NA | void from_mont(const digit_t* ma, digit_t* c)
{ // Conversion from Montgomery representation to standard representation,
// c = ma*R^(-1) mod p = a mod p, where ma in [0, p-1].
digit_t one[NWORDS_FIELD] = {0};
one[0] = 1;
fpmul_mont(ma, one, c);
fpcorrection(c);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401E7E", "function_addr": 4202110, "binary_name": "95e177443c92e9336339d9c26a5541ae5fa392d2aad4553c2fd270fbab25eae9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_48], rdi"], [4, "mov [rbp+var_50], rsi"], [5, "mov [rbp+var_40], 0"], [6, "mov [rbp+var_38], 0"], [7, "mov [rbp+var_30], 0"], [8, "mov [rbp+var_28], 0"], [9, "mov [rbp+var_20], 0"], [10, "mov [rbp+var_18], 0"], [11, "mov [rbp+var_10], 0"], [12, "mov [rbp+var_8], 0"], [13, "mov [rbp+var_40], 1"], [14, "mov rdx, [rbp+var_50]"], [15, "lea rcx, [rbp+var_40]"], [16, "mov rax, [rbp+var_48]"], [17, "mov rsi, rcx"], [18, "mov rdi, rax"], [19, "call sub_401F4E"], [20, "mov rax, [rbp+var_50]"], [21, "mov rdi, rax"], [22, "call sub_414291"], [23, "nop"], [24, "leave"], [25, "retn"]], "data_dep": [[14, 4], [15, 13], [16, 3], [17, 15], [18, 16], [20, 4], [21, 20], [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/95e177443c92e9336339d9c26a5541ae5fa392d2aad4553c2fd270fbab25eae9_95e177443c92e9336339d9c26a5541ae5fa392d2aad4553c2fd270fbab25eae9.jsonl.gz", "strip_func_name": "sub_401E7E", "query": "\n\n\n__int64 __fastcall sub_401E7E(__int64 a1, __int64 a2)\n{\n__int64 v3[8]; // [rsp+10h] [rbp-40h] BYREF\n\nv3[1] = 0LL;\nv3[2] = 0LL;\nv3[3] = 0LL;\nv3[4] = 0LL;\nv3[5] = 0LL;\nv3[6] = 0LL;\nv3[7] = 0LL;\nv3[0] = 1LL;\nsub_401F4E(a1, v3, a2);\nreturn sub_414291(a2);\n}\n\n\n\nQ:[a1,a2,v3,sub_401E7E,sub_401F4E,sub_414291,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ma', 'a2': 'c', 'v3': 'one', 'sub_401E7E': 'from_mont', 'sub_401F4E': 'fpmul503_mont', 'sub_414291': 'fpcorrection503'}"} |
|
restartcollection | fd2c9595cb716f3328806e885797d5774eea28406be923a6d77cf5f942355adb | Xinyuan-LilyGO | T-Watch-2021 | NA | static void restartcollection (global_State *g) {
g->gray = g->grayagain = NULL;
g->weak = g->allweak = g->ephemeron = NULL;
markobject(g, g->mainthread);
markvalue(g, &g->l_registry);
markmt(g);
markbeingfnz(g); /* mark any finalizing object left from previous cycle */
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41742D", "function_addr": 4289581, "binary_name": "fd2c9595cb716f3328806e885797d5774eea28406be923a6d77cf5f942355adb.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 qword ptr [rax+78h], 0"], [6, "mov rax, [rbp+var_8]"], [7, "mov rdx, [rax+78h]"], [8, "mov rax, [rbp+var_8]"], [9, "mov [rax+70h], rdx"], [10, "mov rax, [rbp+var_8]"], [11, "mov qword ptr [rax+88h], 0"], [12, "mov rax, [rbp+var_8]"], [13, "mov rdx, [rax+88h]"], [14, "mov rax, [rbp+var_8]"], [15, "mov [rax+90h], rdx"], [16, "mov rax, [rbp+var_8]"], [17, "mov rdx, [rax+90h]"], [18, "mov rax, [rbp+var_8]"], [19, "mov [rax+80h], rdx"], [20, "mov rax, [rbp+var_8]"], [21, "mov rax, [rax+0C8h]"], [22, "movzx eax, byte ptr [rax+9]"], [23, "movzx eax, al"], [24, "and eax, 3"], [25, "test eax, eax"], [26, "jz short loc_4174F9"], [27, "mov rax, [rbp+var_8]"], [28, "mov rax, [rax+0C8h]"], [29, "movzx eax, byte ptr [rax+8]"], [30, "movzx eax, al"], [31, "and eax, 0Fh"], [32, "cmp eax, 9"], [33, "jle short loc_4174DC"], [34, "mov ecx, offset aRestartcollect"], [35, "mov edx, 154h"], [36, "mov esi, offset aLgcC"], [37, "mov edi, offset aGMainthreadTt0"], [38, "call ___assert_fail"], [39, "mov rax, [rbp+var_8]"], [40, "mov rax, [rax+0C8h]"], [41, "mov rdx, rax"], [42, "mov rax, [rbp+var_8]"], [43, "mov rsi, rdx"], [44, "mov rdi, rax"], [45, "call sub_416909"], [46, "mov rax, [rbp+var_8]"], [47, "mov eax, [rax+48h]"], [48, "and eax, 40h"], [49, "test eax, eax"], [50, "jz short loc_417566"], [51, "mov rax, [rbp+var_8]"], [52, "mov eax, [rax+48h]"], [53, "and eax, 3Fh"], [54, "mov edx, eax"], [55, "mov rax, [rbp+var_8]"], [56, "mov eax, [rax+48h]"], [57, "and eax, 40h"], [58, "test eax, eax"], [59, "jnz short loc_41753A"], [60, "mov ecx, offset aRestartcollect"], [61, "mov edx, 155h"], [62, "mov esi, offset aLgcC"], [63, "mov edi, offset aGLRegistryTt16"], [64, "call ___assert_fail"], [65, "mov rax, [rbp+var_8]"], [66, "mov rax, [rax+40h]"], [67, "movzx eax, byte ptr [rax+8]"], [68, "movzx eax, al"], [69, "cmp edx, eax"], [70, "jz short loc_417566"], [71, "mov ecx, offset aRestartcollect"], [72, "mov edx, 155h"], [73, "mov esi, offset aLgcC"], [74, "mov edi, offset a0_4"], [75, "call ___assert_fail"], [76, "mov rax, [rbp+var_8]"], [77, "mov eax, [rax+48h]"], [78, "and eax, 40h"], [79, "test eax, eax"], [80, "jz short loc_4175EF"], [81, "mov rax, [rbp+var_8]"], [82, "mov eax, [rax+48h]"], [83, "and eax, 40h"], [84, "test eax, eax"], [85, "jnz short loc_41759B"], [86, "mov ecx, offset aRestartcollect"], [87, "mov edx, 155h"], [88, "mov esi, offset aLgcC"], [89, "mov edi, offset aGLRegistryTt16"], [90, "call ___assert_fail"], [91, "mov rax, [rbp+var_8]"], [92, "mov rax, [rax+40h]"], [93, "movzx eax, byte ptr [rax+9]"], [94, "movzx eax, al"], [95, "and eax, 3"], [96, "test eax, eax"], [97, "jz short loc_4175EF"], [98, "mov rax, [rbp+var_8]"], [99, "mov eax, [rax+48h]"], [100, "and eax, 40h"], [101, "test eax, eax"], [102, "jnz short loc_4175D8"], [103, "mov ecx, offset aRestartcollect"], [104, "mov edx, 155h"], [105, "mov esi, offset aLgcC"], [106, "mov edi, offset aGLRegistryTt16"], [107, "call ___assert_fail"], [108, "mov rax, [rbp+var_8]"], [109, "mov rdx, [rax+40h]"], [110, "mov rax, [rbp+var_8]"], [111, "mov rsi, rdx"], [112, "mov rdi, rax"], [113, "call sub_416909"], [114, "mov rax, [rbp+var_8]"], [115, "mov rdi, rax"], [116, "call sub_4170E7"], [117, "mov rax, [rbp+var_8]"], [118, "mov rdi, rax"], [119, "call sub_4171A6"], [120, "nop"], [121, "leave"], [122, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 5], [7, 6], [8, 3], [9, 8], [9, 7], [10, 3], [11, 10], [12, 3], [13, 12], [13, 11], [14, 3], [15, 14], [15, 13], [16, 3], [17, 16], [17, 15], [18, 3], [19, 18], [19, 17], [20, 3], [21, 20], [21, 19], [22, 19], [22, 21], [23, 22], [24, 23], [25, 24], [26, 25], [27, 3], [28, 5], [28, 9], [28, 11], [28, 27], [28, 15], [28, 19], [29, 11], [29, 15], [29, 19], [29, 28], [29, 5], [29, 9], [30, 29], [31, 30], [32, 31], [33, 32], [39, 3], [40, 15], [40, 19], [40, 5], [40, 9], [40, 39], [40, 11], [41, 40], [42, 3], [43, 41], [44, 42], [46, 3], [47, 9], [47, 11], [47, 15], [47, 19], [47, 46], [47, 5], [48, 47], [49, 48], [50, 49], [51, 3], [52, 15], [52, 51], [52, 19], [52, 5], [52, 9], [52, 11], [53, 52], [54, 53], [55, 3], [56, 19], [56, 5], [56, 55], [56, 9], [56, 11], [56, 15], [57, 56], [58, 57], [59, 58], [65, 3], [66, 5], [66, 9], [66, 11], [66, 15], [66, 65], [66, 19], [67, 15], [67, 19], [67, 5], [67, 9], [67, 66], [67, 11], [68, 67], [69, 68], [69, 54], [70, 69], [76, 3], [77, 19], [77, 76], [77, 5], [77, 9], [77, 11], [77, 15], [78, 77], [79, 78], [80, 79], [81, 3], [82, 15], [82, 81], [82, 19], [82, 5], [82, 9], [82, 11], [83, 82], [84, 83], [85, 84], [91, 3], [92, 15], [92, 19], [92, 5], [92, 9], [92, 11], [92, 91], [93, 15], [93, 19], [93, 92], [93, 5], [93, 9], [93, 11], [94, 93], [95, 94], [96, 95], [97, 96], [98, 3], [99, 19], [99, 5], [99, 98], [99, 9], [99, 11], [99, 15], [100, 99], [101, 100], [102, 101], [108, 3], [109, 15], [109, 108], [109, 19], [109, 5], [109, 9], [109, 11], [110, 3], [111, 109], [112, 110], [114, 3], [115, 114], [117, 3], [118, 117], [122, 119]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/fd2c9595cb716f3328806e885797d5774eea28406be923a6d77cf5f942355adb_fd2c9595cb716f3328806e885797d5774eea28406be923a6d77cf5f942355adb.jsonl.gz", "strip_func_name": "sub_41742D", "query": "\n\n\n__int64 __fastcall sub_41742D(__int64 a1)\n{\n*(_QWORD *)(a1 + 120) = 0LL;\n*(_QWORD *)(a1 + 112) = *(_QWORD *)(a1 + 120);\n*(_QWORD *)(a1 + 136) = 0LL;\n*(_QWORD *)(a1 + 144) = *(_QWORD *)(a1 + 136);\n*(_QWORD *)(a1 + 128) = *(_QWORD *)(a1 + 144);\nif ( (*(_BYTE *)(*(_QWORD *)(a1 + 200) + 9LL) & 3) != 0 )\n{\nif ( (*(_BYTE *)(*(_QWORD *)(a1 + 200) + 8LL) & 0xFu) > 9 )\n__assert_fail(\"(((g->mainthread)->tt) & 0x0F) < (9+1)\", \"lgc.c\", 0x154u, \"restartcollection\");\nsub_416909((_QWORD *)a1, *(_QWORD *)(a1 + 200));\n}\nif ( (*(_DWORD *)(a1 + 72) & 0x40) != 0 && (*(_DWORD *)(a1 + 72) & 0x3F) != *(_BYTE *)(*(_QWORD *)(a1 + 64) + 8LL) )\n__assert_fail(\"0\", \"lgc.c\", 0x155u, \"restartcollection\");\nif ( (*(_DWORD *)(a1 + 72) & 0x40) != 0 && (*(_BYTE *)(*(_QWORD *)(a1 + 64) + 9LL) & 3) != 0 )\n{\nif ( (*(_DWORD *)(a1 + 72) & 0x40) == 0 )\n__assert_fail(\"(((&g->l_registry)->tt_) & (1 << 6))\", \"lgc.c\", 0x155u, \"restartcollection\");\nsub_416909((_QWORD *)a1, *(_QWORD *)(a1 + 64));\n}\nsub_4170E7((_QWORD *)a1);\nreturn sub_4171A6((_QWORD *)a1);\n}\n\n\n\nQ:[a1,sub_41742D,sub_416909,sub_4170E7,sub_4171A6,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'g', 'sub_41742D': 'restartcollection', 'sub_416909': 'reallymarkobject', 'sub_4170E7': 'markmt', 'sub_4171A6': 'markbeingfnz'}"} |
|
get_port | 7e12abaf7fc66053a92826e2a558f7a384b378b72106e39ca2a19a2d81c3f349 | sunmingbao | linux-dev-framework | NA | uint16_t get_port(struct sockaddr_in *sock_addr, uint16_t *port)
{
uint16_t tmp_port=ntohs(sock_addr->sin_port);
if (port != NULL)
*port=tmp_port;
return tmp_port;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "get_port", "function_addr": 4206881, "binary_name": "7e12abaf7fc66053a92826e2a558f7a384b378b72106e39ca2a19a2d81c3f349.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, "movzx eax, word ptr [rax+2]"], [7, "movzx eax, ax"], [8, "mov edi, eax"], [9, "call _ntohs"], [10, "mov [rbp+var_2], ax"], [11, "cmp [rbp+var_20], 0"], [12, "jz short loc_403159"], [13, "mov rax, [rbp+var_20]"], [14, "movzx edx, [rbp+var_2]"], [15, "mov [rax], dx"], [16, "movzx eax, [rbp+var_2]"], [17, "leave"], [18, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [10, 9], [11, 4], [12, 11], [13, 4], [14, 10], [15, 14], [15, 13], [16, 10], [18, 16]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/7e12abaf7fc66053a92826e2a558f7a384b378b72106e39ca2a19a2d81c3f349_7e12abaf7fc66053a92826e2a558f7a384b378b72106e39ca2a19a2d81c3f349.jsonl.gz", "strip_func_name": "get_port", "query": "\n\n\n__int64 __fastcall get_port(__int64 a1, uint16_t *a2)\n{\nuint16_t v3; // [rsp+1Eh] [rbp-2h]\n\nv3 = ntohs(*(_WORD *)(a1 + 2));\nif ( a2 )\n*a2 = v3;\nreturn v3;\n}\n\n\n\nQ:[a1,a2,v3,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'sock_addr', 'a2': 'port', 'v3': 'tmp_port'}"} |
|
FSE_compressBound | 865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6 | facebook | zstd | NA | size_t FSE_compressBound(size_t size) { return FSE_COMPRESSBOUND(size); } | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4DC6CA", "function_addr": 5097162, "binary_name": "865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6.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, 7"], [5, "mov rdx, rax"], [6, "mov rax, [rbp+var_8]"], [7, "add rax, rdx"], [8, "add rax, 20Ch"], [9, "pop rbp"], [10, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 2], [7, 5], [7, 6], [8, 7], [9, 0], [10, 8]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6_865724ebdf8f31c695b0022cc64ebcc76b491dfcaf7d0e9f4ffca1890f30b8c6.jsonl.gz", "strip_func_name": "sub_4DC6CA", "query": "\n\n\n__int64 __fastcall sub_4DC6CA(unsigned __int64 a1)\n{\nreturn (a1 >> 7) + a1 + 524;\n}\n\n\n\nQ:[a1,sub_4DC6CA,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'size', 'sub_4DC6CA': 'FSE_compressBound'}"} |
|
Routine_Free | 854cdf5444b2b00c87d26e7d13f4f78203371e000073005c07d41bd72c04e6ea | pahihu | mumps | NA | void Routine_Free(rbd *pointer) // call internally, rbd locked
{ rbd *ptr; // a handy pointer
rbd *p; // and another
int hash; // hash pointer
pointer->rou_size = 0; // flag 'not used'
//hash = Routine_Hash(pointer->rnam.var_qu); // get the hash
hash = Routine_Hash(pointer->rnam.var_xu); // get the hash
ptr = systab->vol[0]->rbd_hash[hash]; // see where it points
if (ptr == pointer) // if that's us
{ systab->vol[0]->rbd_hash[hash] =
pointer->fwd_link; // point at our forward link
}
else // else find our entry
{ while (TRUE)
{ if (ptr == NULL) // if end of list
{ ptr = systab->vol[0]->rbd_hash[RBD_HASH]; //point at first free
if (pointer == ptr)
{ systab->vol[0]->rbd_hash[RBD_HASH] = pointer->fwd_link;
}
else
{ while (ptr != NULL) // scan free list
{ if (ptr->fwd_link == pointer) // if in freelist
{ ptr->fwd_link = pointer->fwd_link; // take it out
break; // and quit
}
ptr = ptr->fwd_link; // point at next
// if (ptr == NULL) we should search else where!!!
}
}
break;
}
if (ptr->fwd_link == pointer) // if found
{ ptr->fwd_link = pointer->fwd_link; // point it at our forward link
break; // and quit
}
ptr = ptr->fwd_link; // point to next
}
}
pointer->fwd_link = systab->vol[0]->rbd_hash[RBD_HASH]; //point at first free
systab->vol[0]->rbd_hash[RBD_HASH] = pointer; // add to free list
//pointer->rnam.var_qu = 0; // zot rou name
X_Clear(pointer->rnam.var_xu); // zot rou name
pointer->uci = 0; // and uci
pointer->vol = 0; // and vol
pointer->last_access = (time_t) 0; // and access
while (TRUE) // until end of list
{ ptr = (rbd *) ((u_char *) pointer + pointer->chunk_size); // point at next
if (ptr >= (rbd *) systab->vol[0]->rbd_end) break; // quit when done
if (ptr->rou_size == 0) // if there is no routine
Routine_Combine(pointer); // combine it in
else break; // else done
}
while (TRUE) // look for previous
{ ptr = (rbd *) systab->vol[0]->rbd_head; // start of rbds
if (ptr == pointer) return; // same - all done
while (TRUE) // scan for previous
{ p = (rbd *) ((u_char *) ptr + ptr->chunk_size); // point at next
if (p == pointer) break; // found it (in ptr)
ptr = p; // remember this one
}
if (ptr->rou_size == 0) // if unused
{ pointer = ptr; // make this one active
Routine_Combine(pointer); // combine it in
}
else return; // else all done
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44CC0D", "function_addr": 4508685, "binary_name": "854cdf5444b2b00c87d26e7d13f4f78203371e000073005c07d41bd72c04e6ea.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 word ptr [rax+3Ah], 0"], [6, "mov rcx, [rbp+var_28]"], [7, "sub rsp, 20h"], [8, "mov rsi, rsp"], [9, "mov rax, [rcx+18h]"], [10, "mov rdx, [rcx+20h]"], [11, "mov [rsi], rax"], [12, "mov [rsi+8], rdx"], [13, "mov rax, [rcx+28h]"], [14, "mov rdx, [rcx+30h]"], [15, "mov [rsi+10h], rax"], [16, "mov [rsi+18h], rdx"], [17, "call sub_44CAF8"], [18, "add rsp, 20h"], [19, "mov [rbp+var_C], eax"], [20, "mov rax, cs:shmaddr"], [21, "mov rax, [rax+280h]"], [22, "mov edx, [rbp+var_C]"], [23, "movsxd rdx, edx"], [24, "add rdx, 1006h"], [25, "mov rax, [rax+rdx*8+8]"], [26, "mov [rbp+var_8], rax"], [27, "mov rax, [rbp+var_8]"], [28, "cmp rax, [rbp+var_28]"], [29, "jnz short loc_44CCB3"], [30, "mov rax, cs:shmaddr"], [31, "mov rax, [rax+280h]"], [32, "mov rdx, [rbp+var_28]"], [33, "mov rdx, [rdx]"], [34, "mov ecx, [rbp+var_C]"], [35, "movsxd rcx, ecx"], [36, "add rcx, 1006h"], [37, "mov [rax+rcx*8+8], rdx"], [38, "jmp loc_44CD5A"], [39, "cmp [rbp+var_8], 0"], [40, "jnz short loc_44CD2D"], [41, "mov rax, cs:shmaddr"], [42, "mov rax, [rax+280h]"], [43, "mov rax, [rax+0A030h]"], [44, "mov [rbp+var_8], rax"], [45, "mov rax, [rbp+var_28]"], [46, "cmp rax, [rbp+var_8]"], [47, "jnz short loc_44CD24"], [48, "mov rax, cs:shmaddr"], [49, "mov rax, [rax+280h]"], [50, "mov rdx, [rbp+var_28]"], [51, "mov rdx, [rdx]"], [52, "mov [rax+0A030h], rdx"], [53, "jmp short loc_44CD5A"], [54, "mov rax, [rbp+var_8]"], [55, "mov rax, [rax]"], [56, "cmp [rbp+var_28], rax"], [57, "jnz short loc_44CD19"], [58, "mov rax, [rbp+var_28]"], [59, "mov rdx, [rax]"], [60, "mov rax, [rbp+var_8]"], [61, "mov [rax], rdx"], [62, "nop"], [63, "jmp short loc_44CD5A"], [64, "mov rax, [rbp+var_8]"], [65, "mov rax, [rax]"], [66, "mov [rbp+var_8], rax"], [67, "cmp [rbp+var_8], 0"], [68, "jnz short loc_44CCFB"], [69, "jmp short loc_44CD5A"], [70, "mov rax, [rbp+var_8]"], [71, "mov rax, [rax]"], [72, "cmp [rbp+var_28], rax"], [73, "jnz short loc_44CD4A"], [74, "mov rax, [rbp+var_28]"], [75, "mov rdx, [rax]"], [76, "mov rax, [rbp+var_8]"], [77, "mov [rax], rdx"], [78, "jmp short loc_44CD5A"], [79, "mov rax, [rbp+var_8]"], [80, "mov rax, [rax]"], [81, "mov [rbp+var_8], rax"], [82, "jmp loc_44CCB3"], [83, "mov rax, cs:shmaddr"], [84, "mov rax, [rax+280h]"], [85, "mov rdx, [rax+0A030h]"], [86, "mov rax, [rbp+var_28]"], [87, "mov [rax], rdx"], [88, "mov rax, cs:shmaddr"], [89, "mov rax, [rax+280h]"], [90, "mov rdx, [rbp+var_28]"], [91, "mov [rax+0A030h], rdx"], [92, "mov rax, [rbp+var_28]"], [93, "add rax, 18h"], [94, "mov rdi, rax"], [95, "call sub_449656"], [96, "mov rax, [rbp+var_28]"], [97, "mov byte ptr [rax+38h], 0"], [98, "mov rax, [rbp+var_28]"], [99, "mov byte ptr [rax+39h], 0"], [100, "mov rax, [rbp+var_28]"], [101, "mov qword ptr [rax+10h], 0"], [102, "mov rax, [rbp+var_28]"], [103, "mov eax, [rax+8]"], [104, "movsxd rdx, eax"], [105, "mov rax, [rbp+var_28]"], [106, "add rax, rdx"], [107, "mov [rbp+var_8], rax"], [108, "mov rax, cs:shmaddr"], [109, "mov rax, [rax+280h]"], [110, "mov rax, [rax+0A040h]"], [111, "cmp [rbp+var_8], rax"], [112, "jnb short loc_44CE06"], [113, "mov rax, [rbp+var_8]"], [114, "movzx eax, word ptr [rax+3Ah]"], [115, "test ax, ax"], [116, "jnz short loc_44CE09"], [117, "mov rax, [rbp+var_28]"], [118, "mov rdi, rax"], [119, "call sub_44CB6F"], [120, "jmp short loc_44CDBB"], [121, "nop"], [122, "jmp short loc_44CE0A"], [123, "nop"], [124, "mov rax, cs:shmaddr"], [125, "mov rax, [rax+280h]"], [126, "mov rax, [rax+0A038h]"], [127, "mov [rbp+var_8], rax"], [128, "mov rax, [rbp+var_8]"], [129, "cmp rax, [rbp+var_28]"], [130, "jz short loc_44CE7A"], [131, "mov rax, [rbp+var_8]"], [132, "mov eax, [rax+8]"], [133, "movsxd rdx, eax"], [134, "mov rax, [rbp+var_8]"], [135, "add rax, rdx"], [136, "mov [rbp+var_18], rax"], [137, "mov rax, [rbp+var_18]"], [138, "cmp rax, [rbp+var_28]"], [139, "jz short loc_44CE56"], [140, "mov rax, [rbp+var_18]"], [141, "mov [rbp+var_8], rax"], [142, "jmp short loc_44CE2D"], [143, "nop"], [144, "mov rax, [rbp+var_8]"], [145, "movzx eax, word ptr [rax+3Ah]"], [146, "test ax, ax"], [147, "jnz short loc_44CE7D"], [148, "mov rax, [rbp+var_8]"], [149, "mov [rbp+var_28], rax"], [150, "mov rax, [rbp+var_28]"], [151, "mov rdi, rax"], [152, "call sub_44CB6F"], [153, "jmp short loc_44CE0A"], [154, "nop"], [155, "jmp short locret_44CE7E"], [156, "nop"], [157, "leave"], [158, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 2], [8, 7], [9, 6], [9, 5], [10, 6], [10, 5], [11, 9], [11, 8], [12, 10], [12, 8], [13, 12], [13, 6], [14, 12], [14, 6], [15, 13], [15, 8], [16, 8], [16, 14], [18, 7], [19, 17], [21, 16], [21, 20], [22, 19], [23, 22], [24, 23], [25, 21], [25, 16], [26, 25], [27, 26], [28, 27], [28, 3], [29, 28], [31, 15], [31, 37], [31, 5], [31, 12], [31, 30], [31, 16], [31, 11], [32, 3], [33, 15], [33, 37], [33, 5], [33, 32], [33, 12], [33, 16], [33, 11], [34, 19], [35, 34], [36, 35], [37, 33], [37, 31], [39, 81], [39, 26], [40, 39], [42, 11], [42, 15], [42, 5], [42, 41], [42, 12], [42, 16], [43, 12], [43, 16], [43, 11], [43, 15], [43, 42], [43, 5], [44, 43], [45, 3], [46, 45], [46, 44], [47, 46], [49, 12], [49, 16], [49, 11], [49, 48], [49, 52], [49, 15], [49, 5], [50, 3], [51, 50], [51, 12], [51, 16], [51, 11], [51, 15], [51, 52], [51, 5], [52, 51], [52, 49], [54, 44], [54, 66], [55, 5], [55, 54], [55, 12], [55, 16], [55, 11], [55, 15], [56, 3], [56, 55], [57, 56], [58, 3], [59, 12], [59, 16], [59, 11], [59, 58], [59, 61], [59, 15], [59, 5], [60, 44], [60, 66], [61, 60], [61, 59], [64, 66], [64, 44], [65, 64], [65, 12], [65, 16], [65, 11], [65, 15], [65, 5], [66, 65], [67, 44], [67, 66], [68, 67], [70, 26], [70, 81], [71, 15], [71, 5], [71, 12], [71, 16], [71, 11], [71, 70], [72, 71], [72, 3], [73, 72], [74, 3], [75, 12], [75, 16], [75, 11], [75, 15], [75, 5], [75, 74], [75, 77], [76, 26], [76, 81], [77, 76], [77, 75], [79, 26], [79, 81], [80, 79], [80, 5], [80, 12], [80, 16], [80, 11], [80, 15], [81, 80], [84, 97], [84, 83], [84, 101], [84, 87], [84, 91], [84, 77], [84, 12], [84, 16], [84, 11], [84, 15], [84, 99], [84, 52], [84, 61], [84, 37], [84, 5], [85, 84], [85, 52], [85, 61], [85, 37], [85, 5], [85, 97], [85, 101], [85, 87], [85, 91], [85, 77], [85, 12], [85, 16], [85, 11], [85, 15], [85, 99], [86, 3], [87, 86], [87, 85], [89, 88], [89, 87], [90, 3], [91, 90], [91, 89], [92, 3], [93, 92], [94, 93], [96, 3], [97, 96], [98, 3], [99, 98], [100, 3], [101, 100], [102, 3], [103, 102], [103, 97], [103, 101], [103, 87], [103, 91], [103, 77], [103, 12], [103, 16], [103, 11], [103, 15], [103, 99], [103, 52], [103, 61], [103, 37], [103, 5], [104, 103], [105, 3], [106, 105], [106, 104], [107, 106], [109, 15], [109, 37], [109, 5], [109, 97], [109, 101], [109, 87], [109, 91], [109, 77], [109, 12], [109, 16], [109, 11], [109, 99], [109, 108], [109, 52], [109, 61], [110, 11], [110, 15], [110, 109], [110, 5], [110, 99], [110, 52], [110, 61], [110, 37], [110, 12], [110, 97], [110, 101], [110, 87], [110, 91], [110, 77], [110, 16], [111, 110], [111, 107], [112, 111], [113, 107], [114, 97], [114, 101], [114, 87], [114, 91], [114, 77], [114, 12], [114, 16], [114, 11], [114, 15], [114, 113], [114, 5], [114, 99], [114, 52], [114, 61], [114, 37], [115, 114], [116, 115], [117, 3], [118, 117], [125, 97], [125, 124], [125, 101], [125, 87], [125, 91], [125, 77], [125, 12], [125, 16], [125, 11], [125, 15], [125, 99], [125, 52], [125, 61], [125, 37], [125, 5], [126, 52], [126, 61], [126, 37], [126, 125], [126, 12], [126, 97], [126, 101], [126, 87], [126, 91], [126, 77], [126, 16], [126, 11], [126, 15], [126, 5], [126, 99], [127, 126], [128, 127], [129, 128], [129, 149], [129, 3], [130, 129], [131, 141], [131, 127], [132, 16], [132, 11], [132, 15], [132, 131], [132, 99], [132, 52], [132, 61], [132, 37], [132, 5], [132, 97], [132, 101], [132, 87], [132, 91], [132, 77], [132, 12], [133, 132], [134, 141], [134, 127], [135, 134], [135, 133], [136, 135], [137, 136], [138, 137], [138, 149], [138, 3], [139, 138], [140, 136], [141, 140], [144, 141], [144, 127], [145, 5], [145, 99], [145, 52], [145, 61], [145, 37], [145, 144], [145, 97], [145, 101], [145, 87], [145, 91], [145, 77], [145, 12], [145, 16], [145, 11], [145, 15], [146, 145], [147, 146], [148, 141], [148, 127], [149, 148], [150, 149], [151, 150], [158, 128], [158, 146]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/854cdf5444b2b00c87d26e7d13f4f78203371e000073005c07d41bd72c04e6ea_854cdf5444b2b00c87d26e7d13f4f78203371e000073005c07d41bd72c04e6ea.jsonl.gz", "strip_func_name": "sub_44CC0D", "query": "\n\n\nunsigned __int64 __fastcall sub_44CC0D(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 v6; // rdx\n__int64 v7; // rdx\nunsigned __int64 result; // rax\n_QWORD v9[5]; // [rsp+0h] [rbp-50h] BYREF\n__int64 v10; // [rsp+28h] [rbp-28h]\nunsigned __int64 v11; // [rsp+38h] [rbp-18h]\nint v12; // [rsp+44h] [rbp-Ch]\nunsigned __int64 v13; // [rsp+48h] [rbp-8h]\n\nv10 = a1;\n*(_WORD *)(a1 + 58) = 0;\nv6 = *(_QWORD *)(v10 + 32);\nv9[0] = *(_QWORD *)(v10 + 24);\nv9[1] = v6;\nv7 = *(_QWORD *)(v10 + 48);\nv9[2] = *(_QWORD *)(v10 + 40);\nv9[3] = v7;\nv12 = sub_44CAF8(a1, (__int64)v9, v7, v10, a5, a6, v9[0]);\nv13 = *(_QWORD *)(*((_QWORD *)shmaddr + 80) + 8 * (v12 + 4102LL) + 8);\nif ( v13 == v10 )\n{\n*(_QWORD *)(*((_QWORD *)shmaddr + 80) + 8 * (v12 + 4102LL) + 8) = *(_QWORD *)v10;\n}\nelse\n{\nwhile ( v13 )\n{\nif ( v10 == *(_QWORD *)v13 )\n{\n*(_QWORD *)v13 = *(_QWORD *)v10;\ngoto LABEL_14;\n}\nv13 = *(_QWORD *)v13;\n}\nv13 = *(_QWORD *)(*((_QWORD *)shmaddr + 80) + 41008LL);\nif ( v10 == v13 )\n{\n*(_QWORD *)(*((_QWORD *)shmaddr + 80) + 41008LL) = *(_QWORD *)v10;\n}\nelse\n{\nwhile ( v13 )\n{\nif ( v10 == *(_QWORD *)v13 )\n{\n*(_QWORD *)v13 = *(_QWORD *)v10;\nbreak;\n}\nv13 = *(_QWORD *)v13;\n}\n}\n}\nLABEL_14:\n*(_QWORD *)v10 = *(_QWORD *)(*((_QWORD *)shmaddr + 80) + 41008LL);\n*(_QWORD *)(*((_QWORD *)shmaddr + 80) + 41008LL) = v10;\nsub_449656((_QWORD *)(v10 + 24));\n*(_BYTE *)(v10 + 56) = 0;\n*(_BYTE *)(v10 + 57) = 0;\n*(_QWORD *)(v10 + 16) = 0LL;\nwhile ( 1 )\n{\nv13 = *(int *)(v10 + 8) + v10;\nif ( v13 >= *(_QWORD *)(*((_QWORD *)shmaddr + 80) + 41024LL) || *(_WORD *)(v13 + 58) )\nbreak;\nsub_44CB6F(v10);\n}\nwhile ( 1 )\n{\nv13 = *(_QWORD *)(*((_QWORD *)shmaddr + 80) + 41016LL);\nresult = v13;\nif ( v13 == v10 )\nbreak;\nwhile ( 1 )\n{\nv11 = *(int *)(v13 + 8) + v13;\nif ( v11 == v10 )\nbreak;\nv13 = v11;\n}\nresult = *(unsigned __int16 *)(v13 + 58);\nif ( (_WORD)result )\nbreak;\nv10 = v13;\nsub_44CB6F(v13);\n}\nreturn result;\n}\n\n\n\nQ:[a1,v10,v12,v13,sub_44CC0D,sub_44CAF8,sub_449656,sub_44CB6F,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pointer', 'v10': 'pointera', 'v12': 'hash', 'v13': 'ptr', 'sub_44CC0D': 'Routine_Free', 'sub_44CAF8': 'Routine_Hash', 'sub_449656': '_X_Clear', 'sub_44CB6F': 'Routine_Combine'}"} |
|
transpose_matrix | 543bd907cc4ed343777c4880112630351288b4273bfd145dacfdcc0f5544a0b2 | pjreddie | darknet | NA | void transpose_matrix(float *a, int rows, int cols)
{
float *transpose = calloc(rows*cols, sizeof(float));
int x, y;
for(x = 0; x < rows; ++x){
for(y = 0; y < cols; ++y){
transpose[y*rows + x] = a[x*cols + y];
}
}
memcpy(a, transpose, rows*cols*sizeof(float));
free(transpose);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_461A03", "function_addr": 4594179, "binary_name": "543bd907cc4ed343777c4880112630351288b4273bfd145dacfdcc0f5544a0b2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+dest], rdi"], [4, "mov [rbp+var_1C], esi"], [5, "mov [rbp+var_20], edx"], [6, "mov eax, [rbp+var_1C]"], [7, "imul eax, [rbp+var_20]"], [8, "cdqe"], [9, "mov esi, 4"], [10, "mov rdi, rax"], [11, "call _calloc"], [12, "mov [rbp+src], rax"], [13, "mov [rbp+var_4], 0"], [14, "jmp short loc_461A97"], [15, "mov [rbp+var_8], 0"], [16, "jmp short loc_461A8B"], [17, "mov eax, [rbp+var_4]"], [18, "imul eax, [rbp+var_20]"], [19, "mov edx, eax"], [20, "mov eax, [rbp+var_8]"], [21, "add eax, edx"], [22, "cdqe"], [23, "lea rdx, ds:0[rax*4]"], [24, "mov rax, [rbp+dest]"], [25, "add rdx, rax"], [26, "mov eax, [rbp+var_8]"], [27, "imul eax, [rbp+var_1C]"], [28, "mov ecx, eax"], [29, "mov eax, [rbp+var_4]"], [30, "add eax, ecx"], [31, "cdqe"], [32, "lea rcx, ds:0[rax*4]"], [33, "mov rax, [rbp+src]"], [34, "add rax, rcx"], [35, "movss xmm0, dword ptr [rdx]"], [36, "movss dword ptr [rax], xmm0"], [37, "add [rbp+var_8], 1"], [38, "mov eax, [rbp+var_8]"], [39, "cmp eax, [rbp+var_20]"], [40, "jl short loc_461A41"], [41, "add [rbp+var_4], 1"], [42, "mov eax, [rbp+var_4]"], [43, "cmp eax, [rbp+var_1C]"], [44, "jl short loc_461A38"], [45, "mov eax, [rbp+var_1C]"], [46, "imul eax, [rbp+var_20]"], [47, "cdqe"], [48, "lea rdx, ds:0[rax*4]"], [49, "mov rcx, [rbp+src]"], [50, "mov rax, [rbp+dest]"], [51, "mov rsi, rcx"], [52, "mov rdi, rax"], [53, "call _memcpy"], [54, "mov rax, [rbp+src]"], [55, "mov rdi, rax"], [56, "call _free"], [57, "nop"], [58, "leave"], [59, "retn"]], "data_dep": [[6, 4], [7, 6], [7, 5], [10, 7], [12, 11], [17, 41], [17, 13], [18, 17], [18, 5], [19, 18], [20, 37], [20, 15], [21, 19], [21, 20], [23, 19], [24, 3], [25, 23], [25, 24], [26, 37], [26, 15], [27, 4], [27, 26], [28, 27], [29, 41], [29, 13], [30, 29], [30, 28], [32, 28], [33, 12], [34, 33], [34, 32], [35, 36], [35, 25], [36, 34], [36, 35], [37, 15], [37, 37], [38, 37], [38, 15], [39, 5], [39, 38], [40, 39], [41, 41], [41, 13], [42, 41], [42, 13], [43, 42], [43, 4], [44, 43], [45, 4], [46, 45], [46, 5], [48, 25], [49, 12], [50, 3], [51, 49], [52, 50], [54, 12], [55, 54], [59, 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/543bd907cc4ed343777c4880112630351288b4273bfd145dacfdcc0f5544a0b2_543bd907cc4ed343777c4880112630351288b4273bfd145dacfdcc0f5544a0b2.jsonl.gz", "strip_func_name": "sub_461A03", "query": "\n\n\nvoid __fastcall sub_461A03(_DWORD *a1, int a2, int a3)\n{\n_DWORD *src; // [rsp+10h] [rbp-10h]\nint j; // [rsp+18h] [rbp-8h]\nint i; // [rsp+1Ch] [rbp-4h]\n\nsrc = calloc(a3 * a2, 4uLL);\nfor ( i = 0; i < a2; ++i )\n{\nfor ( j = 0; j < a3; ++j )\nsrc[a2 * j + i] = a1[a3 * i + j];\n}\nmemcpy(a1, src, 4LL * a3 * a2);\nfree(src);\n}\n\n\n\nQ:[a3,a1,a2,src,j,i,sub_461A03,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'cols', 'a1': 'a', 'a2': 'rows', 'src': 'transpose', 'j': 'y', 'i': 'x', 'sub_461A03': 'transpose_matrix'}"} |
|
write_file | 790ec58988e1c06548c36add3de211cc8c26664ba13d17f4d41568824c13cefb | bigtreetech | CB1-Kernel | NA | static bool write_file(char *filename, char *fmt, ...)
{
va_list ap;
bool ret;
va_start(ap, fmt);
ret = vmaybe_write_file(false, filename, fmt, ap);
va_end(ap);
return ret;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40156F", "function_addr": 4199791, "binary_name": "790ec58988e1c06548c36add3de211cc8c26664ba13d17f4d41568824c13cefb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0E0h"], [3, "mov [rbp+var_D8], rdi"], [4, "mov [rbp+var_E0], rsi"], [5, "mov [rbp+var_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_4015C8"], [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 [rbp+var_D0], 10h"], [20, "mov [rbp+var_CC], 30h "], [21, "lea rax, [rbp+arg_0]"], [22, "mov [rbp+var_C8], rax"], [23, "lea rax, [rbp+var_B0]"], [24, "mov [rbp+var_C0], rax"], [25, "lea rcx, [rbp+var_D0]"], [26, "mov rdx, [rbp+var_E0]"], [27, "mov rax, [rbp+var_D8]"], [28, "mov rsi, rax"], [29, "mov edi, 0"], [30, "call sub_4013C2"], [31, "mov [rbp+var_B1], al"], [32, "movzx eax, [rbp+var_B1]"], [33, "leave"], [34, "retn"]], "data_dep": [[10, 9], [21, 9], [22, 21], [23, 21], [24, 23], [25, 19], [26, 4], [27, 3], [28, 27], [31, 30], [32, 31], [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/790ec58988e1c06548c36add3de211cc8c26664ba13d17f4d41568824c13cefb_790ec58988e1c06548c36add3de211cc8c26664ba13d17f4d41568824c13cefb.jsonl.gz", "strip_func_name": "sub_40156F", "query": "\n\n\n_BOOL8 sub_40156F(const char *a1, const char *a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, ...)\n{\ngcc_va_list va; // [rsp+10h] [rbp-D0h] BYREF\n__int64 v8; // [rsp+40h] [rbp-A0h]\n__int64 v9; // [rsp+48h] [rbp-98h]\n__int64 v10; // [rsp+50h] [rbp-90h]\n__int64 v11; // [rsp+58h] [rbp-88h]\n\nva_start(va, a6);\nv8 = a3;\nv9 = a4;\nv10 = a5;\nv11 = a6;\nva[0].gp_offset = 16;\nreturn sub_4013C2(0, a1, a2, va);\n}\n\n\n\nQ:[a1,a2,va,sub_40156F,sub_4013C2,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'filename', 'a2': 'fmt', 'va': 'ap', 'sub_40156F': 'write_file', 'sub_4013C2': 'vmaybe_write_file'}"} |
|
send_gatt_read_client_characteristic_configuration_request | c0fe0b1d115c9a9d40b2c9859f7dfd1ea6098b73116e2548a49a45e30fbdd252 | bluekitchen | btstack | NA | static void send_gatt_read_client_characteristic_configuration_request(gatt_client_t * gatt_client){
att_read_by_type_or_group_request_for_uuid16(gatt_client, ATT_READ_BY_TYPE_REQUEST,
GATT_CLIENT_CHARACTERISTICS_CONFIGURATION,
gatt_client->start_group_handle, gatt_client->end_group_handle);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_425A73", "function_addr": 4348531, "binary_name": "c0fe0b1d115c9a9d40b2c9859f7dfd1ea6098b73116e2548a49a45e30fbdd252.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "movzx eax, word ptr [rax+4Ch]"], [6, "movzx ecx, ax"], [7, "mov rax, [rbp+var_8]"], [8, "movzx eax, word ptr [rax+4Ah]"], [9, "movzx edx, ax"], [10, "mov rax, [rbp+var_8]"], [11, "mov r8d, ecx"], [12, "mov ecx, edx"], [13, "mov edx, 2902h"], [14, "mov esi, 8"], [15, "mov rdi, rax"], [16, "call sub_425159"], [17, "nop"], [18, "leave"], [19, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 3], [8, 7], [9, 8], [10, 3], [11, 6], [12, 9], [15, 10], [19, 16]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c0fe0b1d115c9a9d40b2c9859f7dfd1ea6098b73116e2548a49a45e30fbdd252_c0fe0b1d115c9a9d40b2c9859f7dfd1ea6098b73116e2548a49a45e30fbdd252.jsonl.gz", "strip_func_name": "sub_425A73", "query": "\n\n\n__int64 __fastcall sub_425A73(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, int a6)\n{\nreturn sub_425159(a1, 8LL, 10498LL, *(_WORD *)(a1 + 74), *(unsigned __int16 *)(a1 + 76), a6);\n}\n\n\n\nQ:[a1,sub_425A73,sub_425159,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'gatt_client', 'sub_425A73': 'send_gatt_read_client_characteristic_configuration_request', 'sub_425159': 'att_read_by_type_or_group_request_for_uuid16'}"} |
|
dns_callback | 0d02b74aea201d48cc3d38bf7d5dfeacbcaff9102bd8e2dbdd0b1813b49b64a0 | AonCyberLabs | D-Modem | NA | static void dns_callback(void *user_data,
pj_status_t status,
pj_dns_parsed_packet *pkt)
{
struct common *common = (struct common*) user_data;
pj_dns_srv_async_query *query_job;
struct srv_target *srv = NULL;
unsigned i;
if (common->type == PJ_DNS_TYPE_SRV) {
query_job = (pj_dns_srv_async_query*) common;
srv = NULL;
} else if (common->type == PJ_DNS_TYPE_A) {
srv = (struct srv_target*) common;
query_job = srv->parent;
} else if (common->type == PJ_DNS_TYPE_AAAA) {
srv = (struct srv_target*)((pj_int8_t*)common-sizeof(struct common));
query_job = srv->parent;
} else {
pj_assert(!"Unexpected user data!");
return;
}
/* Proceed to next stage */
if (query_job->dns_state == PJ_DNS_TYPE_SRV) {
/* We are getting SRV response */
/* Clear the outstanding job */
query_job->q_srv = NULL;
if (status == PJ_SUCCESS) {
if (PJ_DNS_GET_TC(pkt->hdr.flags)) {
/* Got truncated answer, the standard recommends to follow up
* the query using TCP. Since we currently don't support it,
* just return error.
*/
PJ_LOG(4,(query_job->objname,
"Discard truncated DNS SRV response for %.*s",
(int)query_job->full_name.slen,
query_job->full_name.ptr));
status = PJ_EIGNORED;
query_job->last_error = status;
goto on_error;
} else if (pkt->hdr.anscount != 0) {
/* Got SRV response, build server entry. If A records are
* available in additional records section of the DNS response,
* save them too.
*/
build_server_entries(query_job, pkt);
}
} else {
char errmsg[PJ_ERR_MSG_SIZE];
/* Update query_job last error */
query_job->last_error = status;
pj_strerror(status, errmsg, sizeof(errmsg));
PJ_LOG(4,(query_job->objname,
"DNS SRV resolution failed for %.*s: %s",
(int)query_job->full_name.slen,
query_job->full_name.ptr,
errmsg));
/* Trigger error when fallback is disabled */
if ((query_job->option &
(PJ_DNS_SRV_FALLBACK_A | PJ_DNS_SRV_FALLBACK_AAAA)) == 0)
{
goto on_error;
}
}
/* If we can't build SRV record, assume the original target is
* an A record and resolve with DNS A resolution.
*/
if (query_job->srv_cnt == 0 && query_job->domain_part.slen > 0) {
unsigned new_option = 0;
/* Looks like we aren't getting any SRV responses.
* Resolve the original target as A record by creating a
* single "dummy" srv record and start the hostname resolution.
*/
PJ_LOG(4, (query_job->objname,
"DNS SRV resolution failed for %.*s, trying "
"resolving A/AAAA record for %.*s",
(int)query_job->full_name.slen,
query_job->full_name.ptr,
(int)query_job->domain_part.slen,
query_job->domain_part.ptr));
/* Create a "dummy" srv record using the original target */
i = query_job->srv_cnt++;
pj_bzero(&query_job->srv[i], sizeof(query_job->srv[i]));
query_job->srv[i].target_name = query_job->domain_part;
query_job->srv[i].priority = 0;
query_job->srv[i].weight = 0;
query_job->srv[i].port = query_job->def_port;
/* Update query_job resolution option based on fallback option */
if (query_job->option & PJ_DNS_SRV_FALLBACK_AAAA)
new_option |= (PJ_DNS_SRV_RESOLVE_AAAA |
PJ_DNS_SRV_RESOLVE_AAAA_ONLY);
if (query_job->option & PJ_DNS_SRV_FALLBACK_A)
new_option &= (~PJ_DNS_SRV_RESOLVE_AAAA_ONLY);
query_job->option = new_option;
}
/* Resolve server hostnames (DNS A/AAAA record) for hosts which
* don't have A/AAAA record yet.
*/
if (query_job->host_resolved != query_job->srv_cnt) {
status = resolve_hostnames(query_job);
if (status != PJ_SUCCESS)
goto on_error;
/* Must return now. Callback may have been called and query_job
* may have been destroyed.
*/
return;
}
} else if (query_job->dns_state == PJ_DNS_TYPE_A) {
pj_bool_t is_type_a, srv_completed;
pj_dns_addr_record rec;
/* Avoid warning: potentially uninitialized local variable 'rec' */
rec.alias.slen = 0;
rec.addr_count = 0;
/* Clear outstanding job */
if (common->type == PJ_DNS_TYPE_A) {
srv_completed = (srv->q_aaaa == NULL);
srv->q_a = NULL;
} else if (common->type == PJ_DNS_TYPE_AAAA) {
srv_completed = (srv->q_a == NULL);
srv->q_aaaa = NULL;
} else {
pj_assert(!"Unexpected job type");
query_job->last_error = status = PJ_EINVALIDOP;
goto on_error;
}
is_type_a = (common->type == PJ_DNS_TYPE_A);
/* Parse response */
if (status==PJ_SUCCESS && pkt->hdr.anscount != 0) {
status = pj_dns_parse_addr_response(pkt, &rec);
if (status!=PJ_SUCCESS) {
PJ_PERROR(4,(query_job->objname, status,
"DNS %s record parse error for '%.*s'.",
(is_type_a ? "A" : "AAAA"),
(int)query_job->domain_part.slen,
query_job->domain_part.ptr));
}
}
/* Check that we really have answer */
if (status==PJ_SUCCESS && pkt->hdr.anscount != 0) {
char addr[PJ_INET6_ADDRSTRLEN];
pj_assert(rec.addr_count != 0);
/* Update CNAME alias, if present. */
if (srv->cname.slen==0 && rec.alias.slen) {
pj_assert(rec.alias.slen <= (int)sizeof(srv->cname_buf));
srv->cname.ptr = srv->cname_buf;
pj_strcpy(&srv->cname, &rec.alias);
//} else {
//srv->cname.slen = 0;
}
/* Update IP address of the corresponding hostname or CNAME */
for (i=0; i<rec.addr_count && srv->addr_cnt<ADDR_MAX_COUNT; ++i)
{
pj_bool_t added = PJ_FALSE;
if (is_type_a && rec.addr[i].af == pj_AF_INET()) {
pj_sockaddr_init(pj_AF_INET(), &srv->addr[srv->addr_cnt],
NULL, srv->port);
srv->addr[srv->addr_cnt].ipv4.sin_addr =
rec.addr[i].ip.v4;
added = PJ_TRUE;
} else if (!is_type_a && rec.addr[i].af == pj_AF_INET6()) {
pj_sockaddr_init(pj_AF_INET6(), &srv->addr[srv->addr_cnt],
NULL, srv->port);
srv->addr[srv->addr_cnt].ipv6.sin6_addr =
rec.addr[i].ip.v6;
added = PJ_TRUE;
} else {
/* Mismatched address family, e.g: getting IPv6 address in
* DNS A query resolution.
*/
PJ_LOG(4,(query_job->objname,
"Bad address family in DNS %s query for %.*s",
(is_type_a? "A" : "AAAA"),
(int)srv->target_name.slen,
srv->target_name.ptr));
}
if (added) {
PJ_LOG(5,(query_job->objname,
"DNS %s for %.*s: %s",
(is_type_a? "A" : "AAAA"),
(int)srv->target_name.slen,
srv->target_name.ptr,
pj_sockaddr_print(&srv->addr[srv->addr_cnt],
addr, sizeof(addr), 2)));
++srv->addr_cnt;
}
}
} else if (status != PJ_SUCCESS) {
/* Update last error */
query_job->last_error = status;
/* Log error */
PJ_PERROR(4,(query_job->objname, status,
"DNS %s record resolution failed",
(is_type_a? "A" : "AAAA")));
}
/* Increment host resolved count when both DNS A and AAAA record
* queries for this server are completed.
*/
if (srv_completed)
++query_job->host_resolved;
} else {
pj_assert(!"Unexpected state!");
query_job->last_error = status = PJ_EINVALIDOP;
goto on_error;
}
/* Check if all hosts have been resolved */
if (query_job->host_resolved == query_job->srv_cnt) {
/* Got all answers, build server addresses */
pj_dns_srv_record srv_rec;
srv_rec.count = 0;
for (i=0; i<query_job->srv_cnt; ++i) {
unsigned j;
struct srv_target *srv2 = &query_job->srv[i];
pj_dns_addr_record *s = &srv_rec.entry[srv_rec.count].server;
srv_rec.entry[srv_rec.count].priority = srv2->priority;
srv_rec.entry[srv_rec.count].weight = srv2->weight;
srv_rec.entry[srv_rec.count].port = (pj_uint16_t)srv2->port ;
srv_rec.entry[srv_rec.count].server.name = srv2->target_name;
srv_rec.entry[srv_rec.count].server.alias = srv2->cname;
srv_rec.entry[srv_rec.count].server.addr_count = 0;
pj_assert(srv2->addr_cnt <= PJ_DNS_MAX_IP_IN_A_REC);
for (j=0; j<srv2->addr_cnt; ++j) {
s->addr[j].af = srv2->addr[j].addr.sa_family;
if (s->addr[j].af == pj_AF_INET())
s->addr[j].ip.v4 = srv2->addr[j].ipv4.sin_addr;
else
s->addr[j].ip.v6 = srv2->addr[j].ipv6.sin6_addr;
++s->addr_count;
}
if (srv2->addr_cnt > 0) {
++srv_rec.count;
if (srv_rec.count == PJ_DNS_SRV_MAX_ADDR)
break;
}
}
PJ_LOG(5,(query_job->objname,
"Server resolution complete, %d server entry(s) found",
srv_rec.count));
if (srv_rec.count > 0)
status = PJ_SUCCESS;
else {
status = query_job->last_error;
if (status == PJ_SUCCESS)
status = PJLIB_UTIL_EDNSNOANSWERREC;
}
/* Call the callback */
(*query_job->cb)(query_job->token, status, &srv_rec);
}
return;
on_error:
/* Check for failure */
if (status != PJ_SUCCESS) {
PJ_PERROR(4,(query_job->objname, status,
"DNS %s record resolution error for '%.*s'.",
pj_dns_get_type_name(query_job->dns_state),
(int)query_job->domain_part.slen,
query_job->domain_part.ptr));
/* Cancel any pending query */
pj_dns_srv_cancel_query(query_job, PJ_FALSE);
(*query_job->cb)(query_job->token, status, NULL);
return;
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_456F00", "function_addr": 4550400, "binary_name": "0d02b74aea201d48cc3d38bf7d5dfeacbcaff9102bd8e2dbdd0b1813b49b64a0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r12"], [3, "push rbx"], [4, "sub rsp, 0B60h"], [5, "mov [rbp+var_B58], rdi"], [6, "mov [rbp+var_B5C], esi"], [7, "mov [rbp+var_B68], rdx"], [8, "mov rax, [rbp+var_B58]"], [9, "mov [rbp+var_40], rax"], [10, "mov [rbp+var_20], 0"], [11, "mov rax, [rbp+var_40]"], [12, "mov eax, [rax]"], [13, "cmp eax, 21h "], [14, "jnz short loc_456F52"], [15, "mov rax, [rbp+var_40]"], [16, "mov [rbp+var_18], rax"], [17, "mov [rbp+var_20], 0"], [18, "jmp short loc_456FB1"], [19, "mov rax, [rbp+var_40]"], [20, "mov eax, [rax]"], [21, "cmp eax, 1"], [22, "jnz short loc_456F73"], [23, "mov rax, [rbp+var_40]"], [24, "mov [rbp+var_20], rax"], [25, "mov rax, [rbp+var_20]"], [26, "mov rax, [rax+8]"], [27, "mov [rbp+var_18], rax"], [28, "jmp short loc_456FB1"], [29, "mov rax, [rbp+var_40]"], [30, "mov eax, [rax]"], [31, "cmp eax, 1Ch"], [32, "jnz short loc_456F98"], [33, "mov rax, [rbp+var_40]"], [34, "sub rax, 4"], [35, "mov [rbp+var_20], rax"], [36, "mov rax, [rbp+var_20]"], [37, "mov rax, [rax+8]"], [38, "mov [rbp+var_18], rax"], [39, "jmp short loc_456FB1"], [40, "mov ecx, offset aDnsCallback"], [41, "mov edx, 240h"], [42, "mov esi, offset aSrcPjlibUtilSr"], [43, "mov edi, offset aUnexpectedUser"], [44, "call ___assert_fail"], [45, "mov rax, [rbp+var_18]"], [46, "mov eax, [rax+10h]"], [47, "cmp eax, 21h "], [48, "jnz loc_45729E"], [49, "mov rax, [rbp+var_18]"], [50, "mov qword ptr [rax+28h], 0"], [51, "cmp [rbp+var_B5C], 0"], [52, "jnz loc_457077"], [53, "mov rax, [rbp+var_B68]"], [54, "movzx eax, word ptr [rax+2]"], [55, "movzx eax, ax"], [56, "and eax, 200h"], [57, "test eax, eax"], [58, "jz short loc_457048"], [59, "call sub_4848D6"], [60, "cmp eax, 3"], [61, "jle short loc_45702C"], [62, "mov rax, [rbp+var_18]"], [63, "mov rdx, [rax+40h]"], [64, "mov rax, [rbp+var_18]"], [65, "mov rax, [rax+48h]"], [66, "mov esi, eax"], [67, "mov rax, [rbp+var_18]"], [68, "mov rax, [rax+8]"], [69, "mov rcx, rdx"], [70, "mov edx, esi"], [71, "mov esi, offset aDiscardTruncat"], [72, "mov rdi, rax"], [73, "mov eax, 0"], [74, "call sub_48524A"], [75, "mov [rbp+var_B5C], 11184h"], [76, "mov rax, [rbp+var_18]"], [77, "mov edx, [rbp+var_B5C]"], [78, "mov [rax+38h], edx"], [79, "jmp loc_457BCA"], [80, "mov rax, [rbp+var_B68]"], [81, "movzx eax, word ptr [rax+6]"], [82, "test ax, ax"], [83, "jz loc_4570F7"], [84, "mov rdx, [rbp+var_B68]"], [85, "mov rax, [rbp+var_18]"], [86, "mov rsi, rdx"], [87, "mov rdi, rax"], [88, "call sub_455DB0"], [89, "jmp loc_4570F7"], [90, "mov rax, [rbp+var_18]"], [91, "mov edx, [rbp+var_B5C]"], [92, "mov [rax+38h], edx"], [93, "lea rcx, [rbp+var_B20]"], [94, "mov eax, [rbp+var_B5C]"], [95, "mov edx, 50h "], [96, "mov rsi, rcx"], [97, "mov edi, eax"], [98, "call sub_481E70"], [99, "call sub_4848D6"], [100, "cmp eax, 3"], [101, "jle short loc_4570E5"], [102, "mov rax, [rbp+var_18]"], [103, "mov rdx, [rax+40h]"], [104, "mov rax, [rbp+var_18]"], [105, "mov rax, [rax+48h]"], [106, "mov esi, eax"], [107, "mov rax, [rbp+var_18]"], [108, "mov rax, [rax+8]"], [109, "lea rcx, [rbp+var_B20]"], [110, "mov r8, rcx"], [111, "mov rcx, rdx"], [112, "mov edx, esi"], [113, "mov esi, offset aDnsSrvResoluti"], [114, "mov rdi, rax"], [115, "mov eax, 0"], [116, "call sub_48524A"], [117, "mov rax, [rbp+var_18]"], [118, "mov eax, [rax+3Ch]"], [119, "and eax, 3"], [120, "test eax, eax"], [121, "jz loc_457BC9"], [122, "mov rax, [rbp+var_18]"], [123, "mov eax, [rax+64h]"], [124, "test eax, eax"], [125, "jnz loc_457261"], [126, "mov rax, [rbp+var_18]"], [127, "mov rax, [rax+58h]"], [128, "test rax, rax"], [129, "jle loc_457261"], [130, "mov [rbp+var_28], 0"], [131, "call sub_4848D6"], [132, "cmp eax, 3"], [133, "jle short loc_457171"], [134, "mov rax, [rbp+var_18]"], [135, "mov rcx, [rax+50h]"], [136, "mov rax, [rbp+var_18]"], [137, "mov rax, [rax+58h]"], [138, "mov edi, eax"], [139, "mov rax, [rbp+var_18]"], [140, "mov rdx, [rax+40h]"], [141, "mov rax, [rbp+var_18]"], [142, "mov rax, [rax+48h]"], [143, "mov esi, eax"], [144, "mov rax, [rbp+var_18]"], [145, "mov rax, [rax+8]"], [146, "mov r9, rcx"], [147, "mov r8d, edi"], [148, "mov rcx, rdx"], [149, "mov edx, esi"], [150, "mov esi, offset aDnsSrvResoluti_0"], [151, "mov rdi, rax"], [152, "mov eax, 0"], [153, "call sub_48524A"], [154, "mov rax, [rbp+var_18]"], [155, "mov eax, [rax+64h]"], [156, "lea ecx, [rax+1]"], [157, "mov rdx, [rbp+var_18]"], [158, "mov [rdx+64h], ecx"], [159, "mov [rbp+var_24], eax"], [160, "mov eax, [rbp+var_24]"], [161, "imul rax, 232h"], [162, "lea rdx, [rax+60h]"], [163, "mov rax, [rbp+var_18]"], [164, "add rax, rdx"], [165, "add rax, 8"], [166, "mov esi, 232h"], [167, "mov rdi, rax"], [168, "call sub_455937"], [169, "mov rdx, [rbp+var_18]"], [170, "mov eax, [rbp+var_24]"], [171, "imul rax, 232h"], [172, "add rax, rdx"], [173, "lea rcx, [rax+70h]"], [174, "mov rax, [rbp+var_18]"], [175, "mov rdx, [rax+58h]"], [176, "mov rax, [rax+50h]"], [177, "mov [rcx+8], rax"], [178, "mov [rcx+10h], rdx"], [179, "mov rdx, [rbp+var_18]"], [180, "mov eax, [rbp+var_24]"], [181, "imul rax, 232h"], [182, "add rax, rdx"], [183, "add rax, 1A0h"], [184, "mov dword ptr [rax+0Ah], 0"], [185, "mov rdx, [rbp+var_18]"], [186, "mov eax, [rbp+var_24]"], [187, "imul rax, 232h"], [188, "add rax, rdx"], [189, "add rax, 1A0h"], [190, "mov dword ptr [rax+0Eh], 0"], [191, "mov rax, [rbp+var_18]"], [192, "movzx eax, word ptr [rax+60h]"], [193, "mov rcx, [rbp+var_18]"], [194, "mov edx, [rbp+var_24]"], [195, "imul rdx, 232h"], [196, "add rdx, rcx"], [197, "add rdx, 1A8h"], [198, "mov [rdx], ax"], [199, "mov rax, [rbp+var_18]"], [200, "mov eax, [rax+3Ch]"], [201, "and eax, 2"], [202, "test eax, eax"], [203, "jz short loc_457245"], [204, "or [rbp+var_28], 0Ch"], [205, "mov rax, [rbp+var_18]"], [206, "mov eax, [rax+3Ch]"], [207, "and eax, 1"], [208, "test eax, eax"], [209, "jz short loc_457257"], [210, "and [rbp+var_28], 0FFFFFFF7h"], [211, "mov rax, [rbp+var_18]"], [212, "mov edx, [rbp+var_28]"], [213, "mov [rax+3Ch], edx"], [214, "mov rax, [rbp+var_18]"], [215, "mov edx, [rax+11F8h]"], [216, "mov rax, [rbp+var_18]"], [217, "mov eax, [rax+64h]"], [218, "cmp edx, eax"], [219, "jz loc_457832"], [220, "mov rax, [rbp+var_18]"], [221, "mov rdi, rax"], [222, "call sub_456D09"], [223, "mov [rbp+var_B5C], eax"], [224, "cmp [rbp+var_B5C], 0"], [225, "jz loc_457C5A"], [226, "jmp loc_457BCA"], [227, "mov rax, [rbp+var_18]"], [228, "mov eax, [rax+10h]"], [229, "cmp eax, 1"], [230, "jnz loc_457819"], [231, "mov [rbp+var_B08], 0"], [232, "mov [rbp+var_B00], 0"], [233, "mov rax, [rbp+var_40]"], [234, "mov eax, [rax]"], [235, "cmp eax, 1"], [236, "jnz short loc_4572F0"], [237, "mov rax, [rbp+var_20]"], [238, "mov rax, [rax+28h]"], [239, "test rax, rax"], [240, "setz al"], [241, "movzx eax, al"], [242, "mov [rbp+var_2C], eax"], [243, "mov rax, [rbp+var_20]"], [244, "mov qword ptr [rax+20h], 0"], [245, "jmp short loc_457336"], [246, "mov rax, [rbp+var_40]"], [247, "mov eax, [rax]"], [248, "cmp eax, 1Ch"], [249, "jnz short loc_45731D"], [250, "mov rax, [rbp+var_20]"], [251, "mov rax, [rax+20h]"], [252, "test rax, rax"], [253, "setz al"], [254, "movzx eax, al"], [255, "mov [rbp+var_2C], eax"], [256, "mov rax, [rbp+var_20]"], [257, "mov qword ptr [rax+28h], 0"], [258, "jmp short loc_457336"], [259, "mov ecx, offset aDnsCallback"], [260, "mov edx, 2BAh"], [261, "mov esi, offset aSrcPjlibUtilSr"], [262, "mov edi, offset aUnexpectedJobT"], [263, "call ___assert_fail"], [264, "mov rax, [rbp+var_40]"], [265, "mov eax, [rax]"], [266, "cmp eax, 1"], [267, "setz al"], [268, "movzx eax, al"], [269, "mov [rbp+var_44], eax"], [270, "cmp [rbp+var_B5C], 0"], [271, "jnz loc_4573D7"], [272, "mov rax, [rbp+var_B68]"], [273, "movzx eax, word ptr [rax+6]"], [274, "test ax, ax"], [275, "jz short loc_4573D7"], [276, "lea rdx, [rbp+var_B20]"], [277, "mov rax, [rbp+var_B68]"], [278, "mov rsi, rdx"], [279, "mov rdi, rax"], [280, "call sub_4523F7"], [281, "mov [rbp+var_B5C], eax"], [282, "cmp [rbp+var_B5C], 0"], [283, "jz short loc_4573D7"], [284, "mov rax, [rbp+var_18]"], [285, "mov rdx, [rax+50h]"], [286, "mov rax, [rbp+var_18]"], [287, "mov rax, [rax+58h]"], [288, "mov edi, eax"], [289, "cmp [rbp+var_44], 0"], [290, "jz short loc_4573AC"], [291, "mov ecx, offset aA_1"], [292, "jmp short loc_4573B1"], [293, "mov ecx, offset aAaaa_0"], [294, "mov rax, [rbp+var_18]"], [295, "mov rax, [rax+8]"], [296, "mov esi, [rbp+var_B5C]"], [297, "mov r9, rdx"], [298, "mov r8d, edi"], [299, "mov edx, offset aDnsSRecordPars"], [300, "mov rdi, rax"], [301, "mov eax, 0"], [302, "call sub_482464"], [303, "cmp [rbp+var_B5C], 0"], [304, "jnz loc_4577AC"], [305, "mov rax, [rbp+var_B68]"], [306, "movzx eax, word ptr [rax+6]"], [307, "test ax, ax"], [308, "jz loc_4577AC"], [309, "mov eax, [rbp+var_B00]"], [310, "test eax, eax"], [311, "jnz short loc_45741B"], [312, "mov ecx, offset aDnsCallback"], [313, "mov edx, 2D1h"], [314, "mov esi, offset aSrcPjlibUtilSr"], [315, "mov edi, offset aRecAddrCount0"], [316, "call ___assert_fail"], [317, "mov rax, [rbp+var_20]"], [318, "mov rax, [rax+0B8h]"], [319, "test rax, rax"], [320, "jnz short loc_457495"], [321, "mov rax, [rbp+var_B08]"], [322, "test rax, rax"], [323, "jz short loc_457495"], [324, "mov rax, [rbp+var_B08]"], [325, "cmp rax, 80h"], [326, "jle short loc_45745F"], [327, "mov ecx, offset aDnsCallback"], [328, "mov edx, 2D5h"], [329, "mov esi, offset aSrcPjlibUtilSr"], [330, "mov edi, offset aRecAliasSlenIn"], [331, "call ___assert_fail"], [332, "mov rax, [rbp+var_20]"], [333, "lea rdx, [rax+0C0h]"], [334, "mov rax, [rbp+var_20]"], [335, "mov [rax+0B0h], rdx"], [336, "mov rax, [rbp+var_20]"], [337, "add rax, 0B0h"], [338, "lea rdx, [rbp+var_B20]"], [339, "add rdx, 10h"], [340, "mov rsi, rdx"], [341, "mov rdi, rax"], [342, "call sub_489677"], [343, "mov [rbp+var_24], 0"], [344, "jmp loc_45778C"], [345, "mov [rbp+var_30], 0"], [346, "cmp [rbp+var_44], 0"], [347, "jz loc_45758D"], [348, "mov edx, [rbp+var_24]"], [349, "mov rax, rdx"], [350, "shl rax, 2"], [351, "add rax, rdx"], [352, "shl rax, 2"], [353, "lea rbx, [rbp+var_10]"], [354, "add rax, rbx"], [355, "sub rax, 0AECh"], [356, "mov edx, [rax]"], [357, "movzx eax, cs:word_4A2184"], [358, "movzx eax, ax"], [359, "cmp edx, eax"], [360, "jnz loc_45758D"], [361, "mov rax, [rbp+var_20]"], [362, "movzx eax, word ptr [rax+140h]"], [363, "movzx edx, ax"], [364, "mov rax, [rbp+var_20]"], [365, "mov eax, [rax+14Eh]"], [366, "mov ecx, eax"], [367, "mov rax, rcx"], [368, "shl rax, 3"], [369, "sub rax, rcx"], [370, "shl rax, 2"], [371, "lea rcx, [rax+150h]"], [372, "mov rax, [rbp+var_20]"], [373, "add rax, rcx"], [374, "lea rsi, [rax+2]"], [375, "movzx eax, cs:word_4A2184"], [376, "movzx eax, ax"], [377, "mov ecx, edx"], [378, "mov edx, 0"], [379, "mov edi, eax"], [380, "call sub_48700F"], [381, "mov rax, [rbp+var_20]"], [382, "mov eax, [rax+14Eh]"], [383, "mov rdx, [rbp+var_20]"], [384, "mov ecx, eax"], [385, "mov rax, rcx"], [386, "shl rax, 3"], [387, "sub rax, rcx"], [388, "shl rax, 2"], [389, "add rax, rdx"], [390, "lea rcx, [rax+150h]"], [391, "mov edx, [rbp+var_24]"], [392, "mov rax, rdx"], [393, "shl rax, 2"], [394, "add rax, rdx"], [395, "shl rax, 2"], [396, "lea rbx, [rbp+var_10]"], [397, "add rax, rbx"], [398, "sub rax, 0AE8h"], [399, "mov eax, [rax]"], [400, "mov [rcx+6], eax"], [401, "mov [rbp+var_30], 1"], [402, "jmp loc_4576C8"], [403, "cmp [rbp+var_44], 0"], [404, "jnz loc_45767A"], [405, "mov edx, [rbp+var_24]"], [406, "mov rax, rdx"], [407, "shl rax, 2"], [408, "add rax, rdx"], [409, "shl rax, 2"], [410, "lea rbx, [rbp+var_10]"], [411, "add rax, rbx"], [412, "sub rax, 0AECh"], [413, "mov edx, [rax]"], [414, "movzx eax, cs:word_4A2186"], [415, "movzx eax, ax"], [416, "cmp edx, eax"], [417, "jnz loc_45767A"], [418, "mov rax, [rbp+var_20]"], [419, "movzx eax, word ptr [rax+140h]"], [420, "movzx edx, ax"], [421, "mov rax, [rbp+var_20]"], [422, "mov eax, [rax+14Eh]"], [423, "mov ecx, eax"], [424, "mov rax, rcx"], [425, "shl rax, 3"], [426, "sub rax, rcx"], [427, "shl rax, 2"], [428, "lea rcx, [rax+150h]"], [429, "mov rax, [rbp+var_20]"], [430, "add rax, rcx"], [431, "lea rsi, [rax+2]"], [432, "movzx eax, cs:word_4A2186"], [433, "movzx eax, ax"], [434, "mov ecx, edx"], [435, "mov edx, 0"], [436, "mov edi, eax"], [437, "call sub_48700F"], [438, "mov rax, [rbp+var_20]"], [439, "mov eax, [rax+14Eh]"], [440, "mov rdx, [rbp+var_20]"], [441, "mov ecx, eax"], [442, "mov rax, rcx"], [443, "shl rax, 3"], [444, "sub rax, rcx"], [445, "shl rax, 2"], [446, "add rax, rdx"], [447, "lea rcx, [rax+150h]"], [448, "mov edx, [rbp+var_24]"], [449, "mov rax, rdx"], [450, "shl rax, 2"], [451, "add rax, rdx"], [452, "shl rax, 2"], [453, "lea rbx, [rbp+var_10]"], [454, "add rax, rbx"], [455, "sub rax, 0AF0h"], [456, "mov rdx, [rax+10h]"], [457, "mov rax, [rax+8]"], [458, "mov [rcx+0Ah], rax"], [459, "mov [rcx+12h], rdx"], [460, "mov [rbp+var_30], 1"], [461, "jmp short loc_4576C8"], [462, "call sub_4848D6"], [463, "cmp eax, 3"], [464, "jle short loc_4576C8"], [465, "mov rax, [rbp+var_20]"], [466, "mov rdx, [rax+10h]"], [467, "mov rax, [rbp+var_20]"], [468, "mov rax, [rax+18h]"], [469, "mov ecx, eax"], [470, "cmp [rbp+var_44], 0"], [471, "jz short loc_4576A3"], [472, "mov esi, offset aA_1"], [473, "jmp short loc_4576A8"], [474, "mov esi, offset aAaaa_0"], [475, "mov rax, [rbp+var_18]"], [476, "mov rax, [rax+8]"], [477, "mov r8, rdx"], [478, "mov rdx, rsi"], [479, "mov esi, offset aBadAddressFami"], [480, "mov rdi, rax"], [481, "mov eax, 0"], [482, "call sub_48524A"], [483, "cmp [rbp+var_30], 0"], [484, "jz loc_457788"], [485, "call sub_4848D6"], [486, "cmp eax, 4"], [487, "jle loc_457771"], [488, "mov rax, [rbp+var_20]"], [489, "mov eax, [rax+14Eh]"], [490, "mov edx, eax"], [491, "mov rax, rdx"], [492, "shl rax, 3"], [493, "sub rax, rdx"], [494, "shl rax, 2"], [495, "lea rdx, [rax+150h]"], [496, "mov rax, [rbp+var_20]"], [497, "add rax, rdx"], [498, "lea rdi, [rax+2]"], [499, "lea rax, [rbp+var_B50]"], [500, "mov ecx, 2"], [501, "mov edx, 2Eh "], [502, "mov rsi, rax"], [503, "call sub_486B69"], [504, "mov rdx, rax"], [505, "mov rax, [rbp+var_20]"], [506, "mov rcx, [rax+10h]"], [507, "mov rax, [rbp+var_20]"], [508, "mov rax, [rax+18h]"], [509, "mov edi, eax"], [510, "cmp [rbp+var_44], 0"], [511, "jz short loc_457747"], [512, "mov esi, offset aA_1"], [513, "jmp short loc_45774C"], [514, "mov esi, offset aAaaa_0"], [515, "mov rax, [rbp+var_18]"], [516, "mov rax, [rax+8]"], [517, "mov r9, rdx"], [518, "mov r8, rcx"], [519, "mov ecx, edi"], [520, "mov rdx, rsi"], [521, "mov esi, offset aDnsSForSS"], [522, "mov rdi, rax"], [523, "mov eax, 0"], [524, "call sub_4852F5"], [525, "mov rax, [rbp+var_20]"], [526, "mov eax, [rax+14Eh]"], [527, "lea edx, [rax+1]"], [528, "mov rax, [rbp+var_20]"], [529, "mov [rax+14Eh], edx"], [530, "add [rbp+var_24], 1"], [531, "mov eax, [rbp+var_B00]"], [532, "cmp [rbp+var_24], eax"], [533, "jnb short loc_4577F9"], [534, "mov rax, [rbp+var_20]"], [535, "mov eax, [rax+14Eh]"], [536, "cmp eax, 7"], [537, "jbe loc_4574A1"], [538, "jmp short loc_4577F9"], [539, "cmp [rbp+var_B5C], 0"], [540, "jz short loc_4577FA"], [541, "mov rax, [rbp+var_18]"], [542, "mov edx, [rbp+var_B5C]"], [543, "mov [rax+38h], edx"], [544, "cmp [rbp+var_44], 0"], [545, "jz short loc_4577CF"], [546, "mov edx, offset aA_1"], [547, "jmp short loc_4577D4"], [548, "mov edx, offset aAaaa_0"], [549, "mov rax, [rbp+var_18]"], [550, "mov rax, [rax+8]"], [551, "mov esi, [rbp+var_B5C]"], [552, "mov rcx, rdx"], [553, "mov edx, offset aDnsSRecordReso"], [554, "mov rdi, rax"], [555, "mov eax, 0"], [556, "call sub_482464"], [557, "jmp short loc_4577FA"], [558, "nop"], [559, "cmp [rbp+var_2C], 0"], [560, "jz short loc_457832"], [561, "mov rax, [rbp+var_18]"], [562, "mov eax, [rax+11F8h]"], [563, "lea edx, [rax+1]"], [564, "mov rax, [rbp+var_18]"], [565, "mov [rax+11F8h], edx"], [566, "jmp short loc_457832"], [567, "mov ecx, offset aDnsCallback"], [568, "mov edx, 316h"], [569, "mov esi, offset aSrcPjlibUtilSr"], [570, "mov edi, offset aUnexpectedStat_1"], [571, "call ___assert_fail"], [572, "mov rax, [rbp+var_18]"], [573, "mov edx, [rax+11F8h]"], [574, "mov rax, [rbp+var_18]"], [575, "mov eax, [rax+64h]"], [576, "cmp edx, eax"], [577, "jnz loc_457C5D"], [578, "mov [rbp+var_B20], 0"], [579, "mov [rbp+var_24], 0"], [580, "jmp loc_457B2C"], [581, "mov eax, [rbp+var_24]"], [582, "imul rax, 232h"], [583, "lea rdx, [rax+60h]"], [584, "mov rax, [rbp+var_18]"], [585, "add rax, rdx"], [586, "add rax, 8"], [587, "mov [rbp+var_50], rax"], [588, "mov eax, [rbp+var_B20]"], [589, "lea rdx, [rbp+var_B20]"], [590, "mov eax, eax"], [591, "imul rax, 158h"], [592, "add rax, 10h"], [593, "add rax, rdx"], [594, "add rax, 8"], [595, "mov [rbp+var_58], rax"], [596, "mov edx, [rbp+var_B20]"], [597, "mov rax, [rbp+var_50]"], [598, "mov eax, [rax+142h]"], [599, "mov edx, edx"], [600, "imul rdx, 158h"], [601, "lea rbx, [rbp+var_10]"], [602, "add rdx, rbx"], [603, "sub rdx, 0B08h"], [604, "mov [rdx], eax"], [605, "mov edx, [rbp+var_B20]"], [606, "mov rax, [rbp+var_50]"], [607, "mov eax, [rax+146h]"], [608, "mov edx, edx"], [609, "imul rdx, 158h"], [610, "lea rbx, [rbp+var_10]"], [611, "add rdx, rbx"], [612, "sub rdx, 0B04h"], [613, "mov [rdx], eax"], [614, "mov edx, [rbp+var_B20]"], [615, "mov rax, [rbp+var_50]"], [616, "movzx eax, word ptr [rax+140h]"], [617, "mov edx, edx"], [618, "imul rdx, 158h"], [619, "lea rbx, [rbp+var_10]"], [620, "add rdx, rbx"], [621, "sub rdx, 0B00h"], [622, "mov [rdx], ax"], [623, "mov eax, [rbp+var_B20]"], [624, "mov eax, eax"], [625, "imul rax, 158h"], [626, "lea rbx, [rbp+var_10]"], [627, "add rax, rbx"], [628, "lea rcx, [rax-0B00h]"], [629, "mov rax, [rbp+var_50]"], [630, "mov rdx, [rax+18h]"], [631, "mov rax, [rax+10h]"], [632, "mov [rcx+8], rax"], [633, "mov [rcx+10h], rdx"], [634, "mov eax, [rbp+var_B20]"], [635, "mov eax, eax"], [636, "imul rax, 158h"], [637, "lea rbx, [rbp+var_10]"], [638, "add rax, rbx"], [639, "lea rcx, [rax-0AF0h]"], [640, "mov rax, [rbp+var_50]"], [641, "mov rdx, [rax+0B8h]"], [642, "mov rax, [rax+0B0h]"], [643, "mov [rcx+8], rax"], [644, "mov [rcx+10h], rdx"], [645, "mov eax, [rbp+var_B20]"], [646, "mov eax, eax"], [647, "imul rax, 158h"], [648, "lea rbx, [rbp+var_10]"], [649, "add rax, rbx"], [650, "sub rax, 0AD8h"], [651, "mov dword ptr [rax], 0"], [652, "mov rax, [rbp+var_50]"], [653, "mov eax, [rax+14Eh]"], [654, "cmp eax, 8"], [655, "jbe short loc_4579D2"], [656, "mov ecx, offset aDnsCallback"], [657, "mov edx, 32Eh"], [658, "mov esi, offset aSrcPjlibUtilSr"], [659, "mov edi, offset aSrv2AddrCnt8"], [660, "call ___assert_fail"], [661, "mov [rbp+var_34], 0"], [662, "jmp loc_457AED"], [663, "mov rcx, [rbp+var_50]"], [664, "mov edx, [rbp+var_34]"], [665, "mov rax, rdx"], [666, "shl rax, 3"], [667, "sub rax, rdx"], [668, "shl rax, 2"], [669, "add rax, rcx"], [670, "add rax, 150h"], [671, "movzx eax, word ptr [rax+2]"], [672, "movzx edx, ax"], [673, "mov rsi, [rbp+var_58]"], [674, "mov ecx, [rbp+var_34]"], [675, "mov rax, rcx"], [676, "shl rax, 2"], [677, "add rax, rcx"], [678, "shl rax, 2"], [679, "add rax, rsi"], [680, "add rax, 24h "], [681, "mov [rax], edx"], [682, "mov rcx, [rbp+var_58]"], [683, "mov edx, [rbp+var_34]"], [684, "mov rax, rdx"], [685, "shl rax, 2"], [686, "add rax, rdx"], [687, "shl rax, 2"], [688, "add rax, rcx"], [689, "add rax, 24h "], [690, "mov edx, [rax]"], [691, "movzx eax, cs:word_4A2184"], [692, "movzx eax, ax"], [693, "cmp edx, eax"], [694, "jnz short loc_457A8E"], [695, "mov rcx, [rbp+var_58]"], [696, "mov edx, [rbp+var_34]"], [697, "mov rax, rdx"], [698, "shl rax, 2"], [699, "add rax, rdx"], [700, "shl rax, 2"], [701, "add rax, rcx"], [702, "lea rcx, [rax+28h]"], [703, "mov rsi, [rbp+var_50]"], [704, "mov edx, [rbp+var_34]"], [705, "mov rax, rdx"], [706, "shl rax, 3"], [707, "sub rax, rdx"], [708, "shl rax, 2"], [709, "add rax, rsi"], [710, "add rax, 150h"], [711, "mov eax, [rax+6]"], [712, "mov [rcx], eax"], [713, "jmp short loc_457AD8"], [714, "mov rcx, [rbp+var_58]"], [715, "mov edx, [rbp+var_34]"], [716, "mov rax, rdx"], [717, "shl rax, 2"], [718, "add rax, rdx"], [719, "shl rax, 2"], [720, "add rax, rcx"], [721, "lea rcx, [rax+20h]"], [722, "mov rsi, [rbp+var_50]"], [723, "mov edx, [rbp+var_34]"], [724, "mov rax, rdx"], [725, "shl rax, 3"], [726, "sub rax, rdx"], [727, "shl rax, 2"], [728, "add rax, rsi"], [729, "add rax, 150h"], [730, "mov rdx, [rax+12h]"], [731, "mov rax, [rax+0Ah]"], [732, "mov [rcx+8], rax"], [733, "mov [rcx+10h], rdx"], [734, "mov rax, [rbp+var_58]"], [735, "mov eax, [rax+20h]"], [736, "lea edx, [rax+1]"], [737, "mov rax, [rbp+var_58]"], [738, "mov [rax+20h], edx"], [739, "add [rbp+var_34], 1"], [740, "mov rax, [rbp+var_50]"], [741, "mov eax, [rax+14Eh]"], [742, "cmp [rbp+var_34], eax"], [743, "jb loc_4579DE"], [744, "mov rax, [rbp+var_50]"], [745, "mov eax, [rax+14Eh]"], [746, "test eax, eax"], [747, "jz short loc_457B28"], [748, "mov eax, [rbp+var_B20]"], [749, "add eax, 1"], [750, "mov [rbp+var_B20], eax"], [751, "mov eax, [rbp+var_B20]"], [752, "cmp eax, 8"], [753, "jz short loc_457B3E"], [754, "add [rbp+var_24], 1"], [755, "mov rax, [rbp+var_18]"], [756, "mov eax, [rax+64h]"], [757, "cmp [rbp+var_24], eax"], [758, "jb loc_457861"], [759, "jmp short loc_457B3F"], [760, "nop"], [761, "call sub_4848D6"], [762, "cmp eax, 4"], [763, "jle short loc_457B69"], [764, "mov edx, [rbp+var_B20]"], [765, "mov rax, [rbp+var_18]"], [766, "mov rax, [rax+8]"], [767, "mov esi, offset aServerResoluti"], [768, "mov rdi, rax"], [769, "mov eax, 0"], [770, "call sub_4852F5"], [771, "mov eax, [rbp+var_B20]"], [772, "test eax, eax"], [773, "jz short loc_457B7F"], [774, "mov [rbp+var_B5C], 0"], [775, "jmp short loc_457B9F"], [776, "mov rax, [rbp+var_18]"], [777, "mov eax, [rax+38h]"], [778, "mov [rbp+var_B5C], eax"], [779, "cmp [rbp+var_B5C], 0"], [780, "jnz short loc_457B9F"], [781, "mov [rbp+var_B5C], 4E22Fh"], [782, "mov rax, [rbp+var_18]"], [783, "mov r8, [rax+30h]"], [784, "mov rax, [rbp+var_18]"], [785, "mov rax, [rax+20h]"], [786, "lea rdx, [rbp+var_B20]"], [787, "mov ecx, [rbp+var_B5C]"], [788, "mov esi, ecx"], [789, "mov rdi, rax"], [790, "call r8"], [791, "jmp loc_457C5D"], [792, "nop"], [793, "cmp [rbp+var_B5C], 0"], [794, "jz loc_457C5E"], [795, "mov rax, [rbp+var_18]"], [796, "mov rbx, [rax+50h]"], [797, "mov rax, [rbp+var_18]"], [798, "mov rax, [rax+58h]"], [799, "mov r12d, eax"], [800, "mov rax, [rbp+var_18]"], [801, "mov eax, [rax+10h]"], [802, "mov edi, eax"], [803, "call sub_44CCCE"], [804, "mov rdx, rax"], [805, "mov rax, [rbp+var_18]"], [806, "mov rax, [rax+8]"], [807, "mov esi, [rbp+var_B5C]"], [808, "mov r9, rbx"], [809, "mov r8d, r12d"], [810, "mov rcx, rdx"], [811, "mov edx, offset aDnsSRecordReso_0"], [812, "mov rdi, rax"], [813, "mov eax, 0"], [814, "call sub_482464"], [815, "mov rax, [rbp+var_18]"], [816, "mov esi, 0"], [817, "mov rdi, rax"], [818, "call sub_455C64"], [819, "mov rax, [rbp+var_18]"], [820, "mov r8, [rax+30h]"], [821, "mov rax, [rbp+var_18]"], [822, "mov rax, [rax+20h]"], [823, "mov ecx, [rbp+var_B5C]"], [824, "mov edx, 0"], [825, "mov esi, ecx"], [826, "mov rdi, rax"], [827, "call r8"], [828, "jmp short loc_457C5E"], [829, "nop"], [830, "jmp short loc_457C5E"], [831, "nop"], [832, "add rsp, 0B60h"], [833, "pop rbx"], [834, "pop r12"], [835, "pop rbp"], [836, "retn"]], "data_dep": [[8, 5], [9, 8], [11, 9], [12, 11], [13, 12], [14, 13], [15, 9], [16, 15], [19, 9], [20, 19], [21, 20], [22, 21], [23, 9], [24, 23], [25, 24], [26, 25], [27, 26], [29, 9], [30, 29], [31, 30], [32, 31], [33, 9], [34, 33], [35, 34], [36, 35], [37, 36], [38, 37], [45, 16], [45, 38], [45, 27], [46, 45], [47, 46], [48, 47], [49, 27], [49, 16], [49, 38], [50, 49], [51, 6], [52, 51], [53, 7], [54, 53], [54, 50], [55, 54], [56, 55], [57, 56], [58, 57], [60, 59], [61, 60], [62, 16], [62, 38], [62, 27], [63, 50], [63, 62], [64, 27], [64, 16], [64, 38], [65, 50], [65, 64], [66, 65], [67, 16], [67, 38], [67, 27], [68, 50], [68, 67], [69, 63], [70, 66], [72, 68], [76, 27], [76, 16], [76, 38], [77, 75], [78, 77], [78, 76], [80, 7], [81, 80], [81, 50], [82, 81], [83, 82], [84, 7], [85, 38], [85, 27], [85, 16], [86, 84], [87, 85], [90, 27], [90, 16], [90, 38], [91, 6], [92, 90], [92, 91], [94, 6], [96, 93], [97, 94], [100, 99], [101, 100], [102, 16], [102, 38], [102, 27], [103, 102], [103, 92], [103, 50], [104, 27], [104, 16], [104, 38], [105, 92], [105, 104], [105, 50], [106, 105], [107, 27], [107, 16], [107, 38], [108, 92], [108, 50], [108, 107], [109, 93], [110, 109], [111, 103], [112, 106], [114, 108], [117, 27], [117, 16], [117, 38], [118, 117], [118, 50], [118, 92], [119, 118], [120, 119], [121, 120], [122, 16], [122, 38], [122, 27], [123, 122], [123, 92], [123, 50], [124, 123], [125, 124], [126, 38], [126, 27], [126, 16], [127, 126], [127, 92], [127, 50], [128, 127], [129, 128], [132, 131], [133, 132], [134, 27], [134, 16], [134, 38], [135, 134], [135, 50], [135, 92], [136, 27], [136, 16], [136, 38], [137, 136], [137, 92], [137, 50], [138, 137], [139, 27], [139, 16], [139, 38], [140, 50], [140, 92], [140, 139], [141, 38], [141, 27], [141, 16], [142, 92], [142, 50], [142, 141], [143, 142], [144, 27], [144, 16], [144, 38], [145, 144], [145, 50], [145, 92], [146, 135], [147, 138], [148, 140], [149, 143], [151, 145], [154, 27], [154, 16], [154, 38], [155, 184], [155, 198], [155, 178], [155, 177], [155, 154], [155, 190], [155, 158], [155, 50], [155, 92], [156, 198], [156, 178], [156, 155], [156, 177], [156, 190], [156, 111], [156, 93], [156, 158], [156, 50], [156, 148], [156, 92], [156, 184], [157, 38], [157, 27], [157, 16], [158, 157], [158, 156], [159, 155], [160, 159], [161, 160], [162, 157], [162, 158], [162, 161], [163, 16], [163, 38], [163, 27], [164, 162], [164, 163], [165, 164], [167, 165], [169, 27], [169, 16], [169, 38], [170, 159], [171, 170], [172, 169], [172, 171], [173, 156], [173, 158], [173, 172], [174, 38], [174, 27], [174, 16], [175, 158], [175, 174], [176, 158], [176, 174], [177, 173], [177, 176], [178, 173], [178, 175], [179, 16], [179, 38], [179, 27], [180, 159], [181, 180], [182, 179], [182, 181], [183, 182], [184, 183], [185, 27], [185, 16], [185, 38], [186, 159], [187, 186], [188, 185], [188, 187], [189, 188], [190, 189], [191, 27], [191, 16], [191, 38], [192, 190], [192, 191], [193, 16], [193, 38], [193, 27], [194, 159], [195, 194], [196, 193], [196, 195], [197, 196], [198, 197], [198, 192], [199, 27], [199, 16], [199, 38], [200, 199], [200, 198], [201, 200], [202, 201], [203, 202], [204, 130], [205, 27], [205, 16], [205, 38], [206, 184], [206, 198], [206, 178], [206, 92], [206, 177], [206, 190], [206, 158], [206, 50], [206, 205], [207, 206], [208, 207], [209, 208], [210, 204], [210, 130], [211, 38], [211, 27], [211, 16], [212, 210], [212, 204], [212, 130], [213, 211], [213, 212], [214, 16], [214, 38], [214, 27], [215, 158], [215, 50], [215, 92], [215, 184], [215, 198], [215, 178], [215, 177], [215, 213], [215, 190], [215, 214], [216, 38], [216, 27], [216, 16], [217, 184], [217, 198], [217, 178], [217, 177], [217, 190], [217, 158], [217, 50], [217, 92], [217, 213], [217, 216], [218, 217], [218, 215], [219, 218], [220, 38], [220, 27], [220, 16], [221, 220], [223, 222], [224, 223], [225, 224], [227, 38], [227, 27], [227, 16], [228, 227], [229, 228], [230, 229], [233, 9], [234, 233], [235, 234], [236, 235], [237, 24], [237, 35], [237, 17], [238, 237], [239, 238], [240, 239], [241, 240], [242, 241], [243, 17], [243, 35], [243, 24], [244, 243], [246, 9], [247, 246], [248, 247], [249, 248], [250, 24], [250, 35], [250, 17], [251, 250], [252, 251], [253, 252], [254, 253], [255, 254], [256, 35], [256, 24], [256, 17], [257, 256], [264, 9], [265, 257], [265, 264], [265, 244], [266, 265], [267, 265], [267, 266], [268, 267], [269, 268], [270, 6], [271, 270], [272, 7], [273, 244], [273, 257], [273, 272], [274, 273], [275, 274], [277, 7], [278, 276], [279, 277], [281, 280], [282, 281], [283, 282], [284, 16], [284, 38], [284, 27], [285, 284], [285, 244], [285, 257], [286, 16], [286, 38], [286, 27], [287, 286], [287, 244], [287, 257], [288, 287], [289, 269], [290, 289], [294, 16], [294, 38], [294, 27], [295, 257], [295, 294], [295, 244], [296, 281], [297, 285], [298, 288], [300, 295], [303, 6], [303, 281], [304, 303], [305, 7], [306, 244], [306, 257], [306, 305], [307, 306], [308, 307], [309, 232], [310, 309], [311, 310], [317, 35], [317, 24], [317, 17], [318, 317], [318, 244], [318, 257], [319, 318], [320, 319], [321, 231], [322, 321], [323, 322], [324, 231], [325, 324], [326, 325], [332, 17], [332, 35], [332, 24], [333, 244], [333, 332], [333, 299], [333, 276], [333, 257], [333, 335], [334, 35], [334, 24], [334, 17], [335, 334], [335, 333], [336, 35], [336, 24], [336, 17], [337, 336], [338, 333], [339, 338], [340, 339], [341, 337], [346, 269], [347, 346], [348, 530], [348, 343], [349, 348], [350, 349], [351, 348], [351, 350], [352, 351], [353, 396], [353, 353], [353, 453], [353, 410], [354, 352], [354, 353], [355, 354], [356, 529], [356, 244], [356, 257], [356, 355], [356, 335], [356, 400], [356, 458], [356, 459], [358, 357], [359, 356], [359, 358], [360, 359], [361, 35], [361, 24], [361, 17], [362, 361], [362, 459], [362, 458], [362, 529], [362, 244], [362, 257], [362, 335], [362, 400], [363, 362], [364, 17], [364, 35], [364, 24], [365, 458], [365, 459], [365, 529], [365, 364], [365, 244], [365, 257], [365, 335], [365, 400], [366, 365], [367, 366], [368, 367], [369, 366], [369, 368], [370, 369], [371, 366], [371, 529], [371, 244], [371, 257], [371, 400], [371, 335], [371, 459], [371, 370], [371, 458], [372, 35], [372, 24], [372, 17], [373, 371], [373, 372], [374, 278], [374, 431], [374, 244], [374, 257], [374, 335], [374, 400], [374, 521], [374, 458], [374, 479], [374, 459], [374, 373], [374, 340], [374, 529], [374, 296], [374, 374], [376, 375], [377, 363], [379, 376], [381, 17], [381, 35], [381, 24], [382, 335], [382, 400], [382, 458], [382, 381], [382, 459], [382, 529], [382, 244], [382, 257], [383, 35], [383, 24], [383, 17], [384, 382], [385, 384], [386, 385], [387, 384], [387, 386], [388, 387], [389, 388], [389, 383], [390, 244], [390, 257], [390, 335], [390, 400], [390, 458], [390, 389], [390, 459], [390, 529], [390, 384], [391, 530], [391, 343], [392, 391], [393, 392], [394, 391], [394, 393], [395, 394], [396, 353], [397, 395], [397, 396], [398, 397], [399, 244], [399, 257], [399, 335], [399, 400], [399, 458], [399, 459], [399, 529], [399, 398], [400, 399], [400, 390], [403, 269], [404, 403], [405, 530], [405, 343], [406, 405], [407, 406], [408, 407], [408, 405], [409, 408], [410, 410], [410, 396], [410, 353], [410, 453], [411, 410], [411, 409], [412, 411], [413, 244], [413, 257], [413, 335], [413, 400], [413, 458], [413, 412], [413, 459], [413, 529], [415, 414], [416, 415], [416, 413], [417, 416], [418, 35], [418, 24], [418, 17], [419, 459], [419, 418], [419, 529], [419, 244], [419, 257], [419, 335], [419, 400], [419, 458], [420, 419], [421, 35], [421, 24], [421, 17], [422, 529], [422, 421], [422, 244], [422, 257], [422, 335], [422, 400], [422, 458], [422, 459], [423, 422], [424, 423], [425, 424], [426, 423], [426, 425], [427, 426], [428, 423], [428, 400], [428, 458], [428, 427], [428, 459], [428, 529], [428, 244], [428, 257], [428, 335], [429, 17], [429, 24], [429, 35], [430, 428], [430, 429], [431, 335], [431, 400], [431, 521], [431, 458], [431, 459], [431, 340], [431, 529], [431, 244], [431, 296], [431, 430], [431, 374], [431, 278], [431, 431], [431, 257], [431, 479], [433, 432], [434, 420], [436, 433], [438, 35], [438, 24], [438, 17], [439, 438], [439, 529], [439, 244], [439, 257], [439, 335], [439, 400], [439, 458], [439, 459], [440, 24], [440, 35], [440, 17], [441, 439], [442, 441], [443, 442], [444, 443], [444, 441], [445, 444], [446, 445], [446, 440], [447, 459], [447, 529], [447, 441], [447, 244], [447, 257], [447, 335], [447, 446], [447, 400], [447, 458], [448, 530], [448, 343], [449, 448], [450, 449], [451, 448], [451, 450], [452, 451], [453, 410], [454, 453], [454, 452], [455, 454], [456, 529], [456, 244], [456, 400], [456, 455], [456, 257], [456, 335], [456, 459], [456, 458], [457, 244], [457, 455], [457, 257], [457, 335], [457, 400], [457, 458], [457, 459], [457, 529], [458, 457], [458, 447], [459, 456], [459, 447], [463, 462], [464, 463], [465, 35], [465, 17], [465, 24], [466, 459], [466, 529], [466, 465], [466, 244], [466, 257], [466, 335], [466, 400], [466, 458], [467, 24], [467, 35], [467, 17], [468, 244], [468, 257], [468, 335], [468, 400], [468, 458], [468, 467], [468, 459], [468, 529], [469, 468], [470, 269], [471, 470], [475, 27], [475, 16], [475, 38], [476, 244], [476, 257], [476, 335], [476, 400], [476, 458], [476, 459], [476, 529], [476, 475], [477, 466], [478, 472], [478, 474], [480, 476], [483, 460], [483, 401], [483, 345], [484, 483], [486, 485], [487, 486], [488, 24], [488, 35], [488, 17], [489, 529], [489, 244], [489, 488], [489, 257], [489, 335], [489, 400], [489, 458], [489, 459], [490, 489], [491, 490], [492, 491], [493, 490], [493, 492], [494, 493], [495, 490], [495, 257], [495, 335], [495, 458], [495, 459], [495, 494], [495, 529], [495, 244], [495, 400], [496, 35], [496, 17], [496, 24], [497, 496], [497, 495], [498, 379], [498, 300], [498, 257], [498, 522], [498, 335], [498, 459], [498, 436], [498, 458], [498, 480], [498, 341], [498, 497], [498, 529], [498, 244], [498, 279], [498, 400], [499, 497], [502, 499], [504, 503], [505, 24], [505, 35], [505, 17], [506, 400], [506, 257], [506, 335], [506, 458], [506, 505], [506, 459], [506, 529], [506, 244], [507, 35], [507, 24], [507, 17], [508, 507], [508, 529], [508, 244], [508, 400], [508, 257], [508, 335], [508, 459], [508, 458], [509, 508], [510, 269], [511, 510], [515, 16], [515, 38], [515, 27], [516, 515], [516, 459], [516, 529], [516, 244], [516, 400], [516, 257], [516, 335], [516, 458], [517, 504], [518, 506], [519, 509], [520, 512], [520, 514], [522, 516], [525, 35], [525, 17], [525, 24], [526, 257], [526, 335], [526, 458], [526, 525], [526, 459], [526, 529], [526, 244], [526, 400], [527, 527], [527, 520], [527, 529], [527, 244], [527, 299], [527, 276], [527, 400], [527, 478], [527, 356], [527, 257], [527, 391], [527, 335], [527, 456], [527, 459], [527, 413], [527, 458], [527, 526], [527, 339], [528, 17], [528, 35], [528, 24], [529, 528], [529, 527], [530, 530], [530, 343], [531, 232], [532, 343], [532, 531], [532, 530], [533, 532], [534, 17], [534, 35], [534, 24], [535, 529], [535, 244], [535, 400], [535, 257], [535, 335], [535, 534], [535, 458], [535, 459], [536, 535], [537, 536], [539, 281], [539, 6], [540, 539], [541, 16], [541, 38], [541, 27], [542, 281], [542, 6], [543, 542], [543, 541], [544, 269], [545, 544], [549, 16], [549, 38], [549, 27], [550, 549], [550, 244], [550, 543], [550, 257], [551, 281], [551, 6], [552, 546], [552, 548], [554, 550], [559, 255], [559, 242], [560, 559], [561, 16], [561, 38], [561, 27], [562, 400], [562, 543], [562, 565], [562, 257], [562, 335], [562, 459], [562, 458], [562, 561], [562, 529], [562, 244], [563, 458], [563, 339], [563, 527], [563, 562], [563, 529], [563, 244], [563, 299], [563, 276], [563, 400], [563, 478], [563, 553], [563, 543], [563, 356], [563, 565], [563, 257], [563, 391], [563, 335], [563, 456], [563, 459], [563, 413], [564, 27], [564, 16], [564, 38], [565, 563], [565, 564], [572, 16], [572, 38], [572, 27], [573, 572], [573, 529], [573, 565], [573, 244], [573, 178], [573, 158], [573, 400], [573, 92], [573, 213], [573, 190], [573, 543], [573, 257], [573, 335], [573, 459], [573, 50], [573, 184], [573, 458], [573, 198], [573, 177], [574, 16], [574, 38], [574, 27], [575, 92], [575, 213], [575, 190], [575, 543], [575, 565], [575, 257], [575, 335], [575, 459], [575, 50], [575, 184], [575, 458], [575, 177], [575, 529], [575, 244], [575, 198], [575, 574], [575, 178], [575, 158], [575, 400], [576, 573], [576, 575], [577, 576], [581, 754], [581, 579], [582, 581], [583, 459], [583, 50], [583, 184], [583, 733], [583, 458], [583, 736], [583, 582], [583, 604], [583, 738], [583, 198], [583, 681], [583, 573], [583, 177], [583, 651], [583, 641], [583, 529], [583, 565], [583, 244], [583, 178], [583, 158], [583, 400], [583, 632], [583, 92], [583, 622], [583, 213], [583, 190], [583, 543], [583, 644], [583, 732], [583, 712], [583, 257], [583, 643], [583, 633], [583, 335], [583, 613], [584, 16], [584, 38], [584, 27], [585, 583], [585, 584], [586, 585], [587, 586], [588, 750], [588, 578], [589, 750], [589, 578], [589, 583], [590, 588], [591, 590], [592, 591], [593, 589], [593, 592], [594, 593], [595, 594], [596, 750], [596, 578], [597, 587], [598, 597], [598, 178], [598, 335], [598, 158], [598, 400], [598, 632], [598, 92], [598, 622], [598, 213], [598, 190], [598, 733], [598, 458], [598, 543], [598, 644], [598, 732], [598, 712], [598, 633], [598, 613], [598, 459], [598, 50], [598, 184], [598, 681], [598, 529], [598, 604], [598, 738], [598, 198], [598, 177], [598, 651], [598, 565], [598, 244], [598, 257], [598, 643], [599, 596], [600, 599], [601, 648], [601, 396], [601, 353], [601, 453], [601, 410], [602, 601], [602, 600], [603, 602], [604, 598], [604, 603], [605, 750], [605, 578], [606, 587], [607, 606], [607, 604], [608, 605], [609, 608], [610, 601], [611, 609], [611, 610], [612, 611], [613, 612], [613, 607], [614, 578], [614, 750], [615, 587], [616, 613], [616, 615], [617, 614], [618, 617], [619, 610], [620, 618], [620, 619], [621, 620], [622, 621], [622, 616], [623, 750], [623, 578], [624, 623], [625, 624], [626, 619], [627, 625], [627, 626], [628, 721], [628, 390], [628, 622], [628, 193], [628, 291], [628, 447], [628, 702], [628, 293], [628, 93], [628, 469], [628, 627], [628, 639], [628, 111], [628, 552], [628, 519], [629, 587], [630, 629], [630, 622], [631, 629], [631, 622], [632, 628], [632, 631], [633, 628], [633, 630], [634, 750], [634, 578], [635, 634], [636, 635], [637, 626], [638, 637], [638, 636], [639, 633], [639, 638], [639, 628], [640, 587], [641, 633], [641, 640], [642, 640], [642, 335], [642, 633], [643, 642], [643, 639], [644, 639], [644, 641], [645, 578], [645, 750], [646, 645], [647, 646], [648, 637], [649, 648], [649, 647], [650, 649], [651, 650], [652, 587], [653, 651], [653, 652], [653, 529], [654, 653], [655, 654], [663, 587], [664, 661], [664, 739], [665, 664], [666, 665], [667, 664], [667, 666], [668, 667], [669, 668], [669, 663], [670, 669], [671, 670], [671, 529], [671, 604], [671, 738], [671, 198], [671, 177], [671, 190], [671, 651], [671, 543], [671, 565], [671, 244], [671, 257], [671, 643], [671, 633], [671, 178], [671, 335], [671, 158], [671, 400], [671, 632], [671, 92], [671, 622], [671, 213], [671, 733], [671, 458], [671, 644], [671, 732], [671, 712], [671, 613], [671, 459], [671, 50], [671, 184], [671, 681], [672, 671], [673, 595], [674, 661], [674, 739], [675, 674], [676, 675], [677, 674], [677, 676], [678, 677], [679, 678], [679, 673], [680, 679], [681, 680], [681, 672], [682, 595], [683, 661], [683, 739], [684, 683], [685, 684], [686, 685], [686, 683], [687, 686], [688, 682], [688, 687], [689, 688], [690, 689], [690, 681], [692, 691], [693, 690], [693, 692], [694, 693], [695, 595], [696, 661], [696, 739], [697, 696], [698, 697], [699, 696], [699, 698], [700, 699], [701, 695], [701, 700], [702, 681], [702, 529], [702, 604], [702, 738], [702, 198], [702, 695], [702, 177], [702, 190], [702, 651], [702, 543], [702, 565], [702, 244], [702, 257], [702, 643], [702, 633], [702, 178], [702, 335], [702, 158], [702, 400], [702, 632], [702, 92], [702, 622], [702, 213], [702, 733], [702, 458], [702, 644], [702, 732], [702, 712], [702, 613], [702, 459], [702, 50], [702, 701], [702, 184], [703, 587], [704, 739], [704, 661], [705, 704], [706, 705], [707, 706], [707, 704], [708, 707], [709, 708], [709, 703], [710, 709], [711, 732], [711, 565], [711, 257], [711, 643], [711, 633], [711, 335], [711, 158], [711, 50], [711, 400], [711, 632], [711, 92], [711, 622], [711, 213], [711, 733], [711, 710], [711, 458], [711, 644], [711, 712], [711, 604], [711, 613], [711, 459], [711, 184], [711, 681], [711, 529], [711, 244], [711, 738], [711, 198], [711, 178], [711, 177], [711, 190], [711, 651], [711, 543], [712, 702], [712, 711], [714, 595], [715, 661], [715, 739], [716, 715], [717, 716], [718, 715], [718, 717], [719, 718], [720, 719], [720, 714], [721, 681], [721, 529], [721, 244], [721, 738], [721, 198], [721, 178], [721, 177], [721, 190], [721, 651], [721, 543], [721, 732], [721, 565], [721, 257], [721, 643], [721, 633], [721, 335], [721, 158], [721, 50], [721, 400], [721, 632], [721, 92], [721, 622], [721, 213], [721, 720], [721, 733], [721, 458], [721, 644], [721, 712], [721, 604], [721, 613], [721, 459], [721, 184], [721, 714], [722, 587], [723, 661], [723, 739], [724, 723], [725, 724], [726, 723], [726, 725], [727, 726], [728, 722], [728, 727], [729, 728], [730, 92], [730, 622], [730, 213], [730, 733], [730, 458], [730, 644], [730, 712], [730, 613], [730, 632], [730, 459], [730, 184], [730, 681], [730, 529], [730, 604], [730, 738], [730, 198], [730, 178], [730, 177], [730, 190], [730, 651], [730, 543], [730, 729], [730, 732], [730, 565], [730, 244], [730, 257], [730, 643], [730, 633], [730, 335], [730, 158], [730, 50], [730, 400], [731, 529], [731, 604], [731, 738], [731, 198], [731, 177], [731, 651], [731, 543], [731, 729], [731, 565], [731, 244], [731, 257], [731, 643], [731, 633], [731, 178], [731, 335], [731, 158], [731, 400], [731, 632], [731, 92], [731, 622], [731, 213], [731, 190], [731, 733], [731, 458], [731, 644], [731, 732], [731, 712], [731, 613], [731, 459], [731, 50], [731, 184], [731, 681], [732, 731], [732, 721], [733, 730], [733, 721], [734, 595], [735, 459], [735, 184], [735, 681], [735, 529], [735, 604], [735, 738], [735, 198], [735, 178], [735, 177], [735, 190], [735, 651], [735, 543], [735, 732], [735, 565], [735, 244], [735, 257], [735, 643], [735, 633], [735, 335], [735, 158], [735, 50], [735, 400], [735, 632], [735, 92], [735, 622], [735, 213], [735, 733], [735, 458], [735, 644], [735, 712], [735, 613], [735, 734], [736, 529], [736, 244], [736, 738], [736, 198], [736, 178], [736, 730], [736, 177], [736, 190], [736, 651], [736, 543], [736, 732], [736, 565], [736, 257], [736, 643], [736, 633], [736, 335], [736, 158], [736, 50], [736, 400], [736, 632], [736, 92], [736, 622], [736, 213], [736, 733], [736, 458], [736, 644], [736, 735], [736, 712], [736, 604], [736, 613], [736, 459], [736, 184], [736, 704], [736, 681], [737, 595], [738, 737], [738, 736], [739, 661], [739, 739], [740, 587], [741, 732], [741, 565], [741, 257], [741, 643], [741, 633], [741, 335], [741, 158], [741, 50], [741, 400], [741, 632], [741, 92], [741, 622], [741, 213], [741, 733], [741, 458], [741, 644], [741, 712], [741, 604], [741, 613], [741, 459], [741, 184], [741, 681], [741, 529], [741, 244], [741, 738], [741, 198], [741, 178], [741, 740], [741, 177], [741, 190], [741, 651], [741, 543], [742, 741], [742, 661], [742, 739], [743, 742], [744, 587], [745, 400], [745, 632], [745, 92], [745, 177], [745, 213], [745, 190], [745, 543], [745, 644], [745, 732], [745, 565], [745, 257], [745, 643], [745, 633], [745, 744], [745, 335], [745, 613], [745, 158], [745, 50], [745, 622], [745, 733], [745, 458], [745, 712], [745, 604], [745, 459], [745, 184], [745, 681], [745, 651], [745, 529], [745, 244], [745, 738], [745, 198], [745, 178], [746, 745], [747, 746], [748, 750], [748, 578], [749, 748], [750, 749], [751, 750], [752, 751], [753, 752], [754, 754], [754, 579], [755, 27], [755, 16], [755, 38], [756, 177], [756, 190], [756, 651], [756, 543], [756, 732], [756, 565], [756, 257], [756, 643], [756, 633], [756, 335], [756, 158], [756, 50], [756, 400], [756, 632], [756, 92], [756, 622], [756, 213], [756, 733], [756, 458], [756, 644], [756, 755], [756, 712], [756, 613], [756, 459], [756, 184], [756, 681], [756, 529], [756, 604], [756, 244], [756, 738], [756, 198], [756, 178], [757, 754], [757, 756], [757, 579], [758, 757], [762, 761], [763, 762], [764, 750], [764, 578], [765, 16], [765, 38], [765, 27], [766, 158], [766, 459], [766, 50], [766, 622], [766, 733], [766, 458], [766, 712], [766, 604], [766, 184], [766, 681], [766, 651], [766, 529], [766, 244], [766, 738], [766, 198], [766, 178], [766, 400], [766, 632], [766, 92], [766, 177], [766, 213], [766, 190], [766, 543], [766, 644], [766, 765], [766, 732], [766, 565], [766, 257], [766, 643], [766, 633], [766, 335], [766, 613], [768, 766], [771, 750], [771, 578], [772, 771], [773, 772], [776, 16], [776, 38], [776, 27], [777, 158], [777, 50], [777, 400], [777, 776], [777, 632], [777, 92], [777, 622], [777, 213], [777, 733], [777, 458], [777, 644], [777, 712], [777, 604], [777, 613], [777, 459], [777, 184], [777, 681], [777, 529], [777, 244], [777, 738], [777, 198], [777, 178], [777, 177], [777, 190], [777, 651], [777, 543], [777, 732], [777, 565], [777, 257], [777, 643], [777, 633], [777, 335], [778, 777], [779, 778], [780, 779], [782, 16], [782, 38], [782, 27], [783, 529], [783, 244], [783, 738], [783, 198], [783, 178], [783, 177], [783, 213], [783, 190], [783, 651], [783, 543], [783, 732], [783, 565], [783, 257], [783, 643], [783, 633], [783, 335], [783, 158], [783, 50], [783, 400], [783, 632], [783, 92], [783, 622], [783, 733], [783, 458], [783, 644], [783, 712], [783, 604], [783, 613], [783, 459], [783, 184], [783, 681], [783, 782], [784, 38], [784, 27], [784, 16], [785, 604], [785, 613], [785, 459], [785, 184], [785, 681], [785, 651], [785, 529], [785, 784], [785, 244], [785, 738], [785, 198], [785, 178], [785, 400], [785, 92], [785, 177], [785, 213], [785, 190], [785, 543], [785, 644], [785, 732], [785, 565], [785, 257], [785, 643], [785, 633], [785, 335], [785, 158], [785, 50], [785, 632], [785, 622], [785, 733], [785, 458], [785, 712], [786, 736], [786, 750], [786, 641], [786, 578], [786, 764], [786, 573], [787, 774], [787, 778], [787, 781], [788, 787], [789, 785], [790, 783], [793, 6], [793, 75], [793, 223], [794, 793], [795, 16], [795, 38], [795, 27], [796, 158], [796, 50], [796, 184], [796, 78], [796, 198], [796, 178], [796, 92], [796, 177], [796, 213], [796, 190], [796, 795], [797, 38], [797, 27], [797, 16], [798, 184], [798, 198], [798, 178], [798, 177], [798, 190], [798, 78], [798, 797], [798, 158], [798, 50], [798, 92], [798, 213], [799, 798], [800, 38], [800, 27], [800, 16], [801, 184], [801, 78], [801, 198], [801, 178], [801, 92], [801, 177], [801, 213], [801, 190], [801, 158], [801, 50], [801, 800], [802, 801], [804, 803], [805, 38], [805, 27], [805, 16], [806, 198], [806, 178], [806, 92], [806, 177], [806, 213], [806, 190], [806, 158], [806, 50], [806, 184], [806, 805], [806, 78], [807, 6], [807, 75], [807, 223], [808, 796], [809, 799], [810, 804], [812, 806], [815, 27], [815, 16], [815, 38], [817, 815], [819, 38], [819, 27], [819, 16], [820, 177], [820, 78], [820, 198], [820, 178], [820, 819], [820, 158], [820, 92], [820, 213], [820, 190], [820, 50], [820, 184], [821, 38], [821, 27], [821, 16], [822, 198], [822, 178], [822, 92], [822, 177], [822, 213], [822, 190], [822, 158], [822, 50], [822, 821], [822, 184], [822, 78], [823, 223], [823, 6], [823, 75], [825, 823], [826, 822], [827, 820], [832, 4], [833, 3], [834, 2], [835, 0], [836, 76], [836, 222], [836, 827], [836, 575], [836, 120], [836, 790]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_456F00", "query": "\n\n\n__int64 __fastcall sub_456F00(__int64 a1, unsigned int a2, __int64 a3, __int64 a4, int a5, int a6)\n{\nint v6; // er8\nint v7; // er9\n__int64 result; // rax\nint v9; // er9\nunsigned int v10; // eax\n__int64 v11; // rcx\n__int64 v12; // rdx\nconst char *v13; // rcx\n__int64 v14; // rcx\nint *v15; // rax\n__int64 v16; // rdx\nint v17; // er9\nconst char *v18; // rsi\nint v19; // edx\nconst char *v20; // rsi\nconst char *v21; // rdx\n__int64 *v22; // rcx\n__int64 v23; // rdx\nint *v24; // rcx\n__int64 v25; // rdx\n__int64 v26; // rcx\n__int64 v27; // rdx\nint v28; // ecx\nint v29; // er8\nint v30; // er9\n__int64 v31; // rbx\nint v32; // er12\nunsigned int v33; // eax\nunsigned int v35; // [rsp+14h] [rbp-B5Ch]\nunsigned int v36; // [rsp+14h] [rbp-B5Ch]\nchar v37[48]; // [rsp+20h] [rbp-B50h] BYREF\n_QWORD v38[2]; // [rsp+50h] [rbp-B20h] BYREF\n__int64 v39; // [rsp+60h] [rbp-B10h] BYREF\n__int64 v40; // [rsp+68h] [rbp-B08h]\nint v41[682]; // [rsp+70h] [rbp-B00h] BYREF\n_QWORD *v42; // [rsp+B18h] [rbp-58h]\n__int64 v43; // [rsp+B20h] [rbp-50h]\n_BOOL4 v44; // [rsp+B2Ch] [rbp-44h]\n__int64 v45; // [rsp+B30h] [rbp-40h]\nunsigned int j; // [rsp+B3Ch] [rbp-34h]\nint v47; // [rsp+B40h] [rbp-30h]\n_BOOL4 v48; // [rsp+B44h] [rbp-2Ch]\nint v49; // [rsp+B48h] [rbp-28h]\nunsigned int i; // [rsp+B4Ch] [rbp-24h]\n__int64 v51; // [rsp+B50h] [rbp-20h]\n__int64 v52; // [rsp+B58h] [rbp-18h]\n_DWORD v53[4]; // [rsp+B60h] [rbp-10h] BYREF\n\nv35 = a2;\nv45 = a1;\nv51 = 0LL;\nif ( *(_DWORD *)a1 == 33 )\n{\nv52 = v45;\nv51 = 0LL;\n}\nelse if ( *(_DWORD *)v45 == 1 )\n{\nv51 = v45;\nv52 = *(_QWORD *)(v45 + 8);\n}\nelse\n{\nif ( *(_DWORD *)v45 != 28 )\n__assert_fail(\"!\\\"Unexpected user data!\\\"\", \"../src/pjlib-util/srv_resolver.c\", 0x240u, \"dns_callback\");\nv51 = v45 - 4;\nv52 = *(_QWORD *)(v45 - 4 + 8);\n}\nif ( *(_DWORD *)(v52 + 16) == 33 )\n{\n*(_QWORD *)(v52 + 40) = 0LL;\nif ( a2 )\n{\n*(_DWORD *)(v52 + 56) = a2;\na1 = a2;\nsub_481E70(a2, v38, 80LL);\nif ( (int)sub_4848D6(a2) > 3 )\n{\na1 = *(_QWORD *)(v52 + 8);\nsub_48524A(\na1,\n(unsigned int)\"DNS SRV resolution failed for %.*s: %s\",\n*(_QWORD *)(v52 + 72),\n*(_QWORD *)(v52 + 64),\n(unsigned int)v38,\nv9);\n}\nresult = *(_DWORD *)(v52 + 60) & 3;\nif ( !(_DWORD)result )\ngoto LABEL_105;\n}\nelse\n{\nif ( (*(_WORD *)(a3 + 2) & 0x200) != 0 )\n{\nif ( (int)sub_4848D6(a1) > 3 )\nsub_48524A(\n*(_QWORD *)(v52 + 8),\n(unsigned int)\"Discard truncated DNS SRV response for %.*s\",\n*(_QWORD *)(v52 + 72),\n*(_QWORD *)(v52 + 64),\nv6,\nv7);\nv35 = 70020;\nresult = v52;\n*(_DWORD *)(v52 + 56) = 70020;\nLABEL_105:\nif ( v35 )\n{\nv31 = *(_QWORD *)(v52 + 80);\nv32 = *(_QWORD *)(v52 + 88);\nv33 = (unsigned int)sub_44CCCE(*(_DWORD *)(v52 + 16));\nsub_482464(\n*(_QWORD *)(v52 + 8),\nv35,\n(unsigned int)\"DNS %s record resolution error for '%.*s'.\",\nv33,\nv32,\nv31);\nsub_455C64(v52, 0);\nresult = (*(__int64 (__fastcall **)(_QWORD, _QWORD, _QWORD))(v52 + 48))(*(_QWORD *)(v52 + 32), v35, 0LL);\n}\nreturn result;\n}\nif ( *(_WORD *)(a3 + 6) )\n{\na1 = v52;\nsub_455DB0(v52, a3);\n}\n}\nif ( !*(_DWORD *)(v52 + 100) && *(__int64 *)(v52 + 88) > 0 )\n{\nv49 = 0;\nif ( (int)sub_4848D6(a1) > 3 )\nsub_48524A(\n*(_QWORD *)(v52 + 8),\n(unsigned int)\"DNS SRV resolution failed for %.*s, trying resolving A/AAAA record for %.*s\",\n*(_QWORD *)(v52 + 72),\n*(_QWORD *)(v52 + 64),\n*(_QWORD *)(v52 + 88),\n*(_QWORD *)(v52 + 80));\nv10 = *(_DWORD *)(v52 + 100);\n*(_DWORD *)(v52 + 100) = v10 + 1;\ni = v10;\na1 = 562LL * v10 + 96 + v52 + 8;\nsub_455937((void *)a1, 0x232uLL);\nv11 = v52 + 562LL * i + 112;\nv12 = *(_QWORD *)(v52 + 88);\n*(_QWORD *)(v11 + 8) = *(_QWORD *)(v52 + 80);\n*(_QWORD *)(v11 + 16) = v12;\n*(_DWORD *)(v52 + 562LL * i + 426) = 0;\n*(_DWORD *)(v52 + 562LL * i + 430) = 0;\n*(_WORD *)(v52 + 562LL * i + 424) = *(_WORD *)(v52 + 96);\nif ( (*(_DWORD *)(v52 + 60) & 2) != 0 )\nv49 |= 0xCu;\nif ( (*(_DWORD *)(v52 + 60) & 1) != 0 )\nv49 &= 0xFFFFFFF7;\n*(_DWORD *)(v52 + 60) = v49;\n}\nif ( *(_DWORD *)(v52 + 4600) != *(_DWORD *)(v52 + 100) )\n{\nresult = sub_456D09(v52);\nv35 = result;\nif ( !(_DWORD)result )\nreturn result;\ngoto LABEL_105;\n}\n}\nelse\n{\nif ( *(_DWORD *)(v52 + 16) != 1 )\n__assert_fail(\"!\\\"Unexpected state!\\\"\", \"../src/pjlib-util/srv_resolver.c\", 0x316u, \"dns_callback\");\nv40 = 0LL;\nv41[0] = 0;\nif ( *(_DWORD *)v45 == 1 )\n{\nv48 = *(_QWORD *)(v51 + 40) == 0LL;\n*(_QWORD *)(v51 + 32) = 0LL;\n}\nelse\n{\nif ( *(_DWORD *)v45 != 28 )\n__assert_fail(\"!\\\"Unexpected job type\\\"\", \"../src/pjlib-util/srv_resolver.c\", 0x2BAu, \"dns_callback\");\nv48 = *(_QWORD *)(v51 + 32) == 0LL;\n*(_QWORD *)(v51 + 40) = 0LL;\n}\nv44 = *(_DWORD *)v45 == 1;\nif ( !a2 )\n{\nif ( *(_WORD *)(a3 + 6) )\n{\na1 = a3;\nv35 = sub_4523F7(a3, v38);\nif ( v35 )\n{\nif ( v44 )\nv13 = \"A\";\nelse\nv13 = \"AAAA\";\na1 = *(_QWORD *)(v52 + 8);\nsub_482464(\na1,\nv35,\n(unsigned int)\"DNS %s record parse error for '%.*s'.\",\n(_DWORD)v13,\n*(_QWORD *)(v52 + 88),\n*(_QWORD *)(v52 + 80));\n}\n}\n}\nif ( v35 || !*(_WORD *)(a3 + 6) )\n{\nif ( v35 )\n{\n*(_DWORD *)(v52 + 56) = v35;\nif ( v44 )\nv21 = \"A\";\nelse\nv21 = \"AAAA\";\na1 = *(_QWORD *)(v52 + 8);\nsub_482464(a1, v35, (unsigned int)\"DNS %s record resolution failed\", (_DWORD)v21, a5, a6);\n}\n}\nelse\n{\nif ( !v41[0] )\n__assert_fail(\"rec.addr_count != 0\", \"../src/pjlib-util/srv_resolver.c\", 0x2D1u, \"dns_callback\");\nif ( !*(_QWORD *)(v51 + 184) && v40 )\n{\nif ( v40 > 128 )\n__assert_fail(\n\"rec.alias.slen <= (int)sizeof(srv->cname_buf)\",\n\"../src/pjlib-util/srv_resolver.c\",\n0x2D5u,\n\"dns_callback\");\n*(_QWORD *)(v51 + 176) = v51 + 192;\na1 = v51 + 176;\nsub_489677(v51 + 176, &v39);\n}\nfor ( i = 0; i < v41[0] && *(_DWORD *)(v51 + 334) <= 7u; ++i )\n{\nv47 = 0;\nif ( v44 && v53[5 * i - 699] == 2 )\n{\na1 = 2LL;\nsub_48700F(2LL, 28LL * *(unsigned int *)(v51 + 334) + 336 + v51 + 2, 0LL, *(unsigned __int16 *)(v51 + 320));\n*(_DWORD *)(v51 + 28LL * *(unsigned int *)(v51 + 334) + 342) = v53[5 * i - 698];\nv47 = 1;\n}\nelse if ( v44 || v53[5 * i - 699] != 10 )\n{\nif ( (int)sub_4848D6(a1) > 3 )\n{\nif ( v44 )\nv18 = \"A\";\nelse\nv18 = \"AAAA\";\na1 = *(_QWORD *)(v52 + 8);\nsub_48524A(\na1,\n(unsigned int)\"Bad address family in DNS %s query for %.*s\",\n(_DWORD)v18,\n*(_QWORD *)(v51 + 24),\n*(_QWORD *)(v51 + 16),\nv17);\n}\n}\nelse\n{\na1 = 10LL;\nsub_48700F(10LL, 28LL * *(unsigned int *)(v51 + 334) + 336 + v51 + 2, 0LL, *(unsigned __int16 *)(v51 + 320));\nv14 = v51 + 28LL * *(unsigned int *)(v51 + 334) + 336;\nv15 = &v41[5 * i];\nv16 = *((_QWORD *)v15 + 2);\n*(_QWORD *)(v14 + 10) = *((_QWORD *)v15 + 1);\n*(_QWORD *)(v14 + 18) = v16;\nv47 = 1;\n}\nif ( v47 )\n{\nif ( (int)sub_4848D6(a1) > 4 )\n{\nv19 = sub_486B69(28LL * *(unsigned int *)(v51 + 334) + 336 + v51 + 2, v37, 46LL, 2LL);\nif ( v44 )\nv20 = \"A\";\nelse\nv20 = \"AAAA\";\na1 = *(_QWORD *)(v52 + 8);\nsub_4852F5(\na1,\n(unsigned int)\"DNS %s for %.*s: %s\",\n(_DWORD)v20,\n*(_QWORD *)(v51 + 24),\n*(_QWORD *)(v51 + 16),\nv19);\n}\n++*(_DWORD *)(v51 + 334);\n}\n}\n}\nif ( v48 )\n++*(_DWORD *)(v52 + 4600);\n}\nresult = *(unsigned int *)(v52 + 100);\nif ( *(_DWORD *)(v52 + 4600) == (_DWORD)result )\n{\nLODWORD(v38[0]) = 0;\nfor ( i = 0; i < *(_DWORD *)(v52 + 100); ++i )\n{\nv43 = 562LL * i + 96 + v52 + 8;\nv42 = &v38[43 * LODWORD(v38[0]) + 3];\nv53[86 * LODWORD(v38[0]) - 706] = *(_DWORD *)(562LL * i + 96 + v52 + 330);\nv53[86 * LODWORD(v38[0]) - 705] = *(_DWORD *)(v43 + 326);\n*((_WORD *)&v39 + 172 * LODWORD(v38[0])) = *(_WORD *)(v43 + 320);\nv22 = &v39 + 43 * LODWORD(v38[0]);\nv23 = *(_QWORD *)(v43 + 24);\nv22[1] = *(_QWORD *)(v43 + 16);\nv22[2] = v23;\nv24 = &v41[86 * LODWORD(v38[0])];\nv25 = *(_QWORD *)(v43 + 184);\n*((_QWORD *)v24 + 1) = *(_QWORD *)(v43 + 176);\n*((_QWORD *)v24 + 2) = v25;\nv53[86 * LODWORD(v38[0]) - 694] = 0;\nif ( *(_DWORD *)(v43 + 334) > 8u )\n__assert_fail(\"srv2->addr_cnt <= 8\", \"../src/pjlib-util/srv_resolver.c\", 0x32Eu, \"dns_callback\");\nfor ( j = 0; j < *(_DWORD *)(v43 + 334); ++j )\n{\n*((_DWORD *)v42 + 5 * j + 9) = *(unsigned __int16 *)(v43 + 28LL * j + 338);\nif ( *((_DWORD *)v42 + 5 * j + 9) == 2 )\n{\n*((_DWORD *)v42 + 5 * j + 10) = *(_DWORD *)(v43 + 28LL * j + 342);\n}\nelse\n{\nv26 = (__int64)v42 + 20 * j + 32;\nv27 = *(_QWORD *)(v43 + 28LL * j + 354);\n*(_QWORD *)(v26 + 8) = *(_QWORD *)(v43 + 28LL * j + 346);\n*(_QWORD *)(v26 + 16) = v27;\n}\n++*((_DWORD *)v42 + 8);\n}\nif ( *(_DWORD *)(v43 + 334) )\n{\nif ( ++LODWORD(v38[0]) == 8 )\nbreak;\n}\n}\nif ( (int)sub_4848D6(a1) > 4 )\nsub_4852F5(\n*(_QWORD *)(v52 + 8),\n(unsigned int)\"Server resolution complete, %d server entry(s) found\",\nv38[0],\nv28,\nv29,\nv30);\nif ( LODWORD(v38[0]) )\n{\nv36 = 0;\n}\nelse\n{\nv36 = *(_DWORD *)(v52 + 56);\nif ( !v36 )\nv36 = 320047;\n}\nresult = (*(__int64 (__fastcall **)(_QWORD, _QWORD, _QWORD *))(v52 + 48))(*(_QWORD *)(v52 + 32), v36, v38);\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v36,v37,v38,v42,v43,v44,v45,v47,v48,v49,v51,v52,sub_456F00,sub_481E70,sub_4848D6,sub_48524A,sub_44CCCE,sub_482464,sub_455C64,sub_455DB0,sub_455937,sub_456D09,sub_4523F7,sub_489677,sub_48700F,sub_486B69,sub_4852F5,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'pkt', 'a1': 'user_data', 'a2': 'status', 'v36': 'statusb', 'v37': 'addr', 'v38': 'srv_rec', 'v42': 's', 'v43': 'srv2', 'v44': 'is_type_a', 'v45': 'common', 'v47': 'added', 'v48': 'srv_completed', 'v49': 'new_option', 'v51': 'srv', 'v52': 'query_job', 'sub_456F00': 'dns_callback', 'sub_481E70': 'pj_strerror', 'sub_4848D6': 'pj_log_get_level', 'sub_48524A': 'pj_log_4', 'sub_44CCCE': 'pj_dns_get_type_name', 'sub_482464': 'pj_perror_4', 'sub_455C64': 'pj_dns_srv_cancel_query', 'sub_455DB0': 'build_server_entries', 'sub_455937': 'pj_bzero_19', 'sub_456D09': 'resolve_hostnames', 'sub_4523F7': 'pj_dns_parse_addr_response', 'sub_489677': 'pj_strcpy', 'sub_48700F': 'pj_sockaddr_init', 'sub_486B69': 'pj_sockaddr_print', 'sub_4852F5': 'pj_log_5'}"} |
|
mesh_load_app_keys | 0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb | bluekitchen | btstack | NA | void mesh_load_app_keys(void){
printf("Load App Keys\n");
uint16_t internal_index;
for (internal_index = 0; internal_index < MAX_NR_MESH_TRANSPORT_KEYS; internal_index++){
mesh_persistent_app_key_t data;
uint32_t tag = mesh_transport_key_tag_for_internal_index(internal_index);
int app_key_len = btstack_tlv_singleton_impl->get_tag(btstack_tlv_singleton_context, tag, (uint8_t *) &data, sizeof(data));
if (app_key_len == 0) continue;
mesh_transport_key_t * key = btstack_memory_mesh_transport_key_get();
if (key == NULL) return;
key->internal_index = internal_index;
key->appkey_index = data.appkey_index;
key->netkey_index = data.netkey_index;
key->aid = data.aid;
key->akf = 1;
key->version = data.version;
(void)memcpy(key->key, data.key, 16);
mesh_transport_key_add(key);
printf("- internal index 0x%x, AppKey Index 0x%06x, AID %02x: ", key->internal_index, key->appkey_index, key->aid);
printf_hexdump(key->key, 16);
// dump into packet log
mesh_log_key("mesh-appkey", key->appkey_index, key->key);
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_437A71", "function_addr": 4422257, "binary_name": "0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov edi, offset aLoadAppKeys"], [4, "call _puts"], [5, "mov [rbp+var_2], 0"], [6, "jmp loc_437BB9"], [7, "movzx eax, [rbp+var_2]"], [8, "mov edi, eax"], [9, "call sub_43793B"], [10, "mov [rbp+var_8], eax"], [11, "mov rax, cs:qword_48B440"], [12, "mov r8, [rax]"], [13, "mov rax, cs:qword_48B448"], [14, "lea rdx, [rbp+var_30]"], [15, "mov esi, [rbp+var_8]"], [16, "mov ecx, 16h"], [17, "mov rdi, rax"], [18, "call r8"], [19, "mov [rbp+var_C], eax"], [20, "cmp [rbp+var_C], 0"], [21, "jz loc_437BAD"], [22, "call sub_409FC6"], [23, "mov [rbp+var_18], rax"], [24, "cmp [rbp+var_18], 0"], [25, "jz loc_437BC6"], [26, "mov rax, [rbp+var_18]"], [27, "movzx edx, [rbp+var_2]"], [28, "mov [rax+8], dx"], [29, "movzx edx, [rbp+var_2E]"], [30, "mov rax, [rbp+var_18]"], [31, "mov [rax+0Ch], dx"], [32, "movzx edx, [rbp+var_30]"], [33, "mov rax, [rbp+var_18]"], [34, "mov [rax+0Ah], dx"], [35, "movzx edx, [rbp+var_2C]"], [36, "mov rax, [rbp+var_18]"], [37, "mov [rax+21h], dl"], [38, "mov rax, [rbp+var_18]"], [39, "mov byte ptr [rax+20h], 1"], [40, "movzx edx, [rbp+var_2B]"], [41, "mov rax, [rbp+var_18]"], [42, "mov [rax+1Eh], dl"], [43, "mov rax, [rbp+var_18]"], [44, "lea rcx, [rax+0Eh]"], [45, "mov rax, [rbp+var_2A]"], [46, "mov rdx, [rbp+var_22]"], [47, "mov [rcx], rax"], [48, "mov [rcx+8], rdx"], [49, "mov rax, [rbp+var_18]"], [50, "mov rdi, rax"], [51, "call sub_448697"], [52, "mov rax, [rbp+var_18]"], [53, "movzx eax, byte ptr [rax+21h]"], [54, "movzx ecx, al"], [55, "mov rax, [rbp+var_18]"], [56, "movzx eax, word ptr [rax+0Ch]"], [57, "movzx edx, ax"], [58, "mov rax, [rbp+var_18]"], [59, "movzx eax, word ptr [rax+8]"], [60, "movzx eax, ax"], [61, "mov esi, eax"], [62, "mov edi, offset aInternalIndex0_0"], [63, "mov eax, 0"], [64, "call _printf"], [65, "mov rax, [rbp+var_18]"], [66, "add rax, 0Eh"], [67, "mov esi, 10h"], [68, "mov rdi, rax"], [69, "call sub_40B793"], [70, "mov rax, [rbp+var_18]"], [71, "lea rdx, [rax+0Eh]"], [72, "mov rax, [rbp+var_18]"], [73, "movzx eax, word ptr [rax+0Ch]"], [74, "movzx eax, ax"], [75, "mov esi, eax"], [76, "mov edi, offset aMeshAppkey"], [77, "call sub_4366E1"], [78, "jmp short loc_437BAE"], [79, "nop"], [80, "movzx eax, [rbp+var_2]"], [81, "add eax, 1"], [82, "mov [rbp+var_2], ax"], [83, "cmp [rbp+var_2], 0Fh"], [84, "jbe loc_437A8E"], [85, "jmp short locret_437BC7"], [86, "nop"], [87, "leave"], [88, "retn"]], "data_dep": [[7, 5], [7, 82], [8, 7], [10, 9], [12, 34], [12, 47], [12, 31], [12, 42], [12, 28], [12, 37], [12, 39], [12, 48], [12, 11], [14, 14], [14, 71], [15, 10], [17, 13], [18, 12], [19, 18], [20, 19], [21, 20], [23, 22], [24, 23], [25, 24], [26, 23], [27, 5], [27, 82], [28, 27], [28, 26], [30, 23], [31, 29], [31, 30], [33, 23], [34, 32], [34, 33], [36, 23], [37, 35], [37, 36], [38, 23], [39, 38], [41, 23], [42, 41], [42, 40], [43, 23], [44, 42], [44, 16], [44, 43], [47, 45], [47, 44], [48, 44], [48, 46], [49, 23], [50, 49], [52, 23], [53, 48], [53, 52], [53, 37], [54, 53], [55, 23], [56, 55], [56, 48], [56, 31], [57, 56], [58, 23], [59, 48], [59, 28], [59, 58], [60, 59], [61, 60], [65, 23], [66, 65], [68, 66], [70, 23], [71, 48], [71, 57], [71, 70], [72, 23], [73, 48], [73, 72], [73, 31], [74, 73], [75, 74], [80, 5], [80, 82], [81, 80], [82, 81], [83, 5], [83, 82], [84, 83], [88, 22], [88, 81], [88, 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/0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb_0ff09a6678d875865561285529f4a87fc76d534ba1c187a87edb15f084bca6bb.jsonl.gz", "strip_func_name": "sub_437A71", "query": "\n\n\nint sub_437A71()\n{\nchar *v0; // rax\nchar *v1; // rcx\n__int64 v2; // rdx\n__int16 v4[2]; // [rsp+0h] [rbp-30h] BYREF\nchar v5; // [rsp+4h] [rbp-2Ch]\nchar v6; // [rsp+5h] [rbp-2Bh]\n__int64 v7; // [rsp+6h] [rbp-2Ah]\n__int64 v8; // [rsp+Eh] [rbp-22h]\nchar *v9; // [rsp+18h] [rbp-18h]\nunsigned int v11; // [rsp+28h] [rbp-8h]\nunsigned __int16 i; // [rsp+2Eh] [rbp-2h]\n\nLODWORD(v0) = puts(\"Load App Keys\");\nfor ( i = 0; i <= 0xFu; ++i )\n{\nv11 = sub_43793B(i);\nif ( (*(unsigned int (__fastcall **)(__int64, _QWORD, __int16 *, __int64))qword_48B440)(qword_48B448, v11, v4, 22LL) )\n{\nv0 = (char *)sub_409FC6();\nv9 = v0;\nif ( !v0 )\nreturn (int)v0;\n*((_WORD *)v9 + 4) = i;\n*((_WORD *)v9 + 6) = v4[1];\n*((_WORD *)v9 + 5) = v4[0];\nv9[33] = v5;\nv9[32] = 1;\nv9[30] = v6;\nv1 = v9 + 14;\nv2 = v8;\n*(_QWORD *)(v9 + 14) = v7;\n*((_QWORD *)v1 + 1) = v2;\nsub_448697(v9);\nprintf(\n\"- internal index 0x%x, AppKey Index 0x%06x, AID %02x: \",\n*((unsigned __int16 *)v9 + 4),\n*((unsigned __int16 *)v9 + 6),\n(unsigned __int8)v9[33]);\nsub_40B793((__int64)(v9 + 14), 16);\nsub_4366E1(\"mesh-appkey\", *((_WORD *)v9 + 6), (__int64)(v9 + 14));\n}\nLODWORD(v0) = i + 1;\n}\nreturn (int)v0;\n}\n\n\n\nQ:[v4,v9,v11,i,sub_437A71,sub_43793B,sub_409FC6,sub_448697,sub_40B793,sub_4366E1,]\nAssistant: ", "hints": "[]", "response": "{'v4': 'data', 'v9': 'key', 'v11': 'tag', 'i': 'internal_index', 'sub_437A71': 'mesh_load_app_keys', 'sub_43793B': 'mesh_transport_key_tag_for_internal_index', 'sub_409FC6': 'btstack_memory_mesh_transport_key_get', 'sub_448697': 'mesh_transport_key_add', 'sub_40B793': 'printf_hexdump', 'sub_4366E1': 'mesh_log_key'}"} |
|
_int128_mult64 | 4c4a7b43cd86f336e7e472c4751124b00439a5223535ac8006f9c77515d99121 | robertdavidgraham | masscan | NA | static inline massint128_t
_int128_mult64(massint128_t lhs, uint64_t rhs)
{
massint128_t result = {0,0};
uint64_t x;
uint64_t b;
uint64_t a;
/* low-order 32 */
a = (rhs>>0) & 0xFFFFFFFFULL;
b = (lhs.lo>>0) & 0xFFFFFFFFULL;
x = (a * b);
result.lo += x;
b = (lhs.lo>>32ULL) & 0xFFFFFFFFULL;
x = (a * b);
result.lo += x<<32ULL;
result.hi += x>>32ULL;
b = lhs.hi;
x = (a * b);
result.hi += x;
/* next 32 */
a = (rhs>>32ULL) & 0xFFFFFFFFULL;
b = (lhs.lo>>0ULL) & 0xFFFFFFFFULL;
x = (a * b);
result.lo += x<<32ULL;
result.hi += (x>>32ULL) + (result.lo < (x<<32ULL));
b = (lhs.lo>>32ULL) & 0xFFFFFFFFULL;
x = (a * b);
result.hi += x;
b = lhs.hi;
x = (a * b);
result.hi += x<<32ULL;
return result;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41BF82", "function_addr": 4308866, "binary_name": "4c4a7b43cd86f336e7e472c4751124b00439a5223535ac8006f9c77515d99121.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push rbx"], [3, "mov rcx, rdi"], [4, "mov rax, rsi"], [5, "mov rbx, rax"], [6, "mov [rbp+var_50], rcx"], [7, "mov [rbp+var_48], rbx"], [8, "mov [rbp+var_58], rdx"], [9, "mov [rbp+var_40], 0"], [10, "mov [rbp+var_38], 0"], [11, "mov rax, [rbp+var_58]"], [12, "mov eax, eax"], [13, "mov [rbp+var_18], rax"], [14, "mov rax, [rbp+var_48]"], [15, "and eax, 0FFFFFFFFh"], [16, "mov [rbp+var_20], rax"], [17, "mov rax, [rbp+var_18]"], [18, "imul rax, [rbp+var_20]"], [19, "mov [rbp+var_28], rax"], [20, "mov rdx, [rbp+var_38]"], [21, "mov rax, [rbp+var_28]"], [22, "add rax, rdx"], [23, "mov [rbp+var_38], rax"], [24, "mov rax, [rbp+var_48]"], [25, "shr rax, 20h"], [26, "mov [rbp+var_20], rax"], [27, "mov rax, [rbp+var_18]"], [28, "imul rax, [rbp+var_20]"], [29, "mov [rbp+var_28], rax"], [30, "mov rdx, [rbp+var_38]"], [31, "mov rax, [rbp+var_28]"], [32, "shl rax, 20h"], [33, "add rax, rdx"], [34, "mov [rbp+var_38], rax"], [35, "mov rdx, [rbp+var_40]"], [36, "mov rax, [rbp+var_28]"], [37, "shr rax, 20h"], [38, "add rax, rdx"], [39, "mov [rbp+var_40], rax"], [40, "mov rax, [rbp+var_50]"], [41, "mov [rbp+var_20], rax"], [42, "mov rax, [rbp+var_18]"], [43, "imul rax, [rbp+var_20]"], [44, "mov [rbp+var_28], rax"], [45, "mov rdx, [rbp+var_40]"], [46, "mov rax, [rbp+var_28]"], [47, "add rax, rdx"], [48, "mov [rbp+var_40], rax"], [49, "mov rax, [rbp+var_58]"], [50, "shr rax, 20h"], [51, "mov [rbp+var_18], rax"], [52, "mov rax, [rbp+var_48]"], [53, "and eax, 0FFFFFFFFh"], [54, "mov [rbp+var_20], rax"], [55, "mov rax, [rbp+var_18]"], [56, "imul rax, [rbp+var_20]"], [57, "mov [rbp+var_28], rax"], [58, "mov rdx, [rbp+var_38]"], [59, "mov rax, [rbp+var_28]"], [60, "shl rax, 20h"], [61, "add rax, rdx"], [62, "mov [rbp+var_38], rax"], [63, "mov rcx, [rbp+var_40]"], [64, "mov rax, [rbp+var_28]"], [65, "shr rax, 20h"], [66, "mov rsi, rax"], [67, "mov rax, [rbp+var_38]"], [68, "mov rdx, [rbp+var_28]"], [69, "shl rdx, 20h"], [70, "cmp rax, rdx"], [71, "setb al"], [72, "movzx eax, al"], [73, "add rax, rsi"], [74, "add rax, rcx"], [75, "mov [rbp+var_40], rax"], [76, "mov rax, [rbp+var_48]"], [77, "shr rax, 20h"], [78, "mov [rbp+var_20], rax"], [79, "mov rax, [rbp+var_18]"], [80, "imul rax, [rbp+var_20]"], [81, "mov [rbp+var_28], rax"], [82, "mov rdx, [rbp+var_40]"], [83, "mov rax, [rbp+var_28]"], [84, "add rax, rdx"], [85, "mov [rbp+var_40], rax"], [86, "mov rax, [rbp+var_50]"], [87, "mov [rbp+var_20], rax"], [88, "mov rax, [rbp+var_18]"], [89, "imul rax, [rbp+var_20]"], [90, "mov [rbp+var_28], rax"], [91, "mov rdx, [rbp+var_40]"], [92, "mov rax, [rbp+var_28]"], [93, "shl rax, 20h"], [94, "add rax, rdx"], [95, "mov [rbp+var_40], rax"], [96, "mov rax, [rbp+var_40]"], [97, "mov rdx, [rbp+var_38]"], [98, "mov rbx, [rbp+var_8]"], [99, "leave"], [100, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 5], [11, 8], [12, 11], [13, 12], [14, 7], [15, 14], [16, 15], [17, 13], [18, 17], [18, 16], [19, 18], [20, 10], [21, 19], [22, 21], [22, 20], [23, 22], [24, 7], [25, 24], [26, 25], [27, 13], [28, 27], [28, 26], [29, 28], [30, 23], [31, 29], [32, 31], [33, 30], [33, 32], [34, 33], [35, 9], [36, 29], [37, 36], [38, 35], [38, 37], [39, 38], [40, 6], [41, 40], [42, 13], [43, 41], [43, 42], [44, 43], [45, 39], [46, 44], [47, 45], [47, 46], [48, 47], [49, 8], [50, 49], [51, 50], [52, 7], [53, 52], [54, 53], [55, 51], [56, 55], [56, 54], [57, 56], [58, 34], [59, 57], [60, 59], [61, 58], [61, 60], [62, 61], [63, 48], [64, 57], [65, 64], [66, 65], [67, 62], [68, 57], [69, 68], [70, 67], [70, 69], [71, 67], [71, 70], [72, 71], [73, 66], [73, 72], [74, 73], [74, 63], [75, 74], [76, 7], [77, 76], [78, 77], [79, 51], [80, 78], [80, 79], [81, 80], [82, 75], [83, 81], [84, 83], [84, 82], [85, 84], [86, 6], [87, 86], [88, 51], [89, 88], [89, 87], [90, 89], [91, 85], [92, 90], [93, 92], [94, 91], [94, 93], [95, 94], [96, 95], [97, 62], [100, 96]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4c4a7b43cd86f336e7e472c4751124b00439a5223535ac8006f9c77515d99121_4c4a7b43cd86f336e7e472c4751124b00439a5223535ac8006f9c77515d99121.jsonl.gz", "strip_func_name": "sub_41BF82", "query": "\n\n\nunsigned __int64 __fastcall sub_41BF82(__int64 a1, unsigned __int64 a2, unsigned __int64 a3)\n{\nreturn ((HIDWORD(a2) * (unsigned int)a3) >> 32)\n+ a1 * (unsigned int)a3\n+ (((unsigned int)a2 * HIDWORD(a3)) >> 32)\n+ ((unsigned int)a2 * (unsigned __int64)(unsigned int)a3\n+ ((HIDWORD(a2) * (unsigned int)a3) << 32)\n+ (((unsigned int)a2 * HIDWORD(a3)) << 32) < ((unsigned int)a2 * HIDWORD(a3)) << 32)\n+ HIDWORD(a2) * HIDWORD(a3)\n+ ((a1 * HIDWORD(a3)) << 32);\n}\n\n\n\nQ:[a3,a1,sub_41BF82,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'rhs', 'a1': 'lhs', 'sub_41BF82': '_int128_mult64'}"} |
|
leading_pad | 07d5f0a7dd34ad0b369201e3ba5f71beb97baab12b2e358b74a3a83fbd920a70 | sraoss | pgsql-ivm | NA | static void
leading_pad(int zpad, int signvalue, int *padlen, PrintfTarget *target)
{
int maxpad;
if (*padlen > 0 && zpad)
{
if (signvalue)
{
dopr_outch(signvalue, target);
--(*padlen);
signvalue = 0;
}
if (*padlen > 0)
{
dopr_outchmulti(zpad, *padlen, target);
*padlen = 0;
}
}
maxpad = (signvalue != 0);
if (*padlen > maxpad)
{
dopr_outchmulti(' ', *padlen - maxpad, target);
*padlen = maxpad;
}
if (signvalue)
{
dopr_outch(signvalue, target);
if (*padlen > 0)
--(*padlen);
else if (*padlen < 0)
++(*padlen);
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40D239", "function_addr": 4248121, "binary_name": "07d5f0a7dd34ad0b369201e3ba5f71beb97baab12b2e358b74a3a83fbd920a70.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_14], edi"], [4, "mov [rbp+var_18], esi"], [5, "mov [rbp+var_20], rdx"], [6, "mov [rbp+var_28], rcx"], [7, "mov rax, [rbp+var_20]"], [8, "mov eax, [rax]"], [9, "test eax, eax"], [10, "jle short loc_40D2B6"], [11, "cmp [rbp+var_14], 0"], [12, "jz short loc_40D2B6"], [13, "cmp [rbp+var_18], 0"], [14, "jz short loc_40D28C"], [15, "mov rdx, [rbp+var_28]"], [16, "mov eax, [rbp+var_18]"], [17, "mov rsi, rdx"], [18, "mov edi, eax"], [19, "call sub_40D073"], [20, "mov rax, [rbp+var_20]"], [21, "mov eax, [rax]"], [22, "lea edx, [rax-1]"], [23, "mov rax, [rbp+var_20]"], [24, "mov [rax], edx"], [25, "mov [rbp+var_18], 0"], [26, "mov rax, [rbp+var_20]"], [27, "mov eax, [rax]"], [28, "test eax, eax"], [29, "jle short loc_40D2B6"], [30, "mov rax, [rbp+var_20]"], [31, "mov ecx, [rax]"], [32, "mov rdx, [rbp+var_28]"], [33, "mov eax, [rbp+var_14]"], [34, "mov esi, ecx"], [35, "mov edi, eax"], [36, "call sub_40D0E8"], [37, "mov rax, [rbp+var_20]"], [38, "mov dword ptr [rax], 0"], [39, "cmp [rbp+var_18], 0"], [40, "setnz al"], [41, "movzx eax, al"], [42, "mov [rbp+var_4], eax"], [43, "mov rax, [rbp+var_20]"], [44, "mov eax, [rax]"], [45, "cmp [rbp+var_4], eax"], [46, "jge short loc_40D2F0"], [47, "mov rax, [rbp+var_20]"], [48, "mov eax, [rax]"], [49, "sub eax, [rbp+var_4]"], [50, "mov rdx, [rbp+var_28]"], [51, "mov esi, eax"], [52, "mov edi, 20h "], [53, "call sub_40D0E8"], [54, "mov rax, [rbp+var_20]"], [55, "mov edx, [rbp+var_4]"], [56, "mov [rax], edx"], [57, "cmp [rbp+var_18], 0"], [58, "jz short loc_40D33B"], [59, "mov rdx, [rbp+var_28]"], [60, "mov eax, [rbp+var_18]"], [61, "mov rsi, rdx"], [62, "mov edi, eax"], [63, "call sub_40D073"], [64, "mov rax, [rbp+var_20]"], [65, "mov eax, [rax]"], [66, "test eax, eax"], [67, "jle short loc_40D322"], [68, "mov rax, [rbp+var_20]"], [69, "mov eax, [rax]"], [70, "lea edx, [rax-1]"], [71, "mov rax, [rbp+var_20]"], [72, "mov [rax], edx"], [73, "jmp short loc_40D33B"], [74, "mov rax, [rbp+var_20]"], [75, "mov eax, [rax]"], [76, "test eax, eax"], [77, "jns short loc_40D33B"], [78, "mov rax, [rbp+var_20]"], [79, "mov eax, [rax]"], [80, "lea edx, [rax+1]"], [81, "mov rax, [rbp+var_20]"], [82, "mov [rax], edx"], [83, "nop"], [84, "leave"], [85, "retn"]], "data_dep": [[7, 5], [8, 7], [9, 8], [10, 9], [11, 3], [12, 11], [13, 4], [14, 13], [15, 6], [16, 4], [17, 15], [18, 16], [20, 5], [21, 20], [22, 21], [22, 15], [23, 5], [24, 23], [24, 22], [26, 5], [27, 24], [27, 26], [28, 27], [29, 28], [30, 5], [31, 38], [31, 24], [31, 30], [32, 6], [33, 3], [34, 31], [35, 33], [37, 5], [38, 37], [39, 25], [39, 4], [40, 28], [40, 37], [40, 9], [40, 39], [41, 40], [42, 41], [43, 5], [44, 38], [44, 24], [44, 43], [45, 42], [45, 44], [46, 45], [47, 5], [48, 38], [48, 47], [48, 56], [48, 24], [49, 48], [49, 42], [50, 6], [51, 49], [54, 5], [55, 42], [56, 55], [56, 54], [57, 4], [57, 25], [58, 57], [59, 6], [60, 25], [60, 4], [61, 59], [62, 60], [64, 5], [65, 38], [65, 56], [65, 24], [65, 64], [66, 65], [67, 66], [68, 5], [69, 56], [69, 24], [69, 68], [69, 72], [69, 38], [70, 59], [70, 38], [70, 56], [70, 24], [70, 72], [70, 69], [71, 5], [72, 70], [72, 71], [74, 5], [75, 74], [75, 38], [75, 56], [75, 24], [76, 75], [77, 76], [78, 5], [79, 24], [79, 78], [79, 82], [79, 38], [79, 56], [80, 56], [80, 38], [80, 24], [80, 82], [80, 59], [80, 79], [81, 5], [82, 81], [82, 80], [85, 54], [85, 81], [85, 44], [85, 76], [85, 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/07d5f0a7dd34ad0b369201e3ba5f71beb97baab12b2e358b74a3a83fbd920a70_07d5f0a7dd34ad0b369201e3ba5f71beb97baab12b2e358b74a3a83fbd920a70.jsonl.gz", "strip_func_name": "sub_40D239", "query": "\n\n\nint *__fastcall sub_40D239(int a1, int a2, int *a3, __int64 a4)\n{\nint *result; // rax\nint v7; // [rsp+18h] [rbp-18h]\nint v8; // [rsp+2Ch] [rbp-4h]\n\nv7 = a2;\nif ( *a3 > 0 && a1 )\n{\nif ( a2 )\n{\nsub_40D073(a2, a4);\n--*a3;\nv7 = 0;\n}\nif ( *a3 > 0 )\n{\nsub_40D0E8(a1, *a3, a4);\n*a3 = 0;\n}\n}\nv8 = v7 != 0;\nresult = (int *)(unsigned int)*a3;\nif ( v8 < (int)result )\n{\nsub_40D0E8(32, *a3 - v8, a4);\nresult = a3;\n*a3 = v8;\n}\nif ( v7 )\n{\nsub_40D073(v7, a4);\nif ( *a3 <= 0 )\n{\nresult = (int *)(unsigned int)*a3;\nif ( (int)result < 0 )\n{\nresult = a3;\n++*a3;\n}\n}\nelse\n{\nresult = a3;\n--*a3;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v7,v8,sub_40D239,sub_40D073,sub_40D0E8,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'padlen', 'a4': 'target', 'a1': 'zpad', 'a2': 'signvalue', 'v7': 'signvaluea', 'v8': 'maxpad', 'sub_40D239': 'leading_pad', 'sub_40D073': 'dopr_outch', 'sub_40D0E8': 'dopr_outchmulti'}"} |
|
main | f7167de882ee36b3c3272d72626ee6c987dd016fb8829aa797bb17cb6d5627e3 | Akagi201 | ffmpeg-xcode | NA | int main(int argc, char **argv)
{
int64_t src_ch_layout = AV_CH_LAYOUT_STEREO, dst_ch_layout = AV_CH_LAYOUT_SURROUND;
int src_rate = 48000, dst_rate = 44100;
uint8_t **src_data = NULL, **dst_data = NULL;
int src_nb_channels = 0, dst_nb_channels = 0;
int src_linesize, dst_linesize;
int src_nb_samples = 1024, dst_nb_samples, max_dst_nb_samples;
enum AVSampleFormat src_sample_fmt = AV_SAMPLE_FMT_DBL, dst_sample_fmt = AV_SAMPLE_FMT_S16;
const char *dst_filename = NULL;
FILE *dst_file;
int dst_bufsize;
const char *fmt;
struct SwrContext *swr_ctx;
double t;
int ret;
if (argc != 2) {
fprintf(stderr, "Usage: %s output_file\n"
"API example program to show how to resample an audio stream with libswresample.\n"
"This program generates a series of audio frames, resamples them to a specified "
"output format and rate and saves them to an output file named output_file.\n",
argv[0]);
exit(1);
}
dst_filename = argv[1];
dst_file = fopen(dst_filename, "wb");
if (!dst_file) {
fprintf(stderr, "Could not open destination file %s\n", dst_filename);
exit(1);
}
/* create resampler context */
swr_ctx = swr_alloc();
if (!swr_ctx) {
fprintf(stderr, "Could not allocate resampler context\n");
ret = AVERROR(ENOMEM);
goto end;
}
/* set options */
av_opt_set_int(swr_ctx, "in_channel_layout", src_ch_layout, 0);
av_opt_set_int(swr_ctx, "in_sample_rate", src_rate, 0);
av_opt_set_sample_fmt(swr_ctx, "in_sample_fmt", src_sample_fmt, 0);
av_opt_set_int(swr_ctx, "out_channel_layout", dst_ch_layout, 0);
av_opt_set_int(swr_ctx, "out_sample_rate", dst_rate, 0);
av_opt_set_sample_fmt(swr_ctx, "out_sample_fmt", dst_sample_fmt, 0);
/* initialize the resampling context */
if ((ret = swr_init(swr_ctx)) < 0) {
fprintf(stderr, "Failed to initialize the resampling context\n");
goto end;
}
/* allocate source and destination samples buffers */
src_nb_channels = av_get_channel_layout_nb_channels(src_ch_layout);
ret = av_samples_alloc_array_and_samples(&src_data, &src_linesize, src_nb_channels,
src_nb_samples, src_sample_fmt, 0);
if (ret < 0) {
fprintf(stderr, "Could not allocate source samples\n");
goto end;
}
/* compute the number of converted samples: buffering is avoided
* ensuring that the output buffer will contain at least all the
* converted input samples */
max_dst_nb_samples = dst_nb_samples =
av_rescale_rnd(src_nb_samples, dst_rate, src_rate, AV_ROUND_UP);
/* buffer is going to be directly written to a rawaudio file, no alignment */
dst_nb_channels = av_get_channel_layout_nb_channels(dst_ch_layout);
ret = av_samples_alloc_array_and_samples(&dst_data, &dst_linesize, dst_nb_channels,
dst_nb_samples, dst_sample_fmt, 0);
if (ret < 0) {
fprintf(stderr, "Could not allocate destination samples\n");
goto end;
}
t = 0;
do {
/* generate synthetic audio */
fill_samples((double *)src_data[0], src_nb_samples, src_nb_channels, src_rate, &t);
/* compute destination number of samples */
dst_nb_samples = av_rescale_rnd(swr_get_delay(swr_ctx, src_rate) +
src_nb_samples, dst_rate, src_rate, AV_ROUND_UP);
if (dst_nb_samples > max_dst_nb_samples) {
av_freep(&dst_data[0]);
ret = av_samples_alloc(dst_data, &dst_linesize, dst_nb_channels,
dst_nb_samples, dst_sample_fmt, 1);
if (ret < 0)
break;
max_dst_nb_samples = dst_nb_samples;
}
/* convert to destination format */
ret = swr_convert(swr_ctx, dst_data, dst_nb_samples, (const uint8_t **)src_data, src_nb_samples);
if (ret < 0) {
fprintf(stderr, "Error while converting\n");
goto end;
}
dst_bufsize = av_samples_get_buffer_size(&dst_linesize, dst_nb_channels,
ret, dst_sample_fmt, 1);
if (dst_bufsize < 0) {
fprintf(stderr, "Could not get sample buffer size\n");
goto end;
}
printf("t:%f in:%d out:%d\n", t, src_nb_samples, ret);
fwrite(dst_data[0], 1, dst_bufsize, dst_file);
} while (t < 10);
if ((ret = get_format_from_sample_fmt(&fmt, dst_sample_fmt)) < 0)
goto end;
fprintf(stderr, "Resampling succeeded. Play the output file with the command:\n"
"ffplay -f %s -channel_layout %"PRId64" -channels %d -ar %d %s\n",
fmt, dst_ch_layout, dst_nb_channels, dst_rate, dst_filename);
end:
fclose(dst_file);
if (src_data)
av_freep(&src_data[0]);
av_freep(&src_data);
if (dst_data)
av_freep(&dst_data[0]);
av_freep(&dst_data);
swr_free(&swr_ctx);
return ret < 0;
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "main", "function_addr": 4199541, "binary_name": "f7167de882ee36b3c3272d72626ee6c987dd016fb8829aa797bb17cb6d5627e3.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r12"], [3, "push rbx"], [4, "sub rsp, 90h"], [5, "mov [rbp+var_94], edi"], [6, "mov [rbp+var_A0], rsi"], [7, "mov [rbp+var_20], 3"], [8, "mov [rbp+var_28], 7"], [9, "mov [rbp+var_2C], 0BB80h"], [10, "mov [rbp+var_30], 0AC44h"], [11, "mov [rbp+var_68], 0"], [12, "mov [rbp+var_70], 0"], [13, "mov [rbp+var_34], 0"], [14, "mov [rbp+var_38], 0"], [15, "mov [rbp+var_3C], 400h"], [16, "mov [rbp+var_40], 4"], [17, "mov [rbp+var_44], 1"], [18, "mov [rbp+filename], 0"], [19, "cmp [rbp+var_94], 2"], [20, "jz short loc_40151F"], [21, "mov rax, [rbp+var_A0]"], [22, "mov rdx, [rax]"], [23, "mov rax, cs:stderr"], [24, "mov esi, offset aUsageSOutputFi"], [25, "mov rdi, rax"], [26, "mov eax, 0"], [27, "call _fprintf"], [28, "mov edi, 1"], [29, "call _exit"], [30, "mov rax, [rbp+var_A0]"], [31, "mov rax, [rax+8]"], [32, "mov [rbp+filename], rax"], [33, "mov rax, [rbp+filename]"], [34, "mov esi, offset modes"], [35, "mov rdi, rax"], [36, "call _fopen"], [37, "mov [rbp+s], rax"], [38, "cmp [rbp+s], 0"], [39, "jnz short loc_401571"], [40, "mov rax, cs:stderr"], [41, "mov rdx, [rbp+filename]"], [42, "mov esi, offset aCouldNotOpenDe"], [43, "mov rdi, rax"], [44, "mov eax, 0"], [45, "call _fprintf"], [46, "mov edi, 1"], [47, "call _exit"], [48, "call _swr_alloc"], [49, "mov [rbp+var_88], rax"], [50, "mov rax, [rbp+var_88]"], [51, "test rax, rax"], [52, "jnz short loc_4015B3"], [53, "mov rax, cs:stderr"], [54, "mov rcx, rax"], [55, "mov edx, 25h "], [56, "mov esi, 1"], [57, "mov edi, offset aCouldNotAlloca"], [58, "call _fwrite"], [59, "mov [rbp+var_18], 0FFFFFFF4h"], [60, "jmp loc_401981"], [61, "mov rax, [rbp+var_88]"], [62, "mov rdx, [rbp+var_20]"], [63, "mov ecx, 0"], [64, "mov esi, offset aInChannelLayou"], [65, "mov rdi, rax"], [66, "call _av_opt_set_int"], [67, "mov eax, [rbp+var_2C]"], [68, "movsxd rdx, eax"], [69, "mov rax, [rbp+var_88]"], [70, "mov ecx, 0"], [71, "mov esi, offset aInSampleRate"], [72, "mov rdi, rax"], [73, "call _av_opt_set_int"], [74, "mov rax, [rbp+var_88]"], [75, "mov edx, [rbp+var_40]"], [76, "mov ecx, 0"], [77, "mov esi, offset aInSampleFmt"], [78, "mov rdi, rax"], [79, "call _av_opt_set_sample_fmt"], [80, "mov rax, [rbp+var_88]"], [81, "mov rdx, [rbp+var_28]"], [82, "mov ecx, 0"], [83, "mov esi, offset aOutChannelLayo"], [84, "mov rdi, rax"], [85, "call _av_opt_set_int"], [86, "mov eax, [rbp+var_30]"], [87, "movsxd rdx, eax"], [88, "mov rax, [rbp+var_88]"], [89, "mov ecx, 0"], [90, "mov esi, offset aOutSampleRate"], [91, "mov rdi, rax"], [92, "call _av_opt_set_int"], [93, "mov rax, [rbp+var_88]"], [94, "mov edx, [rbp+var_44]"], [95, "mov ecx, 0"], [96, "mov esi, offset aOutSampleFmt"], [97, "mov rdi, rax"], [98, "call _av_opt_set_sample_fmt"], [99, "mov rax, [rbp+var_88]"], [100, "mov rdi, rax"], [101, "call _swr_init"], [102, "mov [rbp+var_18], eax"], [103, "cmp [rbp+var_18], 0"], [104, "jns short loc_40169E"], [105, "mov rax, cs:stderr"], [106, "mov rcx, rax"], [107, "mov edx, 2Ch "], [108, "mov esi, 1"], [109, "mov edi, offset aFailedToInitia"], [110, "call _fwrite"], [111, "jmp loc_401981"], [112, "mov rax, [rbp+var_20]"], [113, "mov rdi, rax"], [114, "call _av_get_channel_layout_nb_channels"], [115, "mov [rbp+var_34], eax"], [116, "mov edi, [rbp+var_40]"], [117, "mov ecx, [rbp+var_3C]"], [118, "mov edx, [rbp+var_34]"], [119, "lea rsi, [rbp+var_74]"], [120, "lea rax, [rbp+var_68]"], [121, "mov r9d, 0"], [122, "mov r8d, edi"], [123, "mov rdi, rax"], [124, "call _av_samples_alloc_array_and_samples"], [125, "mov [rbp+var_18], eax"], [126, "cmp [rbp+var_18], 0"], [127, "jns short loc_4016FB"], [128, "mov rax, cs:stderr"], [129, "mov rcx, rax"], [130, "mov edx, 22h "], [131, "mov esi, 1"], [132, "mov edi, offset aCouldNotAlloca_0"], [133, "call _fwrite"], [134, "jmp loc_401981"], [135, "mov eax, [rbp+var_2C]"], [136, "movsxd rdx, eax"], [137, "mov eax, [rbp+var_30]"], [138, "movsxd rsi, eax"], [139, "mov eax, [rbp+var_3C]"], [140, "cdqe"], [141, "mov ecx, 3"], [142, "mov rdi, rax"], [143, "call _av_rescale_rnd"], [144, "mov [rbp+var_5C], eax"], [145, "mov eax, [rbp+var_5C]"], [146, "mov [rbp+var_14], eax"], [147, "mov rax, [rbp+var_28]"], [148, "mov rdi, rax"], [149, "call _av_get_channel_layout_nb_channels"], [150, "mov [rbp+var_38], eax"], [151, "mov edi, [rbp+var_44]"], [152, "mov ecx, [rbp+var_5C]"], [153, "mov edx, [rbp+var_38]"], [154, "lea rsi, [rbp+var_78]"], [155, "lea rax, [rbp+var_70]"], [156, "mov r9d, 0"], [157, "mov r8d, edi"], [158, "mov rdi, rax"], [159, "call _av_samples_alloc_array_and_samples"], [160, "mov [rbp+var_18], eax"], [161, "cmp [rbp+var_18], 0"], [162, "jns short loc_40177F"], [163, "mov rax, cs:stderr"], [164, "mov rcx, rax"], [165, "mov edx, 27h "], [166, "mov esi, 1"], [167, "mov edi, offset aCouldNotAlloca_1"], [168, "call _fwrite"], [169, "jmp loc_401981"], [170, "pxor xmm0, xmm0"], [171, "movsd [rbp+var_90], xmm0"], [172, "mov rax, [rbp+var_68]"], [173, "mov rax, [rax]"], [174, "lea rdi, [rbp+var_90]"], [175, "mov ecx, [rbp+var_2C]"], [176, "mov edx, [rbp+var_34]"], [177, "mov esi, [rbp+var_3C]"], [178, "mov r8, rdi"], [179, "mov rdi, rax"], [180, "call sub_40138E"], [181, "mov eax, [rbp+var_2C]"], [182, "movsxd r12, eax"], [183, "mov eax, [rbp+var_30]"], [184, "movsxd rbx, eax"], [185, "mov eax, [rbp+var_2C]"], [186, "movsxd rdx, eax"], [187, "mov rax, [rbp+var_88]"], [188, "mov rsi, rdx"], [189, "mov rdi, rax"], [190, "call _swr_get_delay"], [191, "mov rdx, rax"], [192, "mov eax, [rbp+var_3C]"], [193, "cdqe"], [194, "add rax, rdx"], [195, "mov ecx, 3"], [196, "mov rdx, r12"], [197, "mov rsi, rbx"], [198, "mov rdi, rax"], [199, "call _av_rescale_rnd"], [200, "mov [rbp+var_5C], eax"], [201, "mov eax, [rbp+var_5C]"], [202, "cmp eax, [rbp+var_14]"], [203, "jle short loc_40183B"], [204, "mov rax, [rbp+var_70]"], [205, "mov rdi, rax"], [206, "call _av_freep"], [207, "mov rax, [rbp+var_70]"], [208, "mov edi, [rbp+var_44]"], [209, "mov ecx, [rbp+var_5C]"], [210, "mov edx, [rbp+var_38]"], [211, "lea rsi, [rbp+var_78]"], [212, "mov r9d, 1"], [213, "mov r8d, edi"], [214, "mov rdi, rax"], [215, "call _av_samples_alloc"], [216, "mov [rbp+var_18], eax"], [217, "cmp [rbp+var_18], 0"], [218, "js loc_40192B"], [219, "mov eax, [rbp+var_5C]"], [220, "mov [rbp+var_14], eax"], [221, "mov rcx, [rbp+var_68]"], [222, "mov rsi, [rbp+var_70]"], [223, "mov rax, [rbp+var_88]"], [224, "mov edi, [rbp+var_3C]"], [225, "mov edx, [rbp+var_5C]"], [226, "mov r8d, edi"], [227, "mov rdi, rax"], [228, "call _swr_convert"], [229, "mov [rbp+var_18], eax"], [230, "cmp [rbp+var_18], 0"], [231, "jns short loc_401887"], [232, "mov rax, cs:stderr"], [233, "mov rcx, rax"], [234, "mov edx, 17h"], [235, "mov esi, 1"], [236, "mov edi, offset aErrorWhileConv"], [237, "call _fwrite"], [238, "jmp loc_401981"], [239, "mov ecx, [rbp+var_44]"], [240, "mov edx, [rbp+var_18]"], [241, "mov esi, [rbp+var_38]"], [242, "lea rax, [rbp+var_78]"], [243, "mov r8d, 1"], [244, "mov rdi, rax"], [245, "call _av_samples_get_buffer_size"], [246, "mov [rbp+var_60], eax"], [247, "cmp [rbp+var_60], 0"], [248, "jns short loc_4018CE"], [249, "mov rax, cs:stderr"], [250, "mov rcx, rax"], [251, "mov edx, 21h "], [252, "mov esi, 1"], [253, "mov edi, offset aCouldNotGetSam"], [254, "call _fwrite"], [255, "jmp loc_401981"], [256, "mov rax, [rbp+var_90]"], [257, "mov edx, [rbp+var_18]"], [258, "mov ecx, [rbp+var_3C]"], [259, "mov esi, ecx"], [260, "movq xmm0, rax"], [261, "mov edi, offset aTFInDOutD"], [262, "mov eax, 1"], [263, "call _printf"], [264, "mov eax, [rbp+var_60]"], [265, "movsxd rdx, eax"], [266, "mov rax, [rbp+var_70]"], [267, "mov rax, [rax]"], [268, "mov rcx, [rbp+s]"], [269, "mov esi, 1"], [270, "mov rdi, rax"], [271, "call _fwrite"], [272, "movsd xmm1, [rbp+var_90]"], [273, "movsd xmm0, cs:qword_402388"], [274, "comisd xmm0, xmm1"], [275, "ja loc_40178B"], [276, "jmp short loc_40192C"], [277, "nop"], [278, "mov edx, [rbp+var_44]"], [279, "lea rax, [rbp+var_80]"], [280, "mov esi, edx"], [281, "mov rdi, rax"], [282, "call sub_401262"], [283, "mov [rbp+var_18], eax"], [284, "cmp [rbp+var_18], 0"], [285, "js short loc_401980"], [286, "mov rdx, [rbp+var_80]"], [287, "mov rax, cs:stderr"], [288, "mov edi, [rbp+var_30]"], [289, "mov esi, [rbp+var_38]"], [290, "mov rcx, [rbp+var_28]"], [291, "sub rsp, 8"], [292, "push [rbp+filename]"], [293, "mov r9d, edi"], [294, "mov r8d, esi"], [295, "mov esi, offset aResamplingSucc"], [296, "mov rdi, rax"], [297, "mov eax, 0"], [298, "call _fprintf"], [299, "add rsp, 10h"], [300, "jmp short loc_401981"], [301, "nop"], [302, "mov rax, [rbp+s]"], [303, "mov rdi, rax"], [304, "call _fclose"], [305, "mov rax, [rbp+var_68]"], [306, "test rax, rax"], [307, "jz short loc_4019A2"], [308, "mov rax, [rbp+var_68]"], [309, "mov rdi, rax"], [310, "call _av_freep"], [311, "lea rax, [rbp+var_68]"], [312, "mov rdi, rax"], [313, "call _av_freep"], [314, "mov rax, [rbp+var_70]"], [315, "test rax, rax"], [316, "jz short loc_4019C3"], [317, "mov rax, [rbp+var_70]"], [318, "mov rdi, rax"], [319, "call _av_freep"], [320, "lea rax, [rbp+var_70]"], [321, "mov rdi, rax"], [322, "call _av_freep"], [323, "lea rax, [rbp+var_88]"], [324, "mov rdi, rax"], [325, "call _swr_free"], [326, "mov eax, [rbp+var_18]"], [327, "shr eax, 1Fh"], [328, "movzx eax, al"], [329, "lea rsp, [rbp-10h]"], [330, "pop rbx"], [331, "pop r12"], [332, "pop rbp"], [333, "retn"]], "data_dep": [[19, 5], [20, 19], [21, 6], [22, 21], [25, 23], [30, 6], [31, 30], [32, 31], [33, 32], [35, 33], [37, 36], [38, 37], [39, 38], [41, 32], [43, 40], [49, 48], [50, 49], [51, 50], [52, 51], [54, 53], [61, 49], [62, 7], [65, 61], [67, 9], [68, 67], [69, 49], [72, 69], [74, 49], [75, 16], [78, 74], [80, 49], [81, 8], [84, 80], [86, 10], [87, 86], [88, 49], [91, 88], [93, 49], [94, 17], [97, 93], [99, 49], [100, 99], [102, 101], [103, 102], [104, 103], [106, 105], [112, 7], [113, 112], [115, 114], [116, 16], [117, 15], [118, 115], [119, 96], [120, 11], [120, 114], [122, 116], [123, 120], [125, 124], [126, 125], [127, 126], [129, 128], [135, 9], [136, 135], [137, 10], [138, 137], [139, 15], [142, 139], [144, 143], [145, 144], [146, 145], [147, 8], [148, 147], [150, 149], [151, 17], [152, 144], [153, 150], [154, 138], [155, 12], [155, 149], [157, 151], [158, 155], [160, 159], [161, 160], [162, 161], [164, 163], [171, 170], [172, 11], [173, 172], [174, 171], [174, 270], [174, 158], [175, 9], [176, 115], [177, 15], [178, 174], [179, 173], [181, 9], [182, 181], [183, 10], [184, 183], [185, 9], [186, 185], [187, 49], [188, 186], [189, 187], [191, 190], [192, 15], [194, 192], [194, 191], [196, 182], [197, 184], [198, 194], [200, 199], [201, 200], [202, 146], [202, 220], [202, 201], [203, 202], [204, 12], [205, 204], [207, 12], [208, 17], [209, 200], [210, 150], [211, 197], [213, 208], [214, 207], [216, 215], [217, 216], [218, 217], [219, 200], [220, 219], [221, 11], [222, 12], [223, 49], [224, 15], [225, 200], [226, 224], [227, 223], [229, 228], [230, 229], [231, 230], [233, 232], [239, 17], [240, 229], [241, 150], [242, 228], [244, 242], [246, 245], [247, 246], [248, 247], [250, 249], [256, 171], [257, 229], [258, 15], [259, 258], [260, 256], [264, 246], [265, 264], [266, 12], [267, 266], [268, 37], [270, 267], [272, 171], [274, 273], [274, 272], [275, 247], [278, 17], [279, 215], [279, 271], [280, 278], [281, 279], [283, 282], [284, 283], [285, 284], [288, 10], [289, 150], [290, 8], [291, 4], [292, 32], [293, 288], [294, 289], [296, 287], [299, 291], [302, 37], [303, 302], [305, 11], [306, 305], [307, 306], [308, 11], [309, 308], [311, 11], [311, 306], [311, 310], [312, 311], [314, 12], [315, 314], [316, 315], [317, 12], [318, 317], [320, 12], [320, 315], [320, 319], [321, 320], [323, 322], [323, 49], [324, 323], [326, 229], [326, 160], [326, 59], [326, 125], [326, 283], [326, 102], [327, 326], [328, 327], [329, 299], [329, 4], [330, 3], [331, 2], [332, 0], [333, 328]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f7167de882ee36b3c3272d72626ee6c987dd016fb8829aa797bb17cb6d5627e3_f7167de882ee36b3c3272d72626ee6c987dd016fb8829aa797bb17cb6d5627e3.jsonl.gz", "strip_func_name": "main", "query": "\n\n\nint __cdecl main(int argc, const char **argv, const char **envp)\n{\ndouble v4; // [rsp+10h] [rbp-90h] BYREF\nconst char *v6; // [rsp+20h] [rbp-80h] BYREF\nconst void **v7; // [rsp+30h] [rbp-70h]\ndouble **v8; // [rsp+38h] [rbp-68h]\nint v9; // [rsp+40h] [rbp-60h]\nint v10; // [rsp+44h] [rbp-5Ch]\nFILE *s; // [rsp+48h] [rbp-58h]\nchar *filename; // [rsp+50h] [rbp-50h]\nint v13; // [rsp+5Ch] [rbp-44h]\nint v14; // [rsp+60h] [rbp-40h]\nunsigned int v15; // [rsp+64h] [rbp-3Ch]\nunsigned int v16; // [rsp+68h] [rbp-38h]\nint v17; // [rsp+6Ch] [rbp-34h]\nunsigned int v18; // [rsp+70h] [rbp-30h]\nint v19; // [rsp+74h] [rbp-2Ch]\n__int64 v20; // [rsp+78h] [rbp-28h]\n__int64 v21; // [rsp+80h] [rbp-20h]\nint v22; // [rsp+88h] [rbp-18h]\nint v23; // [rsp+8Ch] [rbp-14h]\n\nv21 = 3LL;\nv20 = 7LL;\nv19 = 48000;\nv18 = 44100;\nv8 = 0LL;\nv7 = 0LL;\nv17 = 0;\nv16 = 0;\nv15 = 1024;\nv14 = 4;\nv13 = 1;\nfilename = 0LL;\nif ( argc != 2 )\n{\nfprintf(\nstderr,\n\"Usage: %s output_file\\n\"\n\"API example program to show how to resample an audio stream with libswresample.\\n\"\n\"This program generates a series of audio frames, resamples them to a specified output format and rate and saves th\"\n\"em to an output file named output_file.\\n\",\n*argv);\nexit(1);\n}\nfilename = (char *)argv[1];\ns = fopen(filename, \"wb\");\nif ( !s )\n{\nfprintf(stderr, \"Could not open destination file %s\\n\", filename);\nexit(1);\n}\nif ( swr_alloc() )\n{\nav_opt_set_int();\nav_opt_set_int();\nav_opt_set_sample_fmt();\nav_opt_set_int();\nav_opt_set_int();\nav_opt_set_sample_fmt();\nv22 = swr_init();\nif ( v22 >= 0 )\n{\nv17 = av_get_channel_layout_nb_channels();\nv22 = av_samples_alloc_array_and_samples();\nif ( v22 >= 0 )\n{\nv10 = av_rescale_rnd();\nv23 = v10;\nv16 = av_get_channel_layout_nb_channels();\nv22 = av_samples_alloc_array_and_samples();\nif ( v22 >= 0 )\n{\nv4 = 0.0;\ndo\n{\nsub_40138E(*v8, v15, v17, v19, &v4);\nswr_get_delay();\nv10 = av_rescale_rnd();\nif ( v10 > v23 )\n{\nav_freep();\nv22 = av_samples_alloc();\nif ( v22 < 0 )\nbreak;\nv23 = v10;\n}\nv22 = swr_convert();\nif ( v22 < 0 )\n{\nfwrite(\"Error while converting\\n\", 1uLL, 0x17uLL, stderr);\ngoto LABEL_24;\n}\nv9 = av_samples_get_buffer_size();\nif ( v9 < 0 )\n{\nfwrite(\"Could not get sample buffer size\\n\", 1uLL, 0x21uLL, stderr);\ngoto LABEL_24;\n}\nprintf(\"t:%f in:%d out:%d\\n\", v4, v15, (unsigned int)v22);\nfwrite(*v7, 1uLL, v9, s);\n}\nwhile ( v4 < 10.0 );\nv22 = sub_401262(&v6, v13);\nif ( v22 >= 0 )\nfprintf(\nstderr,\n\"Resampling succeeded. Play the output file with the command:\\n\"\n\"ffplay -f %s -channel_layout %ld -channels %d -ar %d %s\\n\",\nv6,\nv20,\nv16,\nv18,\nfilename);\n}\nelse\n{\nfwrite(\"Could not allocate destination samples\\n\", 1uLL, 0x27uLL, stderr);\n}\n}\nelse\n{\nfwrite(\"Could not allocate source samples\\n\", 1uLL, 0x22uLL, stderr);\n}\n}\nelse\n{\nfwrite(\"Failed to initialize the resampling context\\n\", 1uLL, 0x2CuLL, stderr);\n}\n}\nelse\n{\nfwrite(\"Could not allocate resampler context\\n\", 1uLL, 0x25uLL, stderr);\nv22 = -12;\n}\nLABEL_24:\nfclose(s);\nif ( v8 )\nav_freep();\nav_freep();\nif ( v7 )\nav_freep();\nav_freep();\nswr_free();\nreturn v22 < 0;\n}\n\n\n\nQ:[v4,v6,v7,v8,v9,v10,s,filename,v13,v14,v15,v16,v17,v18,v19,v20,v21,v23,sub_40138E,sub_401262,]\nAssistant: ", "hints": "[]", "response": "{'v4': 't', 'v6': 'fmt', 'v7': 'dst_data', 'v8': 'src_data', 'v9': 'dst_bufsize', 'v10': 'dst_nb_samples', 's': 'dst_file', 'filename': 'dst_filename', 'v13': 'dst_sample_fmt', 'v14': 'src_sample_fmt', 'v15': 'src_nb_samples', 'v16': 'dst_nb_channels', 'v17': 'src_nb_channels', 'v18': 'dst_rate', 'v19': 'src_rate', 'v20': 'dst_ch_layout', 'v21': 'src_ch_layout', 'v23': 'max_dst_nb_samples', 'sub_40138E': 'fill_samples', 'sub_401262': 'get_format_from_sample_fmt'}"} |
|
duk__base64_encode_helper | 3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea | creationix | dukluv | NA | DUK_LOCAL void duk__base64_encode_helper(const duk_uint8_t *src, duk_size_t srclen, duk_uint8_t *dst) {
duk_uint_t t;
duk_size_t n_full, n_full3, n_final;
const duk_uint8_t *src_end_fast;
n_full = srclen / 3; /* full 3-byte -> 4-char conversions */
n_full3 = n_full * 3;
n_final = srclen - n_full3;
DUK_ASSERT_DISABLE(n_final >= 0);
DUK_ASSERT(n_final <= 2);
src_end_fast = src + n_full3;
while (DUK_UNLIKELY(src != src_end_fast)) {
t = (duk_uint_t) (*src++);
t = (t << 8) + (duk_uint_t) (*src++);
t = (t << 8) + (duk_uint_t) (*src++);
*dst++ = duk_base64_enctab[t >> 18];
*dst++ = duk_base64_enctab[(t >> 12) & 0x3f];
*dst++ = duk_base64_enctab[(t >> 6) & 0x3f];
*dst++ = duk_base64_enctab[t & 0x3f];
#if 0 /* Tested: not faster on x64 */
/* aaaaaabb bbbbcccc ccdddddd */
dst[0] = duk_base64_enctab[(src[0] >> 2) & 0x3f];
dst[1] = duk_base64_enctab[((src[0] << 4) & 0x30) | ((src[1] >> 4) & 0x0f)];
dst[2] = duk_base64_enctab[((src[1] << 2) & 0x3f) | ((src[2] >> 6) & 0x03)];
dst[3] = duk_base64_enctab[src[2] & 0x3f];
src += 3; dst += 4;
#endif
}
switch (n_final) {
/* case 0: nop */
case 1: {
/* XX== */
t = (duk_uint_t) (*src++);
*dst++ = duk_base64_enctab[t >> 2]; /* XXXXXX-- */
*dst++ = duk_base64_enctab[(t << 4) & 0x3f]; /* ------XX */
*dst++ = DUK_ASC_EQUALS;
*dst++ = DUK_ASC_EQUALS;
break;
}
case 2: {
/* XXX= */
t = (duk_uint_t) (*src++);
t = (t << 8) + (duk_uint_t) (*src++);
*dst++ = duk_base64_enctab[t >> 10]; /* XXXXXX-- -------- */
*dst++ = duk_base64_enctab[(t >> 4) & 0x3f]; /* ------XX XXXX---- */
*dst++ = duk_base64_enctab[(t << 2) & 0x3f]; /* -------- ----XXXX */
*dst++ = DUK_ASC_EQUALS;
break;
}
}
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4091FC", "function_addr": 4231676, "binary_name": "3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_40], rsi"], [5, "mov [rbp+var_48], rdx"], [6, "mov rax, [rbp+var_40]"], [7, "mov rdx, 0AAAAAAAAAAAAAAABh"], [8, "mul rdx"], [9, "mov rax, rdx"], [10, "shr rax, 1"], [11, "mov [rbp+var_8], rax"], [12, "mov rdx, [rbp+var_8]"], [13, "mov rax, rdx"], [14, "add rax, rax"], [15, "add rax, rdx"], [16, "mov [rbp+var_10], rax"], [17, "mov rax, [rbp+var_40]"], [18, "sub rax, [rbp+var_10]"], [19, "mov [rbp+var_18], rax"], [20, "cmp [rbp+var_18], 2"], [21, "jbe short loc_40925E"], [22, "mov esi, offset aAssertionFaile_313"], [23, "mov edi, 36h "], [24, "call sub_402AA8"], [25, "mov rdx, [rbp+var_38]"], [26, "mov rax, [rbp+var_10]"], [27, "add rax, rdx"], [28, "mov [rbp+var_20], rax"], [29, "jmp loc_409347"], [30, "mov rax, [rbp+var_38]"], [31, "lea rdx, [rax+1]"], [32, "mov [rbp+var_38], rdx"], [33, "movzx eax, byte ptr [rax]"], [34, "movzx eax, al"], [35, "mov [rbp+var_24], eax"], [36, "mov eax, [rbp+var_24]"], [37, "shl eax, 8"], [38, "mov ecx, eax"], [39, "mov rax, [rbp+var_38]"], [40, "lea rdx, [rax+1]"], [41, "mov [rbp+var_38], rdx"], [42, "movzx eax, byte ptr [rax]"], [43, "movzx eax, al"], [44, "add eax, ecx"], [45, "mov [rbp+var_24], eax"], [46, "mov eax, [rbp+var_24]"], [47, "shl eax, 8"], [48, "mov ecx, eax"], [49, "mov rax, [rbp+var_38]"], [50, "lea rdx, [rax+1]"], [51, "mov [rbp+var_38], rdx"], [52, "movzx eax, byte ptr [rax]"], [53, "movzx eax, al"], [54, "add eax, ecx"], [55, "mov [rbp+var_24], eax"], [56, "mov eax, [rbp+var_24]"], [57, "shr eax, 12h"], [58, "mov ecx, eax"], [59, "mov rax, [rbp+var_48]"], [60, "lea rdx, [rax+1]"], [61, "mov [rbp+var_48], rdx"], [62, "mov edx, ecx"], [63, "movzx edx, ds:byte_498900[rdx]"], [64, "mov [rax], dl"], [65, "mov eax, [rbp+var_24]"], [66, "shr eax, 0Ch"], [67, "and eax, 3Fh"], [68, "mov ecx, eax"], [69, "mov rax, [rbp+var_48]"], [70, "lea rdx, [rax+1]"], [71, "mov [rbp+var_48], rdx"], [72, "mov edx, ecx"], [73, "movzx edx, ds:byte_498900[rdx]"], [74, "mov [rax], dl"], [75, "mov eax, [rbp+var_24]"], [76, "shr eax, 6"], [77, "and eax, 3Fh"], [78, "mov ecx, eax"], [79, "mov rax, [rbp+var_48]"], [80, "lea rdx, [rax+1]"], [81, "mov [rbp+var_48], rdx"], [82, "mov edx, ecx"], [83, "movzx edx, ds:byte_498900[rdx]"], [84, "mov [rax], dl"], [85, "mov eax, [rbp+var_24]"], [86, "and eax, 3Fh"], [87, "mov ecx, eax"], [88, "mov rax, [rbp+var_48]"], [89, "lea rdx, [rax+1]"], [90, "mov [rbp+var_48], rdx"], [91, "mov edx, ecx"], [92, "movzx edx, ds:byte_498900[rdx]"], [93, "mov [rax], dl"], [94, "mov rax, [rbp+var_38]"], [95, "cmp rax, [rbp+var_20]"], [96, "setnz al"], [97, "movzx eax, al"], [98, "test rax, rax"], [99, "jnz loc_409272"], [100, "cmp [rbp+var_18], 1"], [101, "jz short loc_409371"], [102, "cmp [rbp+var_18], 2"], [103, "jz short loc_4093EA"], [104, "jmp loc_409491"], [105, "mov rax, [rbp+var_38]"], [106, "lea rdx, [rax+1]"], [107, "mov [rbp+var_38], rdx"], [108, "movzx eax, byte ptr [rax]"], [109, "movzx eax, al"], [110, "mov [rbp+var_24], eax"], [111, "mov eax, [rbp+var_24]"], [112, "shr eax, 2"], [113, "mov ecx, eax"], [114, "mov rax, [rbp+var_48]"], [115, "lea rdx, [rax+1]"], [116, "mov [rbp+var_48], rdx"], [117, "mov edx, ecx"], [118, "movzx edx, ds:byte_498900[rdx]"], [119, "mov [rax], dl"], [120, "mov eax, [rbp+var_24]"], [121, "shl eax, 4"], [122, "and eax, 3Fh"], [123, "mov ecx, eax"], [124, "mov rax, [rbp+var_48]"], [125, "lea rdx, [rax+1]"], [126, "mov [rbp+var_48], rdx"], [127, "mov edx, ecx"], [128, "movzx edx, ds:byte_498900[rdx]"], [129, "mov [rax], dl"], [130, "mov rax, [rbp+var_48]"], [131, "lea rdx, [rax+1]"], [132, "mov [rbp+var_48], rdx"], [133, "mov byte ptr [rax], 3Dh "], [134, "mov rax, [rbp+var_48]"], [135, "lea rdx, [rax+1]"], [136, "mov [rbp+var_48], rdx"], [137, "mov byte ptr [rax], 3Dh "], [138, "jmp loc_409491"], [139, "mov rax, [rbp+var_38]"], [140, "lea rdx, [rax+1]"], [141, "mov [rbp+var_38], rdx"], [142, "movzx eax, byte ptr [rax]"], [143, "movzx eax, al"], [144, "mov [rbp+var_24], eax"], [145, "mov eax, [rbp+var_24]"], [146, "shl eax, 8"], [147, "mov ecx, eax"], [148, "mov rax, [rbp+var_38]"], [149, "lea rdx, [rax+1]"], [150, "mov [rbp+var_38], rdx"], [151, "movzx eax, byte ptr [rax]"], [152, "movzx eax, al"], [153, "add eax, ecx"], [154, "mov [rbp+var_24], eax"], [155, "mov eax, [rbp+var_24]"], [156, "shr eax, 0Ah"], [157, "mov ecx, eax"], [158, "mov rax, [rbp+var_48]"], [159, "lea rdx, [rax+1]"], [160, "mov [rbp+var_48], rdx"], [161, "mov edx, ecx"], [162, "movzx edx, ds:byte_498900[rdx]"], [163, "mov [rax], dl"], [164, "mov eax, [rbp+var_24]"], [165, "shr eax, 4"], [166, "and eax, 3Fh"], [167, "mov ecx, eax"], [168, "mov rax, [rbp+var_48]"], [169, "lea rdx, [rax+1]"], [170, "mov [rbp+var_48], rdx"], [171, "mov edx, ecx"], [172, "movzx edx, ds:byte_498900[rdx]"], [173, "mov [rax], dl"], [174, "mov eax, [rbp+var_24]"], [175, "shl eax, 2"], [176, "and eax, 3Fh"], [177, "mov ecx, eax"], [178, "mov rax, [rbp+var_48]"], [179, "lea rdx, [rax+1]"], [180, "mov [rbp+var_48], rdx"], [181, "mov edx, ecx"], [182, "movzx edx, ds:byte_498900[rdx]"], [183, "mov [rax], dl"], [184, "mov rax, [rbp+var_48]"], [185, "lea rdx, [rax+1]"], [186, "mov [rbp+var_48], rdx"], [187, "mov byte ptr [rax], 3Dh "], [188, "nop"], [189, "nop"], [190, "leave"], [191, "retn"]], "data_dep": [[6, 4], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 12], [14, 13], [15, 14], [15, 12], [16, 15], [17, 4], [18, 17], [18, 16], [19, 18], [20, 19], [21, 20], [25, 3], [26, 16], [27, 26], [27, 25], [28, 27], [30, 3], [30, 51], [31, 84], [31, 93], [31, 74], [31, 92], [31, 64], [31, 30], [31, 25], [32, 31], [33, 84], [33, 93], [33, 74], [33, 64], [33, 30], [34, 33], [35, 34], [36, 35], [37, 36], [38, 37], [39, 32], [40, 31], [40, 39], [40, 84], [40, 93], [40, 74], [40, 64], [41, 40], [42, 39], [42, 84], [42, 93], [42, 74], [42, 64], [43, 42], [44, 38], [44, 43], [45, 44], [46, 45], [47, 46], [48, 47], [49, 41], [50, 84], [50, 93], [50, 74], [50, 64], [50, 40], [50, 49], [51, 50], [52, 93], [52, 74], [52, 64], [52, 49], [52, 84], [53, 52], [54, 53], [54, 48], [55, 54], [56, 55], [57, 56], [58, 57], [59, 90], [59, 5], [60, 74], [60, 64], [60, 50], [60, 59], [60, 84], [60, 93], [61, 60], [62, 58], [64, 59], [64, 63], [65, 55], [66, 65], [67, 66], [68, 67], [69, 61], [70, 64], [70, 63], [70, 69], [71, 70], [72, 68], [74, 69], [74, 73], [75, 55], [76, 75], [77, 76], [78, 77], [79, 71], [80, 79], [80, 74], [80, 73], [81, 80], [82, 78], [84, 83], [84, 79], [85, 55], [86, 85], [87, 86], [88, 81], [89, 84], [89, 88], [89, 83], [90, 89], [91, 87], [93, 88], [93, 92], [94, 3], [94, 51], [95, 94], [95, 28], [96, 95], [96, 94], [97, 96], [98, 97], [99, 98], [100, 19], [101, 100], [102, 19], [103, 102], [105, 3], [105, 51], [106, 129], [106, 92], [106, 119], [106, 105], [106, 64], [106, 133], [106, 25], [106, 137], [106, 84], [106, 93], [106, 74], [107, 106], [108, 133], [108, 119], [108, 137], [108, 105], [108, 84], [108, 93], [108, 129], [108, 74], [108, 64], [109, 108], [110, 109], [111, 110], [112, 111], [113, 112], [114, 5], [114, 90], [115, 84], [115, 93], [115, 129], [115, 106], [115, 74], [115, 64], [115, 133], [115, 119], [115, 137], [115, 114], [116, 115], [117, 113], [119, 114], [119, 118], [120, 110], [121, 120], [122, 121], [123, 122], [124, 116], [125, 124], [125, 119], [125, 118], [126, 125], [127, 123], [129, 128], [129, 124], [130, 126], [131, 130], [131, 129], [131, 128], [132, 131], [133, 130], [134, 132], [135, 131], [135, 134], [135, 133], [136, 135], [137, 134], [139, 3], [139, 51], [140, 84], [140, 93], [140, 187], [140, 173], [140, 74], [140, 163], [140, 139], [140, 92], [140, 64], [140, 183], [140, 25], [141, 140], [142, 84], [142, 93], [142, 187], [142, 173], [142, 74], [142, 163], [142, 139], [142, 64], [142, 183], [143, 142], [144, 143], [145, 144], [146, 145], [147, 146], [148, 141], [149, 64], [149, 183], [149, 84], [149, 93], [149, 187], [149, 173], [149, 74], [149, 163], [149, 140], [149, 148], [150, 149], [151, 173], [151, 84], [151, 93], [151, 187], [151, 74], [151, 163], [151, 64], [151, 148], [151, 183], [152, 151], [153, 152], [153, 147], [154, 153], [155, 154], [156, 155], [157, 156], [158, 5], [158, 90], [159, 84], [159, 93], [159, 187], [159, 173], [159, 74], [159, 163], [159, 149], [159, 158], [159, 64], [159, 183], [160, 159], [161, 157], [163, 158], [163, 162], [164, 154], [165, 164], [166, 165], [167, 166], [168, 160], [169, 163], [169, 162], [169, 168], [170, 169], [171, 167], [173, 168], [173, 172], [174, 154], [175, 174], [176, 175], [177, 176], [178, 170], [179, 178], [179, 173], [179, 172], [180, 179], [181, 177], [183, 182], [183, 178], [184, 180], [185, 184], [185, 183], [185, 182], [186, 185], [187, 184], [191, 134], [191, 184], [191, 98]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea_3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea.jsonl.gz", "strip_func_name": "sub_4091FC", "query": "\n\n\nunsigned __int64 __fastcall sub_4091FC(unsigned __int8 *a1, unsigned __int64 a2, _BYTE *a3)\n{\nunsigned __int8 *v3; // rax\n_BYTE *v4; // rax\nunsigned __int64 result; // rax\nunsigned __int8 *v7; // [rsp+18h] [rbp-38h]\nint v8; // [rsp+2Ch] [rbp-24h]\nunsigned int v9; // [rsp+2Ch] [rbp-24h]\nunsigned int v10; // [rsp+2Ch] [rbp-24h]\nunsigned int v11; // [rsp+2Ch] [rbp-24h]\nunsigned __int8 *v12; // [rsp+30h] [rbp-20h]\nunsigned __int64 v13; // [rsp+38h] [rbp-18h]\n\nv7 = a1;\nv13 = a2 % 3;\nif ( a2 % 3 > 2 )\nsub_402AA8(54, \"assertion failed: n_final <= 2 (duk_api_codec.c:34)\");\nv12 = &a1[3 * (a2 / 3)];\nwhile ( 1 )\n{\nresult = v7 != v12;\nif ( v7 == v12 )\nbreak;\nv8 = (*v7 << 8) + v7[1];\nv3 = v7 + 2;\nv7 += 3;\nv9 = (v8 << 8) + *v3;\n*a3 = byte_498900[v9 >> 18];\na3[1] = byte_498900[(v9 >> 12) & 0x3F];\na3[2] = byte_498900[(v9 >> 6) & 0x3F];\nv4 = a3 + 3;\na3 += 4;\n*v4 = byte_498900[v9 & 0x3F];\n}\nif ( v13 == 1 )\n{\nv10 = *v7;\n*a3 = byte_498900[v10 >> 2];\na3[1] = byte_498900[(16 * (_BYTE)v10) & 0x3F];\na3[2] = 61;\nresult = (unsigned __int64)(a3 + 3);\na3[3] = 61;\n}\nelse if ( v13 == 2 )\n{\nv11 = (*v7 << 8) + v7[1];\n*a3 = byte_498900[v11 >> 10];\na3[1] = byte_498900[(v11 >> 4) & 0x3F];\na3[2] = byte_498900[(4 * (_BYTE)v11) & 0x3F];\nresult = (unsigned __int64)(a3 + 3);\na3[3] = 61;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v7,v8,v13,sub_4091FC,sub_402AA8,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'dst', 'a1': 'src', 'a2': 'srclen', 'v7': 'srca', 'v8': 'tc', 'v13': 'n_final', 'sub_4091FC': 'duk__base64_encode_helper', 'sub_402AA8': 'duk_default_panic_handler'}"} |
|
savePngHeader | e7bb82279eaf5f2b6f0488dd9061676e5e9c5c72cf1b72423b4d02abc5f9d14a | erkkah | jaggies | NA | static void savePngHeader(Save *s, Tigr *bmp)
{
fwrite("\211PNG\r\n\032\n", 8, 1, s->out);
begin(s, "IHDR", 13);
put32(s, bmp->w);
put32(s, bmp->h);
put(s, 8); // bit depth
put(s, 6); // RGBA
put(s, 0); // compression (deflate)
put(s, 0); // filter (standard)
put(s, 0); // interlace off
put32(s, ~s->crc);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406230", "function_addr": 4219440, "binary_name": "e7bb82279eaf5f2b6f0488dd9061676e5e9c5c72cf1b72423b4d02abc5f9d14a.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 rax, [rax+18h]"], [7, "mov rcx, rax"], [8, "mov edx, 1"], [9, "mov esi, 8"], [10, "mov edi, offset unk_40C340"], [11, "call _fwrite"], [12, "mov rax, [rbp+var_8]"], [13, "mov edx, 0Dh"], [14, "mov esi, offset aIhdr"], [15, "mov rdi, rax"], [16, "call sub_405EBD"], [17, "mov rax, [rbp+var_10]"], [18, "mov eax, [rax]"], [19, "mov edx, eax"], [20, "mov rax, [rbp+var_8]"], [21, "mov esi, edx"], [22, "mov rdi, rax"], [23, "call sub_405D96"], [24, "mov rax, [rbp+var_10]"], [25, "mov eax, [rax+4]"], [26, "mov edx, eax"], [27, "mov rax, [rbp+var_8]"], [28, "mov esi, edx"], [29, "mov rdi, rax"], [30, "call sub_405D96"], [31, "mov rax, [rbp+var_8]"], [32, "mov esi, 8"], [33, "mov rdi, rax"], [34, "call sub_405C84"], [35, "mov rax, [rbp+var_8]"], [36, "mov esi, 6"], [37, "mov rdi, rax"], [38, "call sub_405C84"], [39, "mov rax, [rbp+var_8]"], [40, "mov esi, 0"], [41, "mov rdi, rax"], [42, "call sub_405C84"], [43, "mov rax, [rbp+var_8]"], [44, "mov esi, 0"], [45, "mov rdi, rax"], [46, "call sub_405C84"], [47, "mov rax, [rbp+var_8]"], [48, "mov esi, 0"], [49, "mov rdi, rax"], [50, "call sub_405C84"], [51, "mov rax, [rbp+var_8]"], [52, "mov eax, [rax]"], [53, "not eax"], [54, "mov edx, eax"], [55, "mov rax, [rbp+var_8]"], [56, "mov esi, edx"], [57, "mov rdi, rax"], [58, "call sub_405D96"], [59, "nop"], [60, "leave"], [61, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [12, 3], [15, 12], [17, 4], [18, 17], [19, 18], [20, 3], [21, 19], [22, 20], [24, 4], [25, 24], [26, 25], [27, 3], [28, 26], [29, 27], [31, 3], [33, 31], [35, 3], [37, 35], [39, 3], [41, 39], [43, 3], [45, 43], [47, 3], [49, 47], [51, 3], [52, 51], [53, 52], [54, 53], [55, 3], [56, 54], [57, 55], [61, 58]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/e7bb82279eaf5f2b6f0488dd9061676e5e9c5c72cf1b72423b4d02abc5f9d14a_e7bb82279eaf5f2b6f0488dd9061676e5e9c5c72cf1b72423b4d02abc5f9d14a.jsonl.gz", "strip_func_name": "sub_406230", "query": "\n\n\n__int64 __fastcall sub_406230(__int64 a1, unsigned int *a2)\n{\nfwrite(&unk_40C340, 8uLL, 1uLL, *(FILE **)(a1 + 24));\nsub_405EBD((_DWORD *)a1, \"IHDR\", 0xDu);\nsub_405D96(a1, *a2);\nsub_405D96(a1, a2[1]);\nsub_405C84(a1, 8u);\nsub_405C84(a1, 6u);\nsub_405C84(a1, 0);\nsub_405C84(a1, 0);\nsub_405C84(a1, 0);\nreturn sub_405D96(a1, ~*(_DWORD *)a1);\n}\n\n\n\nQ:[a1,a2,sub_406230,sub_405EBD,sub_405D96,sub_405C84,]\nAssistant: ", "hints": "[]", "response": "{'a1': 's', 'a2': 'bmp', 'sub_406230': 'savePngHeader', 'sub_405EBD': 'begin', 'sub_405D96': 'put32', 'sub_405C84': 'put'}"} |
|
mulntt_ct_std2rev1024_base | a7fe382b917ac7e64c54f16d4b12565e9a379349a4bcc56328d134f9d785022b | SRI-CSL | NTT | NA | static void mulntt_ct_std2rev1024_base(int32_t *a) {
mulntt_red_ct_std2rev(a, 1024, rev_shoup_sred_scaled_ntt1024_12289);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401EF4", "function_addr": 4202228, "binary_name": "a7fe382b917ac7e64c54f16d4b12565e9a379349a4bcc56328d134f9d785022b.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 edx, offset unk_40D3E0"], [6, "mov esi, 400h"], [7, "mov rdi, rax"], [8, "call sub_4051A6"], [9, "nop"], [10, "leave"], [11, "retn"]], "data_dep": [[4, 3], [7, 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/a7fe382b917ac7e64c54f16d4b12565e9a379349a4bcc56328d134f9d785022b_a7fe382b917ac7e64c54f16d4b12565e9a379349a4bcc56328d134f9d785022b.jsonl.gz", "strip_func_name": "sub_401EF4", "query": "\n\n\n__int64 __fastcall sub_401EF4(__int64 a1)\n{\nreturn sub_4051A6(a1, 1024LL, &unk_40D3E0);\n}\n\n\n\nQ:[a1,sub_401EF4,sub_4051A6,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'a', 'sub_401EF4': 'mulntt_ct_std2rev1024_base', 'sub_4051A6': 'mulntt_red_ct_std2rev'}"} |
|
printi16mem | 23b57fe50de11e692ac0fdc29e161ccb6cbe21a200aecc695b811f04513510b2 | tandasat | cs_driver | NA | static void printi16mem(MCInst *MI, unsigned OpNo, SStream *O)
{
MI->x86opsize = 2;
printMemReference(MI, OpNo, O);
} | {"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4F16C7", "function_addr": 5183175, "binary_name": "23b57fe50de11e692ac0fdc29e161ccb6cbe21a200aecc695b811f04513510b2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_C], esi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rax, [rbp+var_8]"], [7, "mov byte ptr [rax+328h], 2"], [8, "mov rdx, [rbp+var_18]"], [9, "mov ecx, [rbp+var_C]"], [10, "mov rax, [rbp+var_8]"], [11, "mov esi, ecx"], [12, "mov rdi, rax"], [13, "call sub_4F3D92"], [14, "nop"], [15, "leave"], [16, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 5], [9, 4], [10, 3], [11, 9], [12, 10], [16, 13]]}
| {"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/23b57fe50de11e692ac0fdc29e161ccb6cbe21a200aecc695b811f04513510b2_23b57fe50de11e692ac0fdc29e161ccb6cbe21a200aecc695b811f04513510b2.jsonl.gz", "strip_func_name": "sub_4F16C7", "query": "\n\n\n__int64 __fastcall sub_4F16C7(__int64 a1, unsigned int a2, __int64 a3)\n{\n*(_BYTE *)(a1 + 808) = 2;\nreturn sub_4F3D92(a1, a2, a3);\n}\n\n\n\nQ:[a3,a1,a2,sub_4F16C7,sub_4F3D92,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'O', 'a1': 'MI', 'a2': 'OpNo', 'sub_4F16C7': 'printi16mem_0', 'sub_4F3D92': 'printMemReference_0'}"} |