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
stb_vorbis_decode_memory
83a9aa4126c589a6f8453a0849c3fcd29d44c939e30436d38b3d30eb244fd78e
solenum
exengine
NA
int stb_vorbis_decode_memory(const uint8 *mem, int len, int *channels, int *sample_rate, short **output) { int data_len, offset, total, limit, error; short *data; stb_vorbis *v = stb_vorbis_open_memory(mem, len, &error, NULL); if (v == NULL) return -1; limit = v->channels * 4096; *channels = v->channels; if (sample_rate) *sample_rate = v->sample_rate; offset = data_len = 0; total = limit; data = (short *) malloc(total * sizeof(*data)); if (data == NULL) { stb_vorbis_close(v); return -2; } for (;;) { int n = stb_vorbis_get_frame_short_interleaved(v, v->channels, data+offset, total-offset); if (n == 0) break; data_len += n; offset += n * v->channels; if (offset + limit > total) { short *data2; total *= 2; data2 = (short *) realloc(data, total * sizeof(*data)); if (data2 == NULL) { free(data); stb_vorbis_close(v); return -2; } data = data2; } } *output = data; stb_vorbis_close(v); return data_len; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_46B310", "function_addr": 4633360, "binary_name": "83a9aa4126c589a6f8453a0849c3fcd29d44c939e30436d38b3d30eb244fd78e.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 70h"], [3, "mov [rbp+var_48], rdi"], [4, "mov [rbp+var_4C], esi"], [5, "mov [rbp+var_58], rdx"], [6, "mov [rbp+var_60], rcx"], [7, "mov [rbp+var_68], r8"], [8, "lea rdx, [rbp+var_34]"], [9, "mov esi, [rbp+var_4C]"], [10, "mov rax, [rbp+var_48]"], [11, "mov ecx, 0"], [12, "mov rdi, rax"], [13, "call sub_46A492"], [14, "mov [rbp+var_20], rax"], [15, "cmp [rbp+var_20], 0"], [16, "jnz short loc_46B358"], [17, "mov eax, 0FFFFFFFFh"], [18, "jmp locret_46B493"], [19, "mov rax, [rbp+var_20]"], [20, "mov eax, [rax+4]"], [21, "shl eax, 0Ch"], [22, "mov [rbp+var_24], eax"], [23, "mov rax, [rbp+var_20]"], [24, "mov edx, [rax+4]"], [25, "mov rax, [rbp+var_58]"], [26, "mov [rax], edx"], [27, "cmp [rbp+var_60], 0"], [28, "jz short loc_46B387"], [29, "mov rax, [rbp+var_20]"], [30, "mov eax, [rax]"], [31, "mov edx, eax"], [32, "mov rax, [rbp+var_60]"], [33, "mov [rax], edx"], [34, "mov [rbp+var_4], 0"], [35, "mov eax, [rbp+var_4]"], [36, "mov [rbp+var_8], eax"], [37, "mov eax, [rbp+var_24]"], [38, "mov [rbp+var_C], eax"], [39, "mov eax, [rbp+var_C]"], [40, "cdqe"], [41, "add rax, rax"], [42, "mov rdi, rax"], [43, "call _malloc"], [44, "mov [rbp+ptr], rax"], [45, "cmp [rbp+ptr], 0"], [46, "jnz short loc_46B3CB"], [47, "mov rax, [rbp+var_20]"], [48, "mov rdi, rax"], [49, "call sub_468136"], [50, "mov eax, 0FFFFFFFEh"], [51, "jmp locret_46B493"], [52, "mov eax, [rbp+var_C]"], [53, "sub eax, [rbp+var_8]"], [54, "mov edx, eax"], [55, "mov eax, [rbp+var_8]"], [56, "cdqe"], [57, "lea rcx, [rax+rax]"], [58, "mov rax, [rbp+ptr]"], [59, "lea rdi, [rcx+rax]"], [60, "mov rax, [rbp+var_20]"], [61, "mov esi, [rax+4]"], [62, "mov rax, [rbp+var_20]"], [63, "mov ecx, edx"], [64, "mov rdx, rdi"], [65, "mov rdi, rax"], [66, "call sub_46AED6"], [67, "mov [rbp+var_28], eax"], [68, "cmp [rbp+var_28], 0"], [69, "jz short loc_46B478"], [70, "mov eax, [rbp+var_28]"], [71, "add [rbp+var_4], eax"], [72, "mov rax, [rbp+var_20]"], [73, "mov eax, [rax+4]"], [74, "imul eax, [rbp+var_28]"], [75, "add [rbp+var_8], eax"], [76, "mov edx, [rbp+var_8]"], [77, "mov eax, [rbp+var_24]"], [78, "add eax, edx"], [79, "cmp [rbp+var_C], eax"], [80, "jge short loc_46B3CB"], [81, "shl [rbp+var_C], 1"], [82, "mov eax, [rbp+var_C]"], [83, "cdqe"], [84, "lea rdx, [rax+rax]"], [85, "mov rax, [rbp+ptr]"], [86, "mov rsi, rdx"], [87, "mov rdi, rax"], [88, "call _realloc"], [89, "mov [rbp+var_30], rax"], [90, "cmp [rbp+var_30], 0"], [91, "jnz short loc_46B46B"], [92, "mov rax, [rbp+ptr]"], [93, "mov rdi, rax"], [94, "call _free"], [95, "mov rax, [rbp+var_20]"], [96, "mov rdi, rax"], [97, "call sub_468136"], [98, "mov eax, 0FFFFFFFEh"], [99, "jmp short locret_46B493"], [100, "mov rax, [rbp+var_30]"], [101, "mov [rbp+ptr], rax"], [102, "jmp loc_46B3CB"], [103, "nop"], [104, "mov rax, [rbp+var_68]"], [105, "mov rdx, [rbp+ptr]"], [106, "mov [rax], rdx"], [107, "mov rax, [rbp+var_20]"], [108, "mov rdi, rax"], [109, "call sub_468136"], [110, "mov eax, [rbp+var_4]"], [111, "leave"], [112, "retn"]], "data_dep": [[9, 4], [10, 3], [12, 10], [14, 13], [15, 14], [16, 15], [19, 14], [20, 19], [21, 20], [22, 21], [23, 14], [24, 23], [25, 5], [26, 25], [26, 24], [27, 6], [28, 27], [29, 14], [30, 29], [30, 33], [30, 26], [31, 30], [32, 6], [33, 31], [33, 32], [35, 34], [36, 35], [37, 22], [38, 37], [39, 38], [41, 39], [42, 41], [44, 43], [45, 44], [46, 45], [47, 14], [48, 47], [52, 81], [52, 38], [53, 75], [53, 52], [53, 36], [54, 53], [55, 75], [55, 36], [57, 11], [57, 63], [57, 33], [57, 26], [57, 55], [58, 44], [58, 101], [59, 33], [59, 42], [59, 26], [59, 65], [59, 58], [59, 87], [60, 14], [61, 33], [61, 26], [61, 60], [62, 14], [63, 54], [64, 59], [65, 62], [67, 66], [68, 67], [69, 68], [70, 67], [71, 71], [71, 34], [71, 70], [72, 14], [73, 26], [73, 72], [73, 33], [74, 73], [74, 67], [75, 74], [75, 75], [75, 36], [76, 75], [77, 22], [78, 77], [78, 76], [79, 81], [79, 78], [79, 38], [80, 79], [81, 38], [81, 81], [82, 81], [84, 33], [84, 26], [84, 76], [84, 82], [85, 44], [85, 101], [86, 84], [87, 85], [89, 88], [90, 89], [91, 90], [92, 44], [92, 101], [93, 92], [95, 14], [96, 95], [100, 89], [101, 100], [104, 7], [105, 44], [105, 101], [106, 104], [106, 105], [107, 14], [108, 107], [110, 71], [110, 34], [112, 50], [112, 17], [112, 110], [112, 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/83a9aa4126c589a6f8453a0849c3fcd29d44c939e30436d38b3d30eb244fd78e_83a9aa4126c589a6f8453a0849c3fcd29d44c939e30436d38b3d30eb244fd78e.jsonl.gz", "strip_func_name": "sub_46B310", "query": "\n\n\n__int64 __fastcall sub_46B310(__int64 a1, int a2, _DWORD *a3, _DWORD *a4, void **a5, __m128i a6)\n{\n__int64 result; // rax\nint v10; // [rsp+3Ch] [rbp-34h] BYREF\nvoid *v11; // [rsp+40h] [rbp-30h]\nint v12; // [rsp+48h] [rbp-28h]\nint v13; // [rsp+4Ch] [rbp-24h]\n__int64 *v14; // [rsp+50h] [rbp-20h]\nvoid *ptr; // [rsp+58h] [rbp-18h]\nint v16; // [rsp+64h] [rbp-Ch]\nint v17; // [rsp+68h] [rbp-8h]\nunsigned int v18; // [rsp+6Ch] [rbp-4h]\n\nv14 = sub_46A492(a1, a2, &v10, 0LL, a6);\nif ( !v14 )\nreturn 0xFFFFFFFFLL;\nv13 = *((_DWORD *)v14 + 1) << 12;\n*a3 = *((_DWORD *)v14 + 1);\nif ( a4 )\n*a4 = *(_DWORD *)v14;\nv18 = 0;\nv17 = 0;\nv16 = v13;\nptr = malloc(2LL * v13);\nif ( ptr )\n{\nwhile ( 1 )\n{\nv12 = sub_46AED6((__int64)v14, *((_DWORD *)v14 + 1), (__int64)ptr + 2 * v17, v16 - v17);\nif ( !v12 )\nbreak;\nv18 += v12;\nv17 += v12 * *((_DWORD *)v14 + 1);\nif ( v16 < v17 + v13 )\n{\nv16 *= 2;\nv11 = realloc(ptr, 2LL * v16);\nif ( !v11 )\n{\nfree(ptr);\nsub_468136(v14);\nreturn 4294967294LL;\n}\nptr = v11;\n}\n}\n*a5 = ptr;\nsub_468136(v14);\nresult = v18;\n}\nelse\n{\nsub_468136(v14);\nresult = 4294967294LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v10,v11,v12,v13,v14,ptr,v16,v17,v18,sub_46B310,sub_46A492,sub_46AED6,sub_468136,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'channels', 'a4': 'sample_rate', 'a1': 'mem', 'a2': 'len', 'a5': 'output', 'v10': 'error', 'v11': 'data2', 'v12': 'n', 'v13': 'limit', 'v14': 'v', 'ptr': 'data', 'v16': 'total', 'v17': 'offset', 'v18': 'data_len', 'sub_46B310': 'stb_vorbis_decode_memory', 'sub_46A492': 'stb_vorbis_open_memory', 'sub_46AED6': 'stb_vorbis_get_frame_short_interleaved', 'sub_468136': 'stb_vorbis_close'}"}
clear_badblock
419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934
neilbrown
mdadm
NA
static int clear_badblock(struct bbm_log *log, const __u8 idx, const unsigned long long sector, const int length) { __u32 i = 0; while (i < log->entry_count) { struct bbm_log_entry *entries = log->marked_block_entries; if ((entries[i].disk_ordinal == idx) && (__le48_to_cpu(&entries[i].defective_block_start) == sector) && (entries[i].marked_count + 1 == length)) { if (i < log->entry_count - 1) entries[i] = entries[log->entry_count - 1]; log->entry_count--; break; } i++; } return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_45ACEB", "function_addr": 4566251, "binary_name": "419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 28h"], [3, "mov [rbp+var_18], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_28], rdx"], [6, "mov [rbp+var_20], ecx"], [7, "mov [rbp+var_1C], al"], [8, "mov [rbp+var_4], 0"], [9, "jmp loc_45ADD7"], [10, "mov rax, [rbp+var_18]"], [11, "add rax, 8"], [12, "mov [rbp+var_10], rax"], [13, "mov eax, [rbp+var_4]"], [14, "lea rdx, ds:0[rax*8]"], [15, "mov rax, [rbp+var_10]"], [16, "add rax, rdx"], [17, "movzx eax, byte ptr [rax+1]"], [18, "cmp [rbp+var_1C], al"], [19, "jnz loc_45ADD3"], [20, "mov eax, [rbp+var_4]"], [21, "lea rdx, ds:0[rax*8]"], [22, "mov rax, [rbp+var_10]"], [23, "add rax, rdx"], [24, "add rax, 2"], [25, "mov rdi, rax"], [26, "call sub_45A8F4"], [27, "cmp [rbp+var_28], rax"], [28, "jnz short loc_45ADD3"], [29, "mov eax, [rbp+var_4]"], [30, "lea rdx, ds:0[rax*8]"], [31, "mov rax, [rbp+var_10]"], [32, "add rax, rdx"], [33, "movzx eax, byte ptr [rax]"], [34, "movzx eax, al"], [35, "add eax, 1"], [36, "cmp [rbp+var_20], eax"], [37, "jnz short loc_45ADD3"], [38, "mov rax, [rbp+var_18]"], [39, "mov eax, [rax+4]"], [40, "sub eax, 1"], [41, "cmp [rbp+var_4], eax"], [42, "jnb short loc_45ADC0"], [43, "mov rax, [rbp+var_18]"], [44, "mov eax, [rax+4]"], [45, "sub eax, 1"], [46, "mov eax, eax"], [47, "lea rdx, ds:0[rax*8]"], [48, "mov rax, [rbp+var_10]"], [49, "add rax, rdx"], [50, "mov edx, [rbp+var_4]"], [51, "lea rcx, ds:0[rdx*8]"], [52, "mov rdx, [rbp+var_10]"], [53, "add rdx, rcx"], [54, "mov rax, [rax]"], [55, "mov [rdx], rax"], [56, "mov rax, [rbp+var_18]"], [57, "mov eax, [rax+4]"], [58, "lea edx, [rax-1]"], [59, "mov rax, [rbp+var_18]"], [60, "mov [rax+4], edx"], [61, "jmp short loc_45ADE7"], [62, "add [rbp+var_4], 1"], [63, "mov rax, [rbp+var_18]"], [64, "mov eax, [rax+4]"], [65, "cmp [rbp+var_4], eax"], [66, "jb loc_45AD0F"], [67, "mov eax, 1"], [68, "leave"], [69, "retn"]], "data_dep": [[7, 4], [10, 3], [11, 10], [12, 11], [13, 8], [13, 62], [14, 21], [14, 30], [14, 14], [15, 12], [16, 15], [16, 14], [17, 16], [18, 17], [18, 7], [19, 18], [20, 8], [20, 62], [21, 14], [22, 12], [23, 22], [23, 21], [24, 23], [25, 24], [27, 26], [27, 5], [28, 27], [29, 8], [29, 62], [30, 21], [31, 12], [32, 30], [32, 31], [33, 32], [34, 33], [35, 34], [36, 6], [36, 35], [37, 36], [38, 3], [39, 38], [40, 39], [41, 40], [41, 8], [41, 62], [42, 41], [43, 3], [44, 43], [45, 44], [46, 45], [47, 30], [48, 12], [49, 48], [49, 47], [50, 8], [50, 62], [52, 12], [53, 52], [53, 51], [54, 49], [55, 54], [55, 53], [56, 3], [57, 56], [57, 60], [57, 55], [58, 53], [58, 30], [58, 60], [58, 55], [58, 57], [59, 3], [60, 59], [60, 58], [62, 8], [62, 62], [63, 3], [64, 63], [65, 8], [65, 62], [65, 64], [66, 65], [69, 67]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934_419510bcecc994a3754e5ab47aa58d228bb38fb3eef1e1256af3b83aa3eae934.jsonl.gz", "strip_func_name": "sub_45ACEB", "query": "\n\n\n__int64 __fastcall sub_45ACEB(__int64 a1, char a2, __int64 a3, int a4)\n{\n__int64 v7; // [rsp+18h] [rbp-10h]\nunsigned int i; // [rsp+24h] [rbp-4h]\n\nfor ( i = 0; i < *(_DWORD *)(a1 + 4); ++i )\n{\nv7 = a1 + 8;\nif ( a2 == *(_BYTE *)(8LL * i + a1 + 8 + 1)\n&& a3 == sub_45A8F4((unsigned __int16 *)(8LL * i + v7 + 2))\n&& a4 == *(unsigned __int8 *)(8LL * i + v7) + 1 )\n{\nif ( i < *(_DWORD *)(a1 + 4) - 1 )\n*(_QWORD *)(8LL * i + v7) = *(_QWORD *)(8LL * (unsigned int)(*(_DWORD *)(a1 + 4) - 1) + v7);\n--*(_DWORD *)(a1 + 4);\nreturn 1LL;\n}\n}\nreturn 1LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,v7,sub_45ACEB,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'sector', 'a4': 'length', 'a1': 'log', 'a2': 'idx', 'v7': 'entries', 'sub_45ACEB': 'clear_badblock'}"}
audio_write_alsa
406d6475d917ac4ca073112b720b74447f364fa734e3f1480dea17856dd38b27
festvox
flite
NA
int audio_write_alsa(cst_audiodev *ad, void *samples, int num_bytes) { size_t frame_size; ssize_t num_frames, res; snd_pcm_t *pcm_handle; char *buf = (char *) samples; /* Determine frame size in bytes */ frame_size = audio_bps(ad->real_fmt) * ad->real_channels; /* Require that only complete frames are handed in */ assert((num_bytes % frame_size) == 0); num_frames = num_bytes / frame_size; pcm_handle = (snd_pcm_t *) ad->platform_data; while (num_frames > 0) { res = snd_pcm_writei(pcm_handle, buf, num_frames); if (res != num_frames) { if (res == -EAGAIN || (res > 0 && res < num_frames)) { snd_pcm_wait(pcm_handle, 100); } else if (recover_from_error(pcm_handle, res) < 0) { return -1; } } if (res >0) { num_frames -= res; buf += res * frame_size; } } return num_bytes; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41B9EB", "function_addr": 4307435, "binary_name": "406d6475d917ac4ca073112b720b74447f364fa734e3f1480dea17856dd38b27.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_38], rdi"], [4, "mov [rbp+var_40], rsi"], [5, "mov [rbp+var_44], edx"], [6, "mov rax, [rbp+var_40]"], [7, "mov [rbp+var_10], rax"], [8, "mov rax, [rbp+var_38]"], [9, "mov eax, [rax+14h]"], [10, "mov edi, eax"], [11, "call sub_41A8CF"], [12, "mov rdx, [rbp+var_38]"], [13, "mov edx, [rdx+0Ch]"], [14, "imul eax, edx"], [15, "cdqe"], [16, "mov [rbp+var_18], rax"], [17, "mov eax, [rbp+var_44]"], [18, "cdqe"], [19, "mov edx, 0"], [20, "div [rbp+var_18]"], [21, "mov rax, rdx"], [22, "test rax, rax"], [23, "jz short loc_41BA53"], [24, "mov ecx, offset aAudioWriteAlsa"], [25, "mov edx, 113h"], [26, "mov esi, offset file"], [27, "mov edi, offset aNumBytesFrameS"], [28, "call ___assert_fail"], [29, "mov eax, [rbp+var_44]"], [30, "cdqe"], [31, "mov edx, 0"], [32, "div [rbp+var_18]"], [33, "mov [rbp+var_8], rax"], [34, "mov rax, [rbp+var_38]"], [35, "mov rax, [rax+28h]"], [36, "mov [rbp+var_20], rax"], [37, "jmp loc_41BB00"], [38, "mov rdx, [rbp+var_8]"], [39, "mov rcx, [rbp+var_10]"], [40, "mov rax, [rbp+var_20]"], [41, "mov rsi, rcx"], [42, "mov rdi, rax"], [43, "call _snd_pcm_writei"], [44, "mov [rbp+var_28], rax"], [45, "mov rax, [rbp+var_28]"], [46, "cmp rax, [rbp+var_8]"], [47, "jz short loc_41BAE4"], [48, "cmp [rbp+var_28], 0FFFFFFFFFFFFFFF5h"], [49, "jz short loc_41BAB3"], [50, "cmp [rbp+var_28], 0"], [51, "jle short loc_41BAC6"], [52, "mov rax, [rbp+var_28]"], [53, "cmp rax, [rbp+var_8]"], [54, "jge short loc_41BAC6"], [55, "mov rax, [rbp+var_20]"], [56, "mov esi, 64h "], [57, "mov rdi, rax"], [58, "call _snd_pcm_wait"], [59, "jmp short loc_41BAE4"], [60, "mov rdx, [rbp+var_28]"], [61, "mov rax, [rbp+var_20]"], [62, "mov rsi, rdx"], [63, "mov rdi, rax"], [64, "call sub_41B8EA"], [65, "test eax, eax"], [66, "jns short loc_41BAE4"], [67, "mov eax, 0FFFFFFFFh"], [68, "jmp short locret_41BB0E"], [69, "cmp [rbp+var_28], 0"], [70, "jle short loc_41BB00"], [71, "mov rax, [rbp+var_28]"], [72, "sub [rbp+var_8], rax"], [73, "mov rax, [rbp+var_28]"], [74, "imul rax, [rbp+var_18]"], [75, "add [rbp+var_10], rax"], [76, "cmp [rbp+var_8], 0"], [77, "jg loc_41BA76"], [78, "mov eax, [rbp+var_44]"], [79, "leave"], [80, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 3], [9, 8], [10, 9], [12, 3], [13, 12], [14, 13], [14, 11], [16, 14], [17, 5], [20, 16], [21, 19], [22, 21], [23, 22], [29, 5], [32, 20], [33, 29], [34, 3], [35, 34], [36, 35], [38, 33], [38, 72], [39, 75], [39, 7], [40, 36], [41, 39], [42, 40], [44, 43], [45, 44], [46, 33], [46, 45], [46, 72], [47, 46], [48, 44], [49, 48], [50, 44], [51, 50], [52, 44], [53, 72], [53, 52], [53, 33], [54, 53], [55, 36], [57, 55], [60, 44], [61, 36], [62, 60], [63, 61], [65, 64], [66, 65], [69, 44], [70, 69], [71, 44], [72, 33], [72, 72], [72, 71], [73, 44], [74, 73], [74, 32], [75, 75], [75, 7], [75, 74], [76, 33], [76, 72], [77, 76], [78, 5], [80, 67], [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/406d6475d917ac4ca073112b720b74447f364fa734e3f1480dea17856dd38b27_406d6475d917ac4ca073112b720b74447f364fa734e3f1480dea17856dd38b27.jsonl.gz", "strip_func_name": "sub_41B9EB", "query": "\n\n\n__int64 __fastcall sub_41B9EB(__int64 a1, __int64 a2, unsigned int a3)\n{\n__int64 v5; // [rsp+28h] [rbp-28h]\n__int64 v6; // [rsp+30h] [rbp-20h]\nunsigned __int64 v7; // [rsp+38h] [rbp-18h]\nsigned __int64 v9; // [rsp+48h] [rbp-8h]\n\nv7 = (int)(*(_DWORD *)(a1 + 12) * sub_41A8CF(*(_DWORD *)(a1 + 20)));\nif ( (int)a3 % v7 )\n__assert_fail(\"(num_bytes % frame_size) == 0\", \"au_alsa.c\", 0x113u, \"audio_write_alsa\");\nv9 = (int)a3 / v7;\nv6 = *(_QWORD *)(a1 + 40);\nwhile ( v9 > 0 )\n{\nv5 = snd_pcm_writei();\nif ( v5 != v9 )\n{\nif ( v5 == -11 || v5 > 0 && v5 < v9 )\n{\nsnd_pcm_wait();\n}\nelse if ( (int)sub_41B8EA(v6, v5) < 0 )\n{\nreturn 0xFFFFFFFFLL;\n}\n}\nif ( v5 > 0 )\n{\nv9 -= v5;\na2 += v7 * v5;\n}\n}\nreturn a3;\n}\n\n\n\nQ:[a3,a1,a2,v5,v6,v7,v9,sub_41B9EB,sub_41A8CF,sub_41B8EA,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'num_bytes', 'a1': 'ad', 'a2': 'samples', 'v5': 'res', 'v6': 'pcm_handle', 'v7': 'frame_size', 'v9': 'num_frames', 'sub_41B9EB': 'audio_write_alsa', 'sub_41A8CF': 'audio_bps', 'sub_41B8EA': 'recover_from_error'}"}
IsSpace
bd3828dfb34ba781bec33c1de282f318297bb654233245dae251c4e307355d55
glouw
rr
NA
static bool IsSpace(int64_t c) { return c == '\n' || c == '\t' || c == '\r' || c == ' '; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406FCC", "function_addr": 4222924, "binary_name": "bd3828dfb34ba781bec33c1de282f318297bb654233245dae251c4e307355d55.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "cmp [rbp+var_8], 0Ah"], [4, "jz short loc_406FF0"], [5, "cmp [rbp+var_8], 9"], [6, "jz short loc_406FF0"], [7, "cmp [rbp+var_8], 0Dh"], [8, "jz short loc_406FF0"], [9, "cmp [rbp+var_8], 20h "], [10, "jnz short loc_406FF7"], [11, "mov eax, 1"], [12, "jmp short loc_406FFC"], [13, "mov eax, 0"], [14, "and eax, 1"], [15, "pop rbp"], [16, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 2], [6, 5], [7, 2], [8, 7], [9, 2], [10, 9], [14, 11], [14, 13], [15, 0], [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/bd3828dfb34ba781bec33c1de282f318297bb654233245dae251c4e307355d55_bd3828dfb34ba781bec33c1de282f318297bb654233245dae251c4e307355d55.jsonl.gz", "strip_func_name": "sub_406FCC", "query": "\n\n\n_BOOL8 __fastcall sub_406FCC(__int64 a1)\n{\nreturn a1 == 10 || a1 == 9 || a1 == 13 || a1 == 32;\n}\n\n\n\nQ:[a1,sub_406FCC,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'c', 'sub_406FCC': 'IsSpace'}"}
write_data
1f83c8a3267372d5740c42f791074f85bfc0410cc735051e6b363d1ae0faf252
syzygy1
tb
NA
void write_data(FILE *F, uint8_t *src, uint64_t offset, uint64_t size, uint8_t *v) { init(); cmprs_F = F; cmprs_ptr = src; cmprs_size = offset + size; cmprs_v = v; cmprs_idx = offset; run_compression(write_data_worker); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42F631", "function_addr": 4388401, "binary_name": "1f83c8a3267372d5740c42f791074f85bfc0410cc735051e6b363d1ae0faf252.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov [rbp+var_20], rcx"], [7, "mov [rbp+var_28], r8"], [8, "call sub_42F221"], [9, "mov rax, [rbp+var_8]"], [10, "mov cs:qword_96BA548, rax"], [11, "mov rax, [rbp+var_10]"], [12, "mov cs:qword_96BA550, rax"], [13, "mov rdx, [rbp+var_18]"], [14, "mov rax, [rbp+var_20]"], [15, "add rax, rdx"], [16, "mov cs:qword_96BA558, rax"], [17, "mov rax, [rbp+var_28]"], [18, "mov cs:qword_96BA560, rax"], [19, "mov rax, [rbp+var_18]"], [20, "mov cs:qword_96BA568, rax"], [21, "mov edi, offset sub_42F4B6"], [22, "call sub_42765E"], [23, "nop"], [24, "leave"], [25, "retn"]], "data_dep": [[9, 3], [10, 9], [11, 4], [12, 11], [13, 5], [14, 6], [15, 14], [15, 13], [16, 15], [17, 7], [18, 17], [19, 5], [20, 19], [25, 22]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1f83c8a3267372d5740c42f791074f85bfc0410cc735051e6b363d1ae0faf252_1f83c8a3267372d5740c42f791074f85bfc0410cc735051e6b363d1ae0faf252.jsonl.gz", "strip_func_name": "sub_42F631", "query": "\n\n\nvoid *__fastcall sub_42F631(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5)\n{\nsub_42F221();\nqword_96BA548 = a1;\nqword_96BA550 = a2;\nqword_96BA558 = a3 + a4;\nqword_96BA560 = a5;\nqword_96BA568 = a3;\nreturn sub_42765E((__int64 (__fastcall *)(_QWORD))sub_42F4B6);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,sub_42F631,sub_42F221,sub_42765E,sub_42F4B6,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'offset', 'a4': 'size', 'a1': 'F', 'a2': 'src', 'a5': 'v', 'sub_42F631': 'write_data', 'sub_42F221': 'init', 'sub_42765E': 'run_compression', 'sub_42F4B6': 'write_data_worker'}"}
duk__enc_double
3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea
creationix
dukluv
NA
DUK_LOCAL void duk__enc_double(duk_json_enc_ctx *js_ctx) { duk_hthread *thr; duk_context *ctx; duk_tval *tv; duk_double_t d; duk_small_int_t c; duk_small_int_t s; duk_small_uint_t stridx; duk_small_uint_t n2s_flags; duk_hstring *h_str; DUK_ASSERT(js_ctx != NULL); thr = js_ctx->thr; DUK_ASSERT(thr != NULL); ctx = (duk_context *) thr; /* Caller must ensure 'tv' is indeed a double and not a fastint! */ tv = DUK_GET_TVAL_NEGIDX(ctx, -1); DUK_ASSERT(DUK_TVAL_IS_DOUBLE(tv)); d = DUK_TVAL_GET_DOUBLE(tv); c = (duk_small_int_t) DUK_FPCLASSIFY(d); s = (duk_small_int_t) DUK_SIGNBIT(d); DUK_UNREF(s); if (DUK_LIKELY(!(c == DUK_FP_INFINITE || c == DUK_FP_NAN))) { DUK_ASSERT(DUK_ISFINITE(d)); #if defined(DUK_USE_JX) || defined(DUK_USE_JC) /* Negative zero needs special handling in JX/JC because * it would otherwise serialize to '0', not '-0'. */ if (DUK_UNLIKELY(c == DUK_FP_ZERO && s != 0 && (js_ctx->flag_ext_custom_or_compatible))) { duk_push_hstring_stridx(ctx, DUK_STRIDX_MINUS_ZERO); /* '-0' */ } else #endif /* DUK_USE_JX || DUK_USE_JC */ { n2s_flags = 0; /* [ ... number ] -> [ ... string ] */ duk_numconv_stringify(ctx, 10 /*radix*/, 0 /*digits*/, n2s_flags); } h_str = duk_to_hstring(ctx, -1); DUK_ASSERT(h_str != NULL); DUK__EMIT_HSTR(js_ctx, h_str); return; } #if defined(DUK_USE_JX) || defined(DUK_USE_JC) if (!(js_ctx->flags & (DUK_JSON_FLAG_EXT_CUSTOM | DUK_JSON_FLAG_EXT_COMPATIBLE))) { stridx = DUK_STRIDX_LC_NULL; } else if (c == DUK_FP_NAN) { stridx = js_ctx->stridx_custom_nan; } else if (s == 0) { stridx = js_ctx->stridx_custom_posinf; } else { stridx = js_ctx->stridx_custom_neginf; } #else stridx = DUK_STRIDX_LC_NULL; #endif DUK__EMIT_STRIDX(js_ctx, stridx); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43FEF1", "function_addr": 4456177, "binary_name": "3eef51aaf1b7c436a69b2722242bd3a427d13d57fe49c5d2c5815175a4745eea.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_48], rdi"], [4, "cmp [rbp+var_48], 0"], [5, "jnz short loc_43FF13"], [6, "mov esi, offset aAssertionFaile_4078"], [7, "mov edi, 36h "], [8, "call sub_402AA8"], [9, "mov rax, [rbp+var_48]"], [10, "mov rax, [rax]"], [11, "mov [rbp+var_10], rax"], [12, "cmp [rbp+var_10], 0"], [13, "jnz short loc_43FF34"], [14, "mov esi, offset aAssertionFaile_4079"], [15, "mov edi, 36h "], [16, "call sub_402AA8"], [17, "mov rax, [rbp+var_10]"], [18, "mov [rbp+var_18], rax"], [19, "mov rax, [rbp+var_18]"], [20, "mov esi, 0FFFFFFFFh"], [21, "mov rdi, rax"], [22, "call sub_4128F9"], [23, "test eax, eax"], [24, "jnz short loc_43FF60"], [25, "mov esi, offset aAssertionFaile_4080"], [26, "mov edi, 36h "], [27, "call sub_402AA8"], [28, "mov rax, [rbp+var_18]"], [29, "mov rax, [rax+88h]"], [30, "sub rax, 10h"], [31, "mov [rbp+var_20], rax"], [32, "mov rax, [rbp+var_20]"], [33, "mov eax, [rax]"], [34, "test eax, eax"], [35, "jz short loc_43FF8C"], [36, "mov esi, offset aAssertionFaile_4081"], [37, "mov edi, 36h "], [38, "call sub_402AA8"], [39, "mov rax, [rbp+var_20]"], [40, "movsd xmm0, qword ptr [rax+8]"], [41, "movsd [rbp+var_28], xmm0"], [42, "movsd xmm0, [rbp+var_28]"], [43, "movq xmm1, cs:qword_53B8E0"], [44, "andpd xmm0, xmm1"], [45, "ucomisd xmm0, xmm0"], [46, "jp short loc_43FFF5"], [47, "ucomisd xmm0, cs:qword_53B8F0"], [48, "ja short loc_43FFEE"], [49, "comisd xmm0, cs:qword_53B8F8"], [50, "jb short loc_43FFCC"], [51, "mov eax, 4"], [52, "jmp short loc_43FFFA"], [53, "pxor xmm1, xmm1"], [54, "ucomisd xmm0, xmm1"], [55, "jp short loc_43FFE7"], [56, "pxor xmm1, xmm1"], [57, "ucomisd xmm0, xmm1"], [58, "jnz short loc_43FFE7"], [59, "mov eax, 2"], [60, "jmp short loc_43FFFA"], [61, "mov eax, 3"], [62, "jmp short loc_43FFFA"], [63, "mov eax, 1"], [64, "jmp short loc_43FFFA"], [65, "mov eax, 0"], [66, "mov [rbp+var_2C], eax"], [67, "movsd xmm0, [rbp+var_28]"], [68, "movmskpd eax, xmm0"], [69, "and eax, 1"], [70, "mov [rbp+var_30], eax"], [71, "cmp [rbp+var_2C], 1"], [72, "setnz al"], [73, "movzx eax, al"], [74, "test rax, rax"], [75, "jz loc_440117"], [76, "cmp [rbp+var_2C], 0"], [77, "setnz al"], [78, "movzx eax, al"], [79, "test rax, rax"], [80, "jz loc_440117"], [81, "movsd xmm0, [rbp+var_28]"], [82, "movq xmm1, cs:qword_53B8E0"], [83, "andpd xmm1, xmm0"], [84, "movsd xmm0, cs:qword_53B8F0"], [85, "ucomisd xmm0, xmm1"], [86, "jnb short loc_440060"], [87, "mov esi, offset aAssertionFaile_4082"], [88, "mov edi, 36h "], [89, "call sub_402AA8"], [90, "cmp [rbp+var_2C], 2"], [91, "setz al"], [92, "movzx eax, al"], [93, "test rax, rax"], [94, "jz short loc_440085"], [95, "cmp [rbp+var_30], 0"], [96, "setnz al"], [97, "movzx eax, al"], [98, "test rax, rax"], [99, "jz short loc_440085"], [100, "mov eax, 1"], [101, "jmp short loc_44008A"], [102, "mov eax, 0"], [103, "test eax, eax"], [104, "jz short loc_4400B5"], [105, "mov rax, [rbp+var_48]"], [106, "mov eax, [rax+54h]"], [107, "test eax, eax"], [108, "setnz al"], [109, "movzx eax, al"], [110, "test rax, rax"], [111, "jz short loc_4400B5"], [112, "mov rax, [rbp+var_18]"], [113, "mov esi, 3Dh "], [114, "mov rdi, rax"], [115, "call sub_428EC0"], [116, "jmp short loc_4400D7"], [117, "mov [rbp+var_34], 0"], [118, "mov edx, [rbp+var_34]"], [119, "mov rax, [rbp+var_18]"], [120, "mov ecx, edx"], [121, "mov edx, 0"], [122, "mov esi, 0Ah"], [123, "mov rdi, rax"], [124, "call sub_48C025"], [125, "mov rax, [rbp+var_18]"], [126, "mov esi, 0FFFFFFFFh"], [127, "mov rdi, rax"], [128, "call sub_41DC90"], [129, "mov [rbp+var_40], rax"], [130, "cmp [rbp+var_40], 0"], [131, "jnz short loc_440102"], [132, "mov esi, offset aAssertionFaile_4083"], [133, "mov edi, 36h "], [134, "call sub_402AA8"], [135, "mov rdx, [rbp+var_40]"], [136, "mov rax, [rbp+var_48]"], [137, "mov rsi, rdx"], [138, "mov rdi, rax"], [139, "call sub_43F577"], [140, "jmp short locret_44016D"], [141, "mov rax, [rbp+var_48]"], [142, "mov eax, [rax+40h]"], [143, "and eax, 0Ch"], [144, "test eax, eax"], [145, "jnz short loc_44012E"], [146, "mov [rbp+var_4], 0B3h"], [147, "jmp short loc_44015C"], [148, "cmp [rbp+var_2C], 0"], [149, "jnz short loc_440140"], [150, "mov rax, [rbp+var_48]"], [151, "mov eax, [rax+68h]"], [152, "mov [rbp+var_4], eax"], [153, "jmp short loc_44015C"], [154, "cmp [rbp+var_30], 0"], [155, "jnz short loc_440152"], [156, "mov rax, [rbp+var_48]"], [157, "mov eax, [rax+70h]"], [158, "mov [rbp+var_4], eax"], [159, "jmp short loc_44015C"], [160, "mov rax, [rbp+var_48]"], [161, "mov eax, [rax+6Ch]"], [162, "mov [rbp+var_4], eax"], [163, "mov edx, [rbp+var_4]"], [164, "mov rax, [rbp+var_48]"], [165, "mov esi, edx"], [166, "mov rdi, rax"], [167, "call sub_43F806"], [168, "leave"], [169, "retn"]], "data_dep": [[4, 3], [5, 4], [9, 3], [10, 9], [11, 10], [12, 11], [13, 12], [17, 11], [18, 17], [19, 18], [21, 19], [23, 22], [24, 23], [28, 18], [29, 28], [30, 29], [31, 30], [32, 31], [33, 32], [34, 33], [35, 34], [39, 31], [40, 39], [41, 40], [42, 41], [44, 42], [44, 43], [45, 44], [46, 34], [47, 45], [48, 34], [49, 47], [50, 34], [54, 49], [54, 53], [55, 34], [57, 54], [57, 56], [58, 34], [66, 59], [66, 61], [66, 63], [66, 51], [66, 65], [67, 41], [68, 67], [69, 68], [70, 69], [71, 66], [72, 69], [72, 71], [73, 72], [74, 73], [75, 74], [76, 66], [77, 76], [77, 74], [78, 77], [79, 78], [80, 79], [81, 41], [83, 82], [83, 81], [85, 84], [85, 83], [86, 79], [90, 66], [91, 79], [91, 90], [92, 91], [93, 92], [94, 93], [95, 70], [96, 95], [96, 93], [97, 96], [98, 97], [99, 98], [103, 102], [103, 100], [104, 103], [105, 3], [106, 105], [107, 106], [108, 107], [109, 108], [110, 109], [111, 110], [112, 18], [114, 112], [118, 117], [119, 18], [120, 118], [123, 119], [125, 18], [127, 125], [129, 128], [130, 129], [131, 130], [135, 129], [136, 3], [137, 135], [138, 136], [141, 3], [142, 141], [143, 142], [144, 143], [145, 144], [148, 66], [149, 148], [150, 3], [151, 150], [152, 151], [154, 70], [155, 154], [156, 3], [157, 156], [158, 157], [160, 3], [161, 160], [162, 161], [163, 152], [163, 158], [163, 162], [163, 146], [164, 3], [165, 163], [166, 164], [169, 167], [169, 139]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_43FEF1", "query": "\n\n\n__int64 __fastcall sub_43FEF1(__int64 a1)\n{\ndouble v1; // xmm0_8\nint v2; // eax\n_BOOL4 v3; // eax\n__int64 v4; // rdx\n__int64 v5; // rcx\n__int64 v6; // r8\n__int64 v7; // r9\n__int64 result; // rax\n__int64 v9; // [rsp+10h] [rbp-40h]\nint v10; // [rsp+20h] [rbp-30h]\ndouble v11; // [rsp+28h] [rbp-28h]\n__int64 v12; // [rsp+30h] [rbp-20h]\n__int64 v13; // [rsp+40h] [rbp-10h]\n\nif ( !a1 )\nsub_402AA8(54, \"assertion failed: js_ctx != NULL (duk_bi_json.c:1345)\");\nv13 = *(_QWORD *)a1;\nif ( !*(_QWORD *)a1 )\nsub_402AA8(54, \"assertion failed: thr != NULL (duk_bi_json.c:1347)\");\nif ( !sub_4128F9(v13, -1) )\nsub_402AA8(54, \"assertion failed: duk_is_valid_index(((ctx)), ((-1))) (duk_bi_json.c:1351)\");\nv12 = *(_QWORD *)(v13 + 136) - 16LL;\nif ( *(_DWORD *)v12 )\nsub_402AA8(54, \"assertion failed: DUK_TVAL_IS_DOUBLE(tv) (duk_bi_json.c:1352)\");\nv11 = *(double *)(v12 + 8);\nv1 = fabs(v11);\nif ( v1 > 1.797693134862316e308 )\n{\nv2 = 1;\n}\nelse if ( v1 < 2.225073858507201e-308 )\n{\nif ( v1 == 0.0 )\nv2 = 2;\nelse\nv2 = 3;\n}\nelse\n{\nv2 = 4;\n}\nv10 = _mm_movemask_pd((__m128d)*(unsigned __int64 *)&v11) & 1;\nif ( v2 == 1 )\n{\nif ( (*(_DWORD *)(a1 + 64) & 0xC) != 0 )\n{\nif ( v10 )\nresult = (__int64)sub_43F806((_QWORD *)a1, *(_DWORD *)(a1 + 108));\nelse\nresult = (__int64)sub_43F806((_QWORD *)a1, *(_DWORD *)(a1 + 112));\n}\nelse\n{\nresult = (__int64)sub_43F806((_QWORD *)a1, 0xB3u);\n}\n}\nelse\n{\nif ( fabs(v11) > 1.797693134862316e308 )\nsub_402AA8(54, \"assertion failed: DUK_ISFINITE(d) (duk_bi_json.c:1360)\");\nv3 = v2 == 2 && v10;\nif ( v3 && *(_DWORD *)(a1 + 84) )\nsub_428EC0(v13, 61);\nelse\nsub_48C025(v13, 10LL, 0LL, 0LL);\nv9 = sub_41DC90(v13, 0xFFFFFFFF, v4, v5, v6, v7);\nif ( !v9 )\nsub_402AA8(54, \"assertion failed: h_str != NULL (duk_bi_json.c:1377)\");\nresult = sub_43F577(a1, v9);\n}\nreturn result;\n}\n\n\n\nQ:[a1,v9,v10,v11,v12,v13,sub_43FEF1,sub_402AA8,sub_4128F9,sub_43F806,sub_428EC0,sub_48C025,sub_41DC90,sub_43F577,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'js_ctx', 'v9': 'h_str', 'v10': 's', 'v11': 'd', 'v12': 'tv', 'v13': 'thr', 'sub_43FEF1': 'duk__enc_double', 'sub_402AA8': 'duk_default_panic_handler', 'sub_4128F9': 'duk_is_valid_index', 'sub_43F806': 'duk__emit_stridx', 'sub_428EC0': 'duk_push_hstring_stridx', 'sub_48C025': 'duk_numconv_stringify', 'sub_41DC90': 'duk_to_hstring', 'sub_43F577': 'duk__emit_hstring'}"}
handle_up_down
98c1b283e9476c8bb95f42e4df7f4804ca1f7d9923e0f8202de3a9c87c2fc447
asterisk
pjproject-archive
NA
static pj_bool_t handle_up_down(cli_telnet_sess *sess, pj_bool_t is_up) { pj_str_t *history; PJ_ASSERT_RETURN(sess, PJ_FALSE); history = get_prev_history(sess, is_up); if (history) { pj_str_t send_data; char str[PJ_CLI_MAX_CMDBUF]; enum { MOVE_CURSOR_LEFT = 0x08, CLEAR_CHAR = 0x20 }; send_data.ptr = str; send_data.slen = 0; /* Move cursor position to the beginning of line */ if (sess->rcmd->cur_pos > 0) { pj_memset(send_data.ptr, MOVE_CURSOR_LEFT, sess->rcmd->cur_pos); send_data.slen = sess->rcmd->cur_pos; } if (sess->rcmd->len > (unsigned)history->slen) { /* Clear the command currently shown*/ unsigned buf_len = sess->rcmd->len; pj_memset(&send_data.ptr[send_data.slen], CLEAR_CHAR, buf_len); send_data.slen += buf_len; /* Move cursor position to the beginning of line */ pj_memset(&send_data.ptr[send_data.slen], MOVE_CURSOR_LEFT, buf_len); send_data.slen += buf_len; } /* Send data */ pj_strcat(&send_data, history); telnet_sess_send(sess, &send_data); pj_ansi_strncpy((char*)&sess->rcmd->rbuf, history->ptr, history->slen); sess->rcmd->rbuf[history->slen] = 0; sess->rcmd->len = (unsigned)history->slen; sess->rcmd->cur_pos = sess->rcmd->len; return PJ_TRUE; } return PJ_FALSE; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40AF16", "function_addr": 4239126, "binary_name": "98c1b283e9476c8bb95f42e4df7f4804ca1f7d9923e0f8202de3a9c87c2fc447.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 230h"], [3, "mov [rbp+var_228], rdi"], [4, "mov [rbp+var_22C], esi"], [5, "cmp [rbp+var_228], 0"], [6, "jnz short loc_40AF65"], [7, "cmp [rbp+var_228], 0"], [8, "jnz short loc_40AF5B"], [9, "mov ecx, offset aHandleUpDown"], [10, "mov edx, 474h"], [11, "mov esi, offset aSrcPjlibUtilCl_1"], [12, "mov edi, offset aSess_1"], [13, "call ___assert_fail"], [14, "mov eax, 0"], [15, "jmp locret_40B14A"], [16, "mov edx, [rbp+var_22C]"], [17, "mov rax, [rbp+var_228]"], [18, "mov esi, edx"], [19, "mov rdi, rax"], [20, "call sub_409630"], [21, "mov [rbp+var_8], rax"], [22, "cmp [rbp+var_8], 0"], [23, "jz loc_40B145"], [24, "lea rax, [rbp+var_220]"], [25, "mov [rbp+var_20], rax"], [26, "mov [rbp+var_18], 0"], [27, "mov rax, [rbp+var_228]"], [28, "mov rax, [rax+1180h]"], [29, "mov eax, [rax+204h]"], [30, "test eax, eax"], [31, "jz short loc_40AFF7"], [32, "mov rax, [rbp+var_228]"], [33, "mov rax, [rax+1180h]"], [34, "mov eax, [rax+204h]"], [35, "mov edx, eax"], [36, "mov rax, [rbp+var_20]"], [37, "mov esi, 8"], [38, "mov rdi, rax"], [39, "call sub_4091C7"], [40, "mov rax, [rbp+var_228]"], [41, "mov rax, [rax+1180h]"], [42, "mov eax, [rax+204h]"], [43, "mov eax, eax"], [44, "mov [rbp+var_18], rax"], [45, "mov rax, [rbp+var_228]"], [46, "mov rax, [rax+1180h]"], [47, "mov edx, [rax+200h]"], [48, "mov rax, [rbp+var_8]"], [49, "mov rax, [rax+8]"], [50, "cmp edx, eax"], [51, "jbe short loc_40B086"], [52, "mov rax, [rbp+var_228]"], [53, "mov rax, [rax+1180h]"], [54, "mov eax, [rax+200h]"], [55, "mov [rbp+var_C], eax"], [56, "mov eax, [rbp+var_C]"], [57, "mov rcx, [rbp+var_20]"], [58, "mov rdx, [rbp+var_18]"], [59, "add rcx, rdx"], [60, "mov rdx, rax"], [61, "mov esi, 20h "], [62, "mov rdi, rcx"], [63, "call sub_4091C7"], [64, "mov rdx, [rbp+var_18]"], [65, "mov eax, [rbp+var_C]"], [66, "add rax, rdx"], [67, "mov [rbp+var_18], rax"], [68, "mov eax, [rbp+var_C]"], [69, "mov rcx, [rbp+var_20]"], [70, "mov rdx, [rbp+var_18]"], [71, "add rcx, rdx"], [72, "mov rdx, rax"], [73, "mov esi, 8"], [74, "mov rdi, rcx"], [75, "call sub_4091C7"], [76, "mov rdx, [rbp+var_18]"], [77, "mov eax, [rbp+var_C]"], [78, "add rax, rdx"], [79, "mov [rbp+var_18], rax"], [80, "mov rdx, [rbp+var_8]"], [81, "lea rax, [rbp+var_20]"], [82, "mov rsi, rdx"], [83, "mov rdi, rax"], [84, "call sub_440483"], [85, "lea rdx, [rbp+var_20]"], [86, "mov rax, [rbp+var_228]"], [87, "mov rsi, rdx"], [88, "mov rdi, rax"], [89, "call sub_40B236"], [90, "mov rax, [rbp+var_8]"], [91, "mov rax, [rax+8]"], [92, "mov rsi, rax"], [93, "mov rax, [rbp+var_8]"], [94, "mov rax, [rax]"], [95, "mov rdx, [rbp+var_228]"], [96, "mov rdx, [rdx+1180h]"], [97, "mov rcx, rdx"], [98, "mov rdx, rsi"], [99, "mov rsi, rax"], [100, "mov rdi, rcx"], [101, "call _strncpy"], [102, "mov rax, [rbp+var_228]"], [103, "mov rdx, [rax+1180h]"], [104, "mov rax, [rbp+var_8]"], [105, "mov rax, [rax+8]"], [106, "mov byte ptr [rdx+rax], 0"], [107, "mov rax, [rbp+var_8]"], [108, "mov rdx, [rax+8]"], [109, "mov rax, [rbp+var_228]"], [110, "mov rax, [rax+1180h]"], [111, "mov [rax+200h], edx"], [112, "mov rax, [rbp+var_228]"], [113, "mov rdx, [rax+1180h]"], [114, "mov rax, [rbp+var_228]"], [115, "mov rax, [rax+1180h]"], [116, "mov edx, [rdx+200h]"], [117, "mov [rax+204h], edx"], [118, "mov eax, 1"], [119, "jmp short locret_40B14A"], [120, "mov eax, 0"], [121, "leave"], [122, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 3], [8, 7], [16, 4], [17, 3], [18, 16], [19, 17], [21, 20], [22, 21], [23, 22], [24, 20], [25, 24], [27, 3], [28, 27], [29, 28], [30, 29], [31, 30], [32, 3], [33, 32], [34, 33], [35, 34], [36, 25], [38, 36], [40, 3], [41, 40], [42, 41], [43, 42], [44, 43], [45, 3], [46, 45], [47, 46], [48, 21], [49, 48], [50, 47], [50, 49], [51, 50], [52, 3], [53, 52], [54, 53], [55, 54], [56, 55], [57, 25], [58, 26], [58, 44], [59, 57], [59, 58], [60, 56], [62, 59], [64, 26], [64, 44], [65, 55], [66, 64], [66, 65], [67, 66], [68, 55], [69, 25], [70, 67], [71, 69], [71, 70], [72, 68], [74, 71], [76, 67], [77, 55], [78, 77], [78, 76], [79, 78], [80, 21], [81, 78], [81, 25], [81, 49], [82, 80], [83, 81], [85, 80], [85, 25], [86, 3], [87, 85], [88, 86], [90, 21], [91, 90], [92, 91], [93, 21], [94, 93], [95, 3], [96, 95], [97, 96], [98, 92], [99, 94], [100, 97], [102, 3], [103, 102], [104, 21], [105, 104], [106, 105], [107, 21], [108, 107], [108, 106], [109, 3], [110, 109], [110, 106], [111, 110], [111, 108], [112, 3], [113, 112], [113, 111], [114, 3], [115, 114], [115, 111], [116, 111], [116, 113], [117, 116], [117, 115], [122, 14], [122, 118], [122, 120]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/98c1b283e9476c8bb95f42e4df7f4804ca1f7d9923e0f8202de3a9c87c2fc447_98c1b283e9476c8bb95f42e4df7f4804ca1f7d9923e0f8202de3a9c87c2fc447.jsonl.gz", "strip_func_name": "sub_40AF16", "query": "\n\n\n__int64 __fastcall sub_40AF16(__int64 a1, int a2)\n{\nchar v3; // [rsp+10h] [rbp-220h] BYREF\nchar *v4; // [rsp+210h] [rbp-20h] BYREF\n__int64 v5; // [rsp+218h] [rbp-18h]\nunsigned int v6; // [rsp+224h] [rbp-Ch]\nconst char **v7; // [rsp+228h] [rbp-8h]\n\nif ( !a1 )\n__assert_fail(\"sess\", \"../src/pjlib-util/cli_telnet.c\", 0x474u, \"handle_up_down\");\nv7 = (const char **)sub_409630(a1, a2);\nif ( !v7 )\nreturn 0LL;\nv4 = &v3;\nv5 = 0LL;\nif ( *(_DWORD *)(*(_QWORD *)(a1 + 4480) + 516LL) )\n{\nsub_4091C7(v4, 8, *(unsigned int *)(*(_QWORD *)(a1 + 4480) + 516LL));\nv5 = *(unsigned int *)(*(_QWORD *)(a1 + 4480) + 516LL);\n}\nif ( *(_DWORD *)(*(_QWORD *)(a1 + 4480) + 512LL) > (unsigned int)v7[1] )\n{\nv6 = *(_DWORD *)(*(_QWORD *)(a1 + 4480) + 512LL);\nsub_4091C7(&v4[v5], 32, v6);\nv5 += v6;\nsub_4091C7(&v4[v5], 8, v6);\nv5 += v6;\n}\nsub_440483(&v4, v7);\nsub_40B236(a1, &v4);\nstrncpy(*(char **)(a1 + 4480), *v7, (size_t)v7[1]);\nv7[1][*(_QWORD *)(a1 + 4480)] = 0;\n*(_DWORD *)(*(_QWORD *)(a1 + 4480) + 512LL) = (unsigned int)v7[1];\n*(_DWORD *)(*(_QWORD *)(a1 + 4480) + 516LL) = *(_DWORD *)(*(_QWORD *)(a1 + 4480) + 512LL);\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,v3,v4,v6,v7,sub_40AF16,sub_409630,sub_4091C7,sub_440483,sub_40B236,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'sess', 'a2': 'is_up', 'v3': 'str', 'v4': 'send_data', 'v6': 'buf_len', 'v7': 'history', 'sub_40AF16': 'handle_up_down', 'sub_409630': 'get_prev_history', 'sub_4091C7': 'pj_memset', 'sub_440483': 'pj_strcat', 'sub_40B236': 'telnet_sess_send'}"}
str_copy
27910b58b9169ca3c42dc1f55e41ddb5dd3f236e0a835212c793a2c21c22add9
lh3
bedtk
NA
static inline void str_copy(kstring_t *s, const char *st, const char *en) { str_enlarge(s, en - st); memcpy(&s->s[s->l], st, en - st); s->l += en - st; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4044D8", "function_addr": 4211928, "binary_name": "27910b58b9169ca3c42dc1f55e41ddb5dd3f236e0a835212c793a2c21c22add9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+src], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov rax, [rbp+var_18]"], [7, "sub rax, [rbp+src]"], [8, "mov edx, eax"], [9, "mov rax, [rbp+var_8]"], [10, "mov esi, edx"], [11, "mov rdi, rax"], [12, "call sub_4043CD"], [13, "mov rax, [rbp+var_18]"], [14, "sub rax, [rbp+src]"], [15, "mov rdx, rax"], [16, "mov rax, [rbp+var_8]"], [17, "mov rcx, [rax+8]"], [18, "mov rax, [rbp+var_8]"], [19, "mov eax, [rax]"], [20, "mov eax, eax"], [21, "add rcx, rax"], [22, "mov rax, [rbp+src]"], [23, "mov rsi, rax"], [24, "mov rdi, rcx"], [25, "call _memcpy"], [26, "mov rax, [rbp+var_8]"], [27, "mov edx, [rax]"], [28, "mov rax, [rbp+var_18]"], [29, "sub rax, [rbp+src]"], [30, "add edx, eax"], [31, "mov rax, [rbp+var_8]"], [32, "mov [rax], edx"], [33, "nop"], [34, "leave"], [35, "retn"]], "data_dep": [[6, 5], [7, 4], [7, 6], [8, 7], [9, 3], [10, 8], [11, 9], [13, 5], [14, 4], [14, 13], [15, 14], [16, 3], [17, 16], [18, 3], [19, 18], [20, 19], [21, 17], [21, 20], [22, 4], [23, 22], [24, 21], [26, 3], [27, 26], [28, 5], [29, 4], [29, 28], [30, 27], [30, 29], [31, 3], [32, 31], [32, 30], [35, 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/27910b58b9169ca3c42dc1f55e41ddb5dd3f236e0a835212c793a2c21c22add9_27910b58b9169ca3c42dc1f55e41ddb5dd3f236e0a835212c793a2c21c22add9.jsonl.gz", "strip_func_name": "sub_4044D8", "query": "\n\n\nunsigned int *__fastcall sub_4044D8(unsigned int *a1, const void *a2, __int64 a3)\n{\nunsigned int *result; // rax\n\nsub_4043CD((__int64)a1, a3 - (_DWORD)a2);\nmemcpy((void *)(*a1 + *((_QWORD *)a1 + 1)), a2, a3 - (_QWORD)a2);\nresult = a1;\n*a1 += a3 - (_DWORD)a2;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_4044D8,sub_4043CD,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'en', 'a1': 's', 'a2': 'st', 'sub_4044D8': 'str_copy', 'sub_4043CD': 'str_enlarge'}"}
hostapd_cli_cmd_hs20_wnm_notif
ee14ea6e9f43a82e3de6fce33b02cf5140d44e7949e0765606a08ccbc19a37c0
vanhoefm
krackattacks-poc-zerokey
NA
static int hostapd_cli_cmd_hs20_wnm_notif(struct wpa_ctrl *ctrl, int argc, char *argv[]) { char buf[300]; int res; if (argc < 2) { printf("Invalid 'hs20_wnm_notif' command - two arguments (STA " "addr and URL) are needed\n"); return -1; } res = os_snprintf(buf, sizeof(buf), "HS20_WNM_NOTIF %s %s", argv[0], argv[1]); if (os_snprintf_error(sizeof(buf), res)) return -1; return wpa_ctrl_command(ctrl, buf); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4038BE", "function_addr": 4208830, "binary_name": "ee14ea6e9f43a82e3de6fce33b02cf5140d44e7949e0765606a08ccbc19a37c0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 150h"], [3, "mov [rbp+var_138], rdi"], [4, "mov [rbp+var_13C], esi"], [5, "mov [rbp+var_148], rdx"], [6, "cmp [rbp+var_13C], 1"], [7, "jg short loc_4038F7"], [8, "mov edi, offset aInvalidHs20Wnm"], [9, "call _puts"], [10, "mov eax, 0FFFFFFFFh"], [11, "jmp short locret_403969"], [12, "mov rax, [rbp+var_148]"], [13, "add rax, 8"], [14, "mov rcx, [rax]"], [15, "mov rax, [rbp+var_148]"], [16, "mov rdx, [rax]"], [17, "lea rax, [rbp+s]"], [18, "mov r8, rcx"], [19, "mov rcx, rdx"], [20, "mov edx, offset aHs20WnmNotifSS"], [21, "mov esi, 12Ch"], [22, "mov rdi, rax"], [23, "mov eax, 0"], [24, "call _snprintf"], [25, "mov [rbp+var_4], eax"], [26, "mov eax, [rbp+var_4]"], [27, "mov esi, eax"], [28, "mov edi, 12Ch"], [29, "call sub_40262F"], [30, "test eax, eax"], [31, "jz short loc_403950"], [32, "mov eax, 0FFFFFFFFh"], [33, "jmp short locret_403969"], [34, "lea rdx, [rbp+s]"], [35, "mov rax, [rbp+var_138]"], [36, "mov rsi, rdx"], [37, "mov rdi, rax"], [38, "call sub_402B09"], [39, "leave"], [40, "retn"]], "data_dep": [[6, 4], [7, 6], [12, 5], [13, 12], [14, 13], [15, 5], [16, 15], [17, 15], [18, 14], [19, 16], [22, 17], [25, 24], [26, 25], [27, 26], [30, 29], [31, 30], [34, 20], [35, 3], [36, 34], [37, 35], [40, 32], [40, 38], [40, 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/ee14ea6e9f43a82e3de6fce33b02cf5140d44e7949e0765606a08ccbc19a37c0_ee14ea6e9f43a82e3de6fce33b02cf5140d44e7949e0765606a08ccbc19a37c0.jsonl.gz", "strip_func_name": "sub_4038BE", "query": "\n\n\n__int64 __fastcall sub_4038BE(__int64 a1, int a2, const char **a3)\n{\n__int64 result; // rax\nchar s[300]; // [rsp+20h] [rbp-130h] BYREF\nint v5; // [rsp+14Ch] [rbp-4h]\n\nif ( a2 > 1 )\n{\nv5 = snprintf(s, 0x12CuLL, \"HS20_WNM_NOTIF %s %s\", *a3, a3[1]);\nif ( sub_40262F(0x12CuLL, v5) )\nresult = 0xFFFFFFFFLL;\nelse\nresult = sub_402B09(a1, s);\n}\nelse\n{\nputs(\"Invalid 'hs20_wnm_notif' command - two arguments (STA addr and URL) are needed\");\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,s,v5,sub_4038BE,sub_40262F,sub_402B09,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'argv', 'a1': 'ctrl', 'a2': 'argc', 's': 'buf', 'v5': 'res', 'sub_4038BE': 'hostapd_cli_cmd_hs20_wnm_notif', 'sub_40262F': 'os_snprintf_error', 'sub_402B09': 'wpa_ctrl_command'}"}
rbd_io_u_wait_complete
da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b
axboe
fio
NA
static void rbd_io_u_wait_complete(struct io_u *io_u) { struct fio_rbd_iou *fri = io_u->engine_data; rbd_aio_wait_for_complete(fri->completion); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4B9852", "function_addr": 4954194, "binary_name": "da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rax, [rbp+var_18]"], [5, "mov rax, [rax+98h]"], [6, "mov [rbp+var_8], rax"], [7, "mov rax, [rbp+var_8]"], [8, "mov rax, [rax+8]"], [9, "mov rdi, rax"], [10, "call _rbd_aio_wait_for_complete"], [11, "nop"], [12, "leave"], [13, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [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/da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b_da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b.jsonl.gz", "strip_func_name": "sub_4B9852", "query": "\n\n\n__int64 sub_4B9852()\n{\nreturn rbd_aio_wait_for_complete();\n}\n\n\n\nQ:[sub_4B9852,]\nAssistant: ", "hints": "[]", "response": "{'sub_4B9852': 'rbd_io_u_wait_complete'}"}
InitLevel
25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0
asterisk
pjproject-archive
NA
static void InitLevel(PowerLevel* level) { const float kBigFloat = 1E17f; level->averagelevel = 0; level->framelevel = 0; level->minlevel = kBigFloat; level->frsum = 0; level->sfrsum = 0; level->frcounter = 0; level->sfrcounter = 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4AE7EE", "function_addr": 4909038, "binary_name": "25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "movss xmm0, cs:dword_4FD7F0"], [4, "movss [rbp+var_4], xmm0"], [5, "mov rax, [rbp+var_18]"], [6, "pxor xmm0, xmm0"], [7, "movss dword ptr [rax+18h], xmm0"], [8, "mov rax, [rbp+var_18]"], [9, "pxor xmm0, xmm0"], [10, "movss dword ptr [rax+8], xmm0"], [11, "mov rax, [rbp+var_18]"], [12, "movss xmm0, [rbp+var_4]"], [13, "movss dword ptr [rax+14h], xmm0"], [14, "mov rax, [rbp+var_18]"], [15, "pxor xmm0, xmm0"], [16, "movss dword ptr [rax+0Ch], xmm0"], [17, "mov rax, [rbp+var_18]"], [18, "pxor xmm0, xmm0"], [19, "movss dword ptr [rax], xmm0"], [20, "mov rax, [rbp+var_18]"], [21, "mov dword ptr [rax+10h], 0"], [22, "mov rax, [rbp+var_18]"], [23, "mov dword ptr [rax+4], 0"], [24, "nop"], [25, "pop rbp"], [26, "retn"]], "data_dep": [[4, 3], [5, 2], [7, 5], [7, 6], [8, 2], [10, 9], [10, 8], [11, 2], [12, 4], [13, 11], [13, 12], [14, 2], [16, 15], [16, 14], [17, 2], [19, 18], [19, 17], [20, 2], [21, 20], [22, 2], [23, 22], [25, 0], [26, 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/25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0_25c5dec96bb3133ec9c32f1c53b06126b3f458e8718b6d0581ace9fa89525fd0.jsonl.gz", "strip_func_name": "sub_4AE7EE", "query": "\n\n\n_DWORD *__fastcall sub_4AE7EE(_DWORD *a1)\n{\n_DWORD *result; // rax\n\na1[6] = 0;\na1[2] = 0;\na1[5] = 1538368188;\na1[3] = 0;\n*a1 = 0;\na1[4] = 0;\nresult = a1;\na1[1] = 0;\nreturn result;\n}\n\n\n\nQ:[a1,sub_4AE7EE,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'level', 'sub_4AE7EE': 'InitLevel'}"}
jsonw_eor
866119e843c576da0d5be4aee49bcdefb830f4174c180740ed9987c1f137b153
multipath-tcp
iproute-mptcp
NA
static void jsonw_eor(json_writer_t *self) { if (self->sep != '\0') putc(self->sep, self->out); self->sep = ','; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_414ECB", "function_addr": 4280011, "binary_name": "866119e843c576da0d5be4aee49bcdefb830f4174c180740ed9987c1f137b153.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "movzx eax, byte ptr [rax+0Dh]"], [6, "test al, al"], [7, "jz short loc_414EFF"], [8, "mov rax, [rbp+var_8]"], [9, "mov rdx, [rax]"], [10, "mov rax, [rbp+var_8]"], [11, "movzx eax, byte ptr [rax+0Dh]"], [12, "movsx eax, al"], [13, "mov rsi, rdx"], [14, "mov edi, eax"], [15, "call _putc"], [16, "mov rax, [rbp+var_8]"], [17, "mov byte ptr [rax+0Dh], 2Ch "], [18, "nop"], [19, "leave"], [20, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 3], [9, 8], [10, 3], [11, 10], [12, 11], [13, 9], [14, 12], [16, 3], [17, 16], [20, 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/866119e843c576da0d5be4aee49bcdefb830f4174c180740ed9987c1f137b153_866119e843c576da0d5be4aee49bcdefb830f4174c180740ed9987c1f137b153.jsonl.gz", "strip_func_name": "sub_414ECB", "query": "\n\n\n__int64 __fastcall sub_414ECB(__int64 a1)\n{\n__int64 result; // rax\n\nif ( *(_BYTE *)(a1 + 13) )\nputc(*(char *)(a1 + 13), *(FILE **)a1);\nresult = a1;\n*(_BYTE *)(a1 + 13) = 44;\nreturn result;\n}\n\n\n\nQ:[a1,sub_414ECB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'self', 'sub_414ECB': 'jsonw_eor'}"}
show_sockstat
37474b855666d167ff3c7d1d43a7a3f45d56616269da815f95e399f32acbc258
alliedvision
linux_nvidia_jetson
NA
static int show_sockstat(int sd, struct sock_args *args) { struct sockaddr_in6 local_addr, remote_addr; socklen_t alen = sizeof(local_addr); struct sockaddr *sa; const char *desc; int rc = 0; desc = server_mode ? "server local:" : "client local:"; sa = (struct sockaddr *) &local_addr; if (getsockname(sd, sa, &alen) == 0) { log_address(desc, sa); if (args->has_expected_laddr) { rc = expected_addr_match(sa, &args->expected_laddr, "local"); } } else { log_err_errno("getsockname failed"); } sa = (struct sockaddr *) &remote_addr; desc = server_mode ? "server peer:" : "client peer:"; if (getpeername(sd, sa, &alen) == 0) { log_address(desc, sa); if (args->has_expected_raddr) { rc |= expected_addr_match(sa, &args->expected_raddr, "remote"); } } else { log_err_errno("getpeername failed"); } return rc; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4033EB", "function_addr": 4207595, "binary_name": "37474b855666d167ff3c7d1d43a7a3f45d56616269da815f95e399f32acbc258.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "add rsp, 0FFFFFFFFFFFFFF80h"], [3, "mov [rbp+fd], edi"], [4, "mov [rbp+var_80], rsi"], [5, "mov [rbp+len], 1Ch"], [6, "mov [rbp+var_4], 0"], [7, "mov eax, cs:dword_40922C"], [8, "test eax, eax"], [9, "jz short loc_403419"], [10, "mov eax, offset aServerLocal"], [11, "jmp short loc_40341E"], [12, "mov eax, offset aClientLocal"], [13, "mov [rbp+var_10], rax"], [14, "lea rax, [rbp+var_40]"], [15, "mov [rbp+addr], rax"], [16, "mov rcx, [rbp+addr]"], [17, "lea rdx, [rbp+len]"], [18, "mov eax, [rbp+fd]"], [19, "mov rsi, rcx"], [20, "mov edi, eax"], [21, "call _getsockname"], [22, "test eax, eax"], [23, "jnz short loc_403486"], [24, "mov rdx, [rbp+addr]"], [25, "mov rax, [rbp+var_10]"], [26, "mov rsi, rdx"], [27, "mov rdi, rax"], [28, "call sub_402863"], [29, "mov rax, [rbp+var_80]"], [30, "movzx eax, byte ptr [rax+28h]"], [31, "and eax, 8"], [32, "test al, al"], [33, "jz short loc_403495"], [34, "mov rax, [rbp+var_80]"], [35, "lea rcx, [rax+7Ch]"], [36, "mov rax, [rbp+addr]"], [37, "mov edx, offset aLocal"], [38, "mov rsi, rcx"], [39, "mov rdi, rax"], [40, "call sub_403296"], [41, "mov [rbp+var_4], eax"], [42, "jmp short loc_403495"], [43, "mov edi, offset aGetsocknameFai"], [44, "mov eax, 0"], [45, "call sub_402716"], [46, "lea rax, [rbp+var_60]"], [47, "mov [rbp+addr], rax"], [48, "mov eax, cs:dword_40922C"], [49, "test eax, eax"], [50, "jz short loc_4034AE"], [51, "mov eax, offset aServerPeer"], [52, "jmp short loc_4034B3"], [53, "mov eax, offset aClientPeer"], [54, "mov [rbp+var_10], rax"], [55, "mov rcx, [rbp+addr]"], [56, "lea rdx, [rbp+len]"], [57, "mov eax, [rbp+fd]"], [58, "mov rsi, rcx"], [59, "mov edi, eax"], [60, "call _getpeername"], [61, "test eax, eax"], [62, "jnz short loc_403516"], [63, "mov rdx, [rbp+addr]"], [64, "mov rax, [rbp+var_10]"], [65, "mov rsi, rdx"], [66, "mov rdi, rax"], [67, "call sub_402863"], [68, "mov rax, [rbp+var_80]"], [69, "movzx eax, byte ptr [rax+28h]"], [70, "and eax, 10h"], [71, "test al, al"], [72, "jz short loc_403525"], [73, "mov rax, [rbp+var_80]"], [74, "lea rcx, [rax+8Ch]"], [75, "mov rax, [rbp+addr]"], [76, "mov edx, offset aRemote"], [77, "mov rsi, rcx"], [78, "mov rdi, rax"], [79, "call sub_403296"], [80, "or [rbp+var_4], eax"], [81, "jmp short loc_403525"], [82, "mov edi, offset aGetpeernameFai"], [83, "mov eax, 0"], [84, "call sub_402716"], [85, "mov eax, [rbp+var_4]"], [86, "leave"], [87, "retn"]], "data_dep": [[8, 7], [9, 8], [13, 10], [13, 12], [14, 10], [14, 12], [15, 14], [16, 15], [17, 5], [18, 3], [19, 16], [20, 18], [22, 21], [23, 22], [24, 15], [25, 13], [26, 24], [27, 25], [29, 4], [30, 29], [31, 30], [32, 31], [33, 32], [34, 4], [35, 16], [35, 34], [36, 15], [38, 35], [39, 36], [41, 40], [46, 45], [46, 32], [46, 40], [47, 46], [49, 48], [50, 49], [54, 51], [54, 53], [55, 47], [56, 37], [56, 24], [56, 5], [56, 17], [57, 3], [58, 55], [59, 57], [61, 60], [62, 61], [63, 47], [64, 54], [65, 63], [66, 64], [68, 4], [69, 68], [70, 69], [71, 70], [72, 71], [73, 4], [74, 55], [74, 73], [75, 47], [77, 74], [78, 75], [80, 6], [80, 79], [80, 41], [85, 6], [85, 41], [85, 80], [87, 85]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/37474b855666d167ff3c7d1d43a7a3f45d56616269da815f95e399f32acbc258_37474b855666d167ff3c7d1d43a7a3f45d56616269da815f95e399f32acbc258.jsonl.gz", "strip_func_name": "sub_4033EB", "query": "\n\n\n__int64 __fastcall sub_4033EB(int a1, __int64 a2)\n{\nconst char *v2; // rax\n__int64 v3; // rdx\n__int64 v4; // rcx\n__int64 v5; // r8\n__int64 v6; // r9\n__int64 v7; // r8\n__int64 v8; // r9\nconst char *v9; // rax\nstruct sockaddr *v10; // rsi\n__int64 v11; // rdx\n__int64 v12; // rcx\n__int64 v13; // r8\n__int64 v14; // r9\n__int64 v15; // r8\n__int64 v16; // r9\nint v17; // eax\nsocklen_t len; // [rsp+1Ch] [rbp-64h] BYREF\nchar v21; // [rsp+20h] [rbp-60h] BYREF\nstruct sockaddr v22[2]; // [rsp+40h] [rbp-40h] BYREF\nstruct sockaddr *addr; // [rsp+68h] [rbp-18h]\nconst char *v24; // [rsp+70h] [rbp-10h]\nunsigned int v25; // [rsp+7Ch] [rbp-4h]\n\nlen = 28;\nv25 = 0;\nif ( dword_40922C )\nv2 = \"server local:\";\nelse\nv2 = \"client local:\";\nv24 = v2;\naddr = v22;\nif ( getsockname(a1, v22, &len) )\n{\nsub_402716(\"getsockname failed\", (__int64)v22, v3, v4, v5, v6);\n}\nelse\n{\nsub_402863((__int64)v24, addr);\nif ( (*(_BYTE *)(a2 + 40) & 8) != 0 )\nv25 = sub_403296((__int64)addr, (_DWORD *)(a2 + 124), (__int64)\"local\", a2 + 124, v7, v8);\n}\naddr = (struct sockaddr *)&v21;\nif ( dword_40922C )\nv9 = \"server peer:\";\nelse\nv9 = \"client peer:\";\nv24 = v9;\nv10 = addr;\nif ( getpeername(a1, addr, &len) )\n{\nsub_402716(\"getpeername failed\", (__int64)v10, v11, v12, v13, v14);\n}\nelse\n{\nsub_402863((__int64)v24, addr);\nif ( (*(_BYTE *)(a2 + 40) & 0x10) != 0 )\n{\nv17 = sub_403296((__int64)addr, (_DWORD *)(a2 + 140), (__int64)\"remote\", a2 + 140, v15, v16);\nv25 |= v17;\n}\n}\nreturn v25;\n}\n\n\n\nQ:[a1,a2,v10,len,v21,v22,addr,v24,v25,sub_4033EB,sub_402716,sub_402863,sub_403296,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'sd', 'a2': 'args', 'v10': 'args', 'len': 'alen', 'v21': 'remote_addr', 'v22': 'local_addr', 'addr': 'sa', 'v24': 'desc', 'v25': 'rc', 'sub_4033EB': 'show_sockstat', 'sub_402716': 'log_err_errno', 'sub_402863': 'log_address', 'sub_403296': 'expected_addr_match'}"}
as_arraylist_size
f68b12b76f68351e9f048bd28a697879a69b1799fbf8bdd30581dce70b5e806b
aerospike
aerospike-client-c
NA
uint32_t as_arraylist_size(const as_arraylist* list) { return list->size; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_495412", "function_addr": 4805650, "binary_name": "f68b12b76f68351e9f048bd28a697879a69b1799fbf8bdd30581dce70b5e806b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov rax, [rbp+var_8]"], [4, "mov eax, [rax+20h]"], [5, "pop rbp"], [6, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 0], [6, 4]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/f68b12b76f68351e9f048bd28a697879a69b1799fbf8bdd30581dce70b5e806b_f68b12b76f68351e9f048bd28a697879a69b1799fbf8bdd30581dce70b5e806b.jsonl.gz", "strip_func_name": "sub_495412", "query": "\n\n\n__int64 __fastcall sub_495412(__int64 a1)\n{\nreturn *(unsigned int *)(a1 + 32);\n}\n\n\n\nQ:[a1,sub_495412,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'list', 'sub_495412': 'as_arraylist_size'}"}
path_cmp
ce6238578c46b0be420ee05d5faa73253ad947408d8a965cba7aba12ccf1ef79
bitnine-oss
agensgraph
NA
static int path_cmp(const void *a, const void *b) { file_entry_t *fa = *((file_entry_t **) a); file_entry_t *fb = *((file_entry_t **) b); return strcmp(fa->path, fb->path); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "compar", "function_addr": 4218688, "binary_name": "ce6238578c46b0be420ee05d5faa73253ad947408d8a965cba7aba12ccf1ef79.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov rax, [rbp+var_18]"], [6, "mov rax, [rax]"], [7, "mov [rbp+var_8], rax"], [8, "mov rax, [rbp+var_20]"], [9, "mov rax, [rax]"], [10, "mov [rbp+var_10], rax"], [11, "mov rax, [rbp+var_10]"], [12, "mov rdx, [rax]"], [13, "mov rax, [rbp+var_8]"], [14, "mov rax, [rax]"], [15, "mov rsi, rdx"], [16, "mov rdi, rax"], [17, "call _strcmp"], [18, "leave"], [19, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 4], [9, 8], [10, 9], [11, 10], [12, 11], [13, 7], [14, 13], [15, 12], [16, 14], [19, 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/ce6238578c46b0be420ee05d5faa73253ad947408d8a965cba7aba12ccf1ef79_ce6238578c46b0be420ee05d5faa73253ad947408d8a965cba7aba12ccf1ef79.jsonl.gz", "strip_func_name": "compar", "query": "\n\n\nint __fastcall compar(const void *a1, const void *a2)\n{\nreturn strcmp(**(const char ***)a1, **(const char ***)a2);\n}\n\n\n\nQ:[a1,a2,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'a', 'a2': 'b'}"}
_write_heading_pairs
904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40
viest
php-ext-xlswriter
NA
STATIC void _write_heading_pairs(lxw_app *self) { lxw_xml_start_tag(self->file, "HeadingPairs", NULL); /* Write the vt:vector element. */ _write_vt_vector_heading_pairs(self); lxw_xml_end_tag(self->file, "HeadingPairs"); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_450EA6", "function_addr": 4525734, "binary_name": "904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "mov rax, [rax]"], [6, "mov edx, 0"], [7, "mov esi, offset aHeadingpairs"], [8, "mov rdi, rax"], [9, "call sub_4227A4"], [10, "mov rax, [rbp+var_8]"], [11, "mov rdi, rax"], [12, "call sub_450C1E"], [13, "mov rax, [rbp+var_8]"], [14, "mov rax, [rax]"], [15, "mov esi, offset aHeadingpairs"], [16, "mov rdi, rax"], [17, "call sub_42288A"], [18, "nop"], [19, "leave"], [20, "retn"]], "data_dep": [[4, 3], [5, 4], [8, 5], [10, 3], [11, 10], [13, 3], [14, 13], [16, 14], [20, 17]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40_904bc715a64912f3c45e58cf4d0dc596e8f09d4e25313a1b7583c9384b19fb40.jsonl.gz", "strip_func_name": "sub_450EA6", "query": "\n\n\nint __fastcall sub_450EA6(FILE **a1)\n{\nsub_4227A4(*a1, \"HeadingPairs\", 0LL);\nsub_450C1E((__int64)a1);\nreturn sub_42288A(*a1, \"HeadingPairs\");\n}\n\n\n\nQ:[a1,sub_450EA6,sub_4227A4,sub_450C1E,sub_42288A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'self', 'sub_450EA6': '_write_heading_pairs', 'sub_4227A4': 'lxw_xml_start_tag', 'sub_450C1E': '_write_vt_vector_heading_pairs', 'sub_42288A': 'lxw_xml_end_tag'}"}
run_diff
3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7
msysgit
msysgit
NA
static void run_diff(struct diff_filepair *p, struct diff_options *o) { const char *pgm = external_diff(); struct strbuf msg; struct diff_filespec *one = p->one; struct diff_filespec *two = p->two; const char *name; const char *other; const char *attr_path; name = p->one->path; other = (strcmp(name, p->two->path) ? p->two->path : NULL); attr_path = name; if (o->prefix_length) strip_prefix(o->prefix_length, &name, &other); if (!DIFF_OPT_TST(o, ALLOW_EXTERNAL)) pgm = NULL; if (DIFF_PAIR_UNMERGED(p)) { run_diff_cmd(pgm, name, NULL, attr_path, NULL, NULL, NULL, o, p); return; } diff_fill_sha1_info(one); diff_fill_sha1_info(two); if (!pgm && DIFF_FILE_VALID(one) && DIFF_FILE_VALID(two) && (S_IFMT & one->mode) != (S_IFMT & two->mode)) { /* * a filepair that changes between file and symlink * needs to be split into deletion and creation. */ struct diff_filespec *null = alloc_filespec(two->path); run_diff_cmd(NULL, name, other, attr_path, one, null, &msg, o, p); free(null); strbuf_release(&msg); null = alloc_filespec(one->path); run_diff_cmd(NULL, name, other, attr_path, null, two, &msg, o, p); free(null); } else run_diff_cmd(pgm, name, other, attr_path, one, two, &msg, o, p); strbuf_release(&msg); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_47D9E7", "function_addr": 4708839, "binary_name": "3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 60h"], [3, "mov [rbp+var_58], rdi"], [4, "mov [rbp+var_60], rsi"], [5, "call sub_475F16"], [6, "mov [rbp+var_8], rax"], [7, "mov rax, [rbp+var_58]"], [8, "mov rax, [rax]"], [9, "mov [rbp+var_10], rax"], [10, "mov rax, [rbp+var_58]"], [11, "mov rax, [rax+8]"], [12, "mov [rbp+var_18], rax"], [13, "mov rax, [rbp+var_58]"], [14, "mov rax, [rax]"], [15, "mov rax, [rax+18h]"], [16, "mov [rbp+s1], rax"], [17, "mov rax, [rbp+var_58]"], [18, "mov rax, [rax+8]"], [19, "mov rdx, [rax+18h]"], [20, "mov rax, [rbp+s1]"], [21, "mov rsi, rdx"], [22, "mov rdi, rax"], [23, "call _strcmp"], [24, "test eax, eax"], [25, "jz short loc_47DA53"], [26, "mov rax, [rbp+var_58]"], [27, "mov rax, [rax+8]"], [28, "mov rax, [rax+18h]"], [29, "jmp short loc_47DA58"], [30, "mov eax, 0"], [31, "mov [rbp+var_50], rax"], [32, "mov rax, [rbp+s1]"], [33, "mov [rbp+var_20], rax"], [34, "mov rax, [rbp+var_60]"], [35, "mov eax, [rax+88h]"], [36, "test eax, eax"], [37, "jz short loc_47DA8E"], [38, "mov rax, [rbp+var_60]"], [39, "mov eax, [rax+88h]"], [40, "lea rdx, [rbp+var_50]"], [41, "lea rcx, [rbp+s1]"], [42, "mov rsi, rcx"], [43, "mov edi, eax"], [44, "call sub_47D935"], [45, "mov rax, [rbp+var_60]"], [46, "mov eax, [rax+28h]"], [47, "and eax, 2000h"], [48, "test eax, eax"], [49, "jnz short loc_47DAA6"], [50, "mov [rbp+var_8], 0"], [51, "mov rax, [rbp+var_58]"], [52, "movzx eax, byte ptr [rax+13h]"], [53, "and eax, 4"], [54, "test al, al"], [55, "jz short loc_47DAF2"], [56, "mov rsi, [rbp+s1]"], [57, "mov rdx, [rbp+var_20]"], [58, "mov rax, [rbp+var_8]"], [59, "sub rsp, 8"], [60, "push [rbp+var_58]"], [61, "push [rbp+var_60]"], [62, "push 0"], [63, "mov r9d, 0"], [64, "mov r8d, 0"], [65, "mov rcx, rdx"], [66, "mov edx, 0"], [67, "mov rdi, rax"], [68, "call sub_47D67F"], [69, "add rsp, 20h"], [70, "jmp locret_47DC57"], [71, "mov rax, [rbp+var_10]"], [72, "mov rdi, rax"], [73, "call sub_47D838"], [74, "mov rax, [rbp+var_18]"], [75, "mov rdi, rax"], [76, "call sub_47D838"], [77, "cmp [rbp+var_8], 0"], [78, "jnz loc_47DC18"], [79, "mov rax, [rbp+var_10]"], [80, "movzx eax, word ptr [rax+40h]"], [81, "test ax, ax"], [82, "jz loc_47DC18"], [83, "mov rax, [rbp+var_18]"], [84, "movzx eax, word ptr [rax+40h]"], [85, "test ax, ax"], [86, "jz loc_47DC18"], [87, "mov rax, [rbp+var_10]"], [88, "movzx edx, word ptr [rax+40h]"], [89, "mov rax, [rbp+var_18]"], [90, "movzx eax, word ptr [rax+40h]"], [91, "xor eax, edx"], [92, "and ax, 0F000h"], [93, "test ax, ax"], [94, "jz loc_47DC18"], [95, "mov rax, [rbp+var_18]"], [96, "mov rax, [rax+18h]"], [97, "mov rdi, rax"], [98, "call sub_47C1F9"], [99, "mov [rbp+ptr], rax"], [100, "mov rdx, [rbp+var_50]"], [101, "mov rax, [rbp+s1]"], [102, "mov r8, [rbp+ptr]"], [103, "mov rdi, [rbp+var_10]"], [104, "mov rcx, [rbp+var_20]"], [105, "sub rsp, 8"], [106, "push [rbp+var_58]"], [107, "push [rbp+var_60]"], [108, "lea rsi, [rbp+var_40]"], [109, "push rsi"], [110, "mov r9, r8"], [111, "mov r8, rdi"], [112, "mov rsi, rax"], [113, "mov edi, 0"], [114, "call sub_47D67F"], [115, "add rsp, 20h"], [116, "mov rax, [rbp+ptr]"], [117, "mov rdi, rax"], [118, "call _free"], [119, "lea rax, [rbp+var_40]"], [120, "mov rdi, rax"], [121, "call sub_42BE48"], [122, "mov rax, [rbp+var_10]"], [123, "mov rax, [rax+18h]"], [124, "mov rdi, rax"], [125, "call sub_47C1F9"], [126, "mov [rbp+ptr], rax"], [127, "mov rdx, [rbp+var_50]"], [128, "mov rax, [rbp+s1]"], [129, "mov r8, [rbp+var_18]"], [130, "mov rdi, [rbp+ptr]"], [131, "mov rcx, [rbp+var_20]"], [132, "sub rsp, 8"], [133, "push [rbp+var_58]"], [134, "push [rbp+var_60]"], [135, "lea rsi, [rbp+var_40]"], [136, "push rsi"], [137, "mov r9, r8"], [138, "mov r8, rdi"], [139, "mov rsi, rax"], [140, "mov edi, 0"], [141, "call sub_47D67F"], [142, "add rsp, 20h"], [143, "mov rax, [rbp+ptr]"], [144, "mov rdi, rax"], [145, "call _free"], [146, "jmp short loc_47DC4B"], [147, "mov rdx, [rbp+var_50]"], [148, "mov rsi, [rbp+s1]"], [149, "mov r9, [rbp+var_18]"], [150, "mov r8, [rbp+var_10]"], [151, "mov rcx, [rbp+var_20]"], [152, "mov rax, [rbp+var_8]"], [153, "sub rsp, 8"], [154, "push [rbp+var_58]"], [155, "push [rbp+var_60]"], [156, "lea rdi, [rbp+var_40]"], [157, "push rdi"], [158, "mov rdi, rax"], [159, "call sub_47D67F"], [160, "add rsp, 20h"], [161, "lea rax, [rbp+var_40]"], [162, "mov rdi, rax"], [163, "call sub_42BE48"], [164, "leave"], [165, "retn"]], "data_dep": [[6, 5], [7, 3], [8, 7], [9, 8], [10, 3], [11, 10], [12, 11], [13, 3], [14, 13], [15, 14], [16, 15], [17, 3], [18, 17], [19, 18], [20, 16], [21, 19], [22, 20], [24, 23], [25, 24], [26, 3], [27, 26], [28, 27], [31, 28], [31, 30], [32, 16], [33, 32], [34, 4], [35, 34], [36, 35], [37, 36], [38, 4], [39, 38], [40, 31], [40, 19], [41, 16], [42, 41], [43, 39], [45, 4], [46, 45], [47, 46], [48, 47], [49, 48], [51, 3], [52, 51], [53, 52], [54, 53], [55, 54], [56, 16], [57, 33], [58, 50], [58, 6], [59, 2], [60, 3], [61, 4], [65, 57], [67, 58], [69, 59], [71, 9], [72, 71], [74, 12], [75, 74], [77, 50], [77, 6], [78, 77], [79, 9], [80, 79], [81, 80], [82, 81], [83, 12], [84, 83], [85, 84], [86, 85], [87, 9], [88, 87], [89, 12], [90, 89], [91, 88], [91, 90], [92, 91], [93, 92], [94, 93], [95, 12], [96, 95], [97, 96], [99, 98], [100, 31], [101, 16], [102, 99], [103, 9], [104, 33], [105, 2], [106, 3], [107, 4], [108, 42], [108, 21], [109, 108], [110, 102], [111, 103], [112, 101], [115, 105], [116, 99], [117, 116], [119, 118], [120, 119], [122, 9], [123, 122], [124, 123], [126, 125], [127, 31], [128, 16], [129, 12], [130, 126], [131, 33], [132, 115], [133, 3], [134, 4], [135, 112], [136, 135], [137, 129], [138, 130], [139, 128], [142, 132], [143, 126], [144, 143], [147, 31], [148, 16], [149, 12], [150, 9], [151, 33], [152, 50], [152, 6], [153, 2], [154, 3], [155, 4], [156, 75], [157, 156], [158, 152], [160, 153], [161, 159], [161, 145], [162, 161], [165, 163], [165, 68]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7_3ad82ad3f14323775608d9056249a760fcf01df764d44cee7cbdadde50e4cdd7.jsonl.gz", "strip_func_name": "sub_47D9E7", "query": "\n\n\nvoid __fastcall sub_47D9E7(__int64 a1, __int64 a2)\n{\nchar **v2; // rsi\nunsigned __int8 *v3; // rax\nchar *v4; // rsi\nchar *v6; // [rsp+10h] [rbp-50h] BYREF\nchar *s1; // [rsp+18h] [rbp-48h] BYREF\nunsigned __int64 v8[3]; // [rsp+20h] [rbp-40h] BYREF\nvoid *ptr; // [rsp+38h] [rbp-28h]\nchar *v10; // [rsp+40h] [rbp-20h]\n__int64 v11; // [rsp+48h] [rbp-18h]\n__int64 v12; // [rsp+50h] [rbp-10h]\n__int64 v13; // [rsp+58h] [rbp-8h]\n\nv13 = sub_475F16();\nv12 = *(_QWORD *)a1;\nv11 = *(_QWORD *)(a1 + 8);\ns1 = *(char **)(*(_QWORD *)a1 + 24LL);\nv2 = *(char ***)(*(_QWORD *)(a1 + 8) + 24LL);\nif ( !strcmp(s1, (const char *)v2) )\nv3 = 0LL;\nelse\nv3 = *(unsigned __int8 **)(*(_QWORD *)(a1 + 8) + 24LL);\nv6 = (char *)v3;\nv10 = s1;\nif ( *(_DWORD *)(a2 + 136) )\n{\nv2 = &s1;\nsub_47D935(*(_DWORD *)(a2 + 136), &s1, (unsigned __int8 **)&v6);\n}\nif ( (*(_DWORD *)(a2 + 40) & 0x2000) == 0 )\nv13 = 0LL;\nif ( (*(_BYTE *)(a1 + 19) & 4) != 0 )\n{\nsub_47D67F(v13, s1, 0LL, (__int64)v10, 0LL, 0LL, 0LL, a2, a1);\n}\nelse\n{\nsub_47D838(v12);\nsub_47D838(v11);\nif ( !v13\n&& *(_WORD *)(v12 + 64)\n&& *(_WORD *)(v11 + 64)\n&& ((*(_WORD *)(v12 + 64) ^ *(_WORD *)(v11 + 64)) & 0xF000) != 0 )\n{\nptr = sub_47C1F9(*(const char **)(v11 + 24), (__int64)v2);\nv4 = s1;\nsub_47D67F(0LL, s1, v6, (__int64)v10, v12, (__int64)ptr, v8, a2, a1);\nfree(ptr);\nsub_42BE48((__int64)v8);\nptr = sub_47C1F9(*(const char **)(v12 + 24), (__int64)v4);\nsub_47D67F(0LL, s1, v6, (__int64)v10, (__int64)ptr, v11, v8, a2, a1);\nfree(ptr);\n}\nelse\n{\nsub_47D67F(v13, s1, v6, (__int64)v10, v12, v11, v8, a2, a1);\n}\nsub_42BE48((__int64)v8);\n}\n}\n\n\n\nQ:[a1,a2,v2,v6,s1,v8,ptr,v10,v11,v12,v13,sub_47D9E7,sub_475F16,sub_47D935,sub_47D67F,sub_47D838,sub_47C1F9,sub_42BE48,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'p', 'a2': 'o', 'v2': 'o', 'v6': 'other', 's1': 'name', 'v8': 'msg', 'ptr': 'null', 'v10': 'attr_path', 'v11': 'two', 'v12': 'one', 'v13': 'pgm', 'sub_47D9E7': 'run_diff', 'sub_475F16': 'external_diff', 'sub_47D935': 'strip_prefix', 'sub_47D67F': 'run_diff_cmd', 'sub_47D838': 'diff_fill_sha1_info', 'sub_47C1F9': 'alloc_filespec', 'sub_42BE48': 'strbuf_release'}"}
zsl_mtx_gram_schmidt
4b5ed34b4fdd7db8f6011127b925e233316dd9c6084837aab7ac931b7ad71ffd
zephyrproject-rtos
zscilib
NA
int zsl_mtx_gram_schmidt(struct zsl_mtx *m, struct zsl_mtx *mort) { ZSL_VECTOR_DEF(v, m->sz_rows); ZSL_VECTOR_DEF(w, m->sz_rows); ZSL_VECTOR_DEF(q, m->sz_rows); for (size_t t = 0; t < m->sz_cols; t++) { zsl_vec_init(&q); zsl_mtx_get_col(m, t, v.data); for (size_t g = 0; g < t; g++) { zsl_mtx_get_col(mort, g, w.data); /* Calculate the projection of every column vector * before 'g' on the 't'th column. */ zsl_vec_project(&w, &v, &w); zsl_vec_add(&q, &w, &q); } /* Substract the sum of the projections on the 't'th column from * the 't'th column and set this vector as the 't'th column of * the output matrix. */ zsl_vec_sub(&v, &q, &v); zsl_mtx_set_col(mort, t, v.data); } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403FA2", "function_addr": 4210594, "binary_name": "4b5ed34b4fdd7db8f6011127b925e233316dd9c6084837aab7ac931b7ad71ffd.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, 0A8h"], [8, "mov [rbp+var_A8], rdi"], [9, "mov [rbp+var_B0], rsi"], [10, "mov rax, rsp"], [11, "mov rbx, rax"], [12, "mov rax, [rbp+var_A8]"], [13, "mov rax, [rax]"], [14, "mov rdx, rax"], [15, "sub rdx, 1"], [16, "mov [rbp+var_38], rdx"], [17, "mov [rbp+var_C0], rax"], [18, "mov [rbp+var_B8], 0"], [19, "mov [rbp+var_D0], rax"], [20, "mov [rbp+var_C8], 0"], [21, "lea rdx, ds:0[rax*8]"], [22, "mov eax, 10h"], [23, "sub rax, 1"], [24, "add rax, rdx"], [25, "mov esi, 10h"], [26, "mov edx, 0"], [27, "div rsi"], [28, "imul rax, 10h"], [29, "sub rsp, rax"], [30, "mov rax, rsp"], [31, "add rax, 7"], [32, "shr rax, 3"], [33, "shl rax, 3"], [34, "mov [rbp+var_50], rax"], [35, "mov rax, [rbp+var_A8]"], [36, "mov rax, [rax]"], [37, "mov [rbp+var_80], rax"], [38, "mov rax, [rbp+var_50]"], [39, "mov [rbp+var_78], rax"], [40, "mov rax, [rbp+var_A8]"], [41, "mov rax, [rax]"], [42, "mov rdx, rax"], [43, "sub rdx, 1"], [44, "mov [rbp+var_58], rdx"], [45, "mov r14, rax"], [46, "mov r15d, 0"], [47, "mov r12, rax"], [48, "mov r13d, 0"], [49, "lea rdx, ds:0[rax*8]"], [50, "mov eax, 10h"], [51, "sub rax, 1"], [52, "add rax, rdx"], [53, "mov edi, 10h"], [54, "mov edx, 0"], [55, "div rdi"], [56, "imul rax, 10h"], [57, "sub rsp, rax"], [58, "mov rax, rsp"], [59, "add rax, 7"], [60, "shr rax, 3"], [61, "shl rax, 3"], [62, "mov [rbp+var_60], rax"], [63, "mov rax, [rbp+var_A8]"], [64, "mov rax, [rax]"], [65, "mov [rbp+var_90], rax"], [66, "mov rax, [rbp+var_60]"], [67, "mov [rbp+var_88], rax"], [68, "mov rax, [rbp+var_A8]"], [69, "mov rax, [rax]"], [70, "mov rdx, rax"], [71, "sub rdx, 1"], [72, "mov [rbp+var_68], rdx"], [73, "mov r10, rax"], [74, "mov r11d, 0"], [75, "mov r8, rax"], [76, "mov r9d, 0"], [77, "lea rdx, ds:0[rax*8]"], [78, "mov eax, 10h"], [79, "sub rax, 1"], [80, "add rax, rdx"], [81, "mov esi, 10h"], [82, "mov edx, 0"], [83, "div rsi"], [84, "imul rax, 10h"], [85, "sub rsp, rax"], [86, "mov rax, rsp"], [87, "add rax, 7"], [88, "shr rax, 3"], [89, "shl rax, 3"], [90, "mov [rbp+var_70], rax"], [91, "mov rax, [rbp+var_A8]"], [92, "mov rax, [rax]"], [93, "mov [rbp+var_A0], rax"], [94, "mov rax, [rbp+var_70]"], [95, "mov [rbp+var_98], rax"], [96, "mov [rbp+var_48], 0"], [97, "jmp loc_404232"], [98, "lea rax, [rbp+var_A0]"], [99, "mov rdi, rax"], [100, "call sub_4083E5"], [101, "mov rdx, [rbp+var_78]"], [102, "mov rcx, [rbp+var_48]"], [103, "mov rax, [rbp+var_A8]"], [104, "mov rsi, rcx"], [105, "mov rdi, rax"], [106, "call sub_4016F9"], [107, "mov [rbp+var_40], 0"], [108, "jmp short loc_4041EF"], [109, "mov rdx, [rbp+var_88]"], [110, "mov rcx, [rbp+var_40]"], [111, "mov rax, [rbp+var_B0]"], [112, "mov rsi, rcx"], [113, "mov rdi, rax"], [114, "call sub_4016F9"], [115, "lea rdx, [rbp+var_90]"], [116, "lea rcx, [rbp+var_80]"], [117, "lea rax, [rbp+var_90]"], [118, "mov rsi, rcx"], [119, "mov rdi, rax"], [120, "call sub_408A4A"], [121, "lea rdx, [rbp+var_A0]"], [122, "lea rcx, [rbp+var_90]"], [123, "lea rax, [rbp+var_A0]"], [124, "mov rsi, rcx"], [125, "mov rdi, rax"], [126, "call sub_408511"], [127, "add [rbp+var_40], 1"], [128, "mov rax, [rbp+var_40]"], [129, "cmp rax, [rbp+var_48]"], [130, "jb short loc_404190"], [131, "lea rdx, [rbp+var_80]"], [132, "lea rcx, [rbp+var_A0]"], [133, "lea rax, [rbp+var_80]"], [134, "mov rsi, rcx"], [135, "mov rdi, rax"], [136, "call sub_40858D"], [137, "mov rdx, [rbp+var_78]"], [138, "mov rcx, [rbp+var_48]"], [139, "mov rax, [rbp+var_B0]"], [140, "mov rsi, rcx"], [141, "mov rdi, rax"], [142, "call sub_401772"], [143, "add [rbp+var_48], 1"], [144, "mov rax, [rbp+var_A8]"], [145, "mov rax, [rax+8]"], [146, "cmp [rbp+var_48], rax"], [147, "jb loc_40415D"], [148, "mov eax, 0"], [149, "mov rsp, rbx"], [150, "lea rsp, [rbp-28h]"], [151, "pop rbx"], [152, "pop r12"], [153, "pop r13"], [154, "pop r14"], [155, "pop r15"], [156, "pop rbp"], [157, "retn"]], "data_dep": [[10, 7], [11, 10], [12, 8], [13, 12], [14, 13], [15, 14], [16, 15], [17, 13], [19, 13], [21, 15], [23, 22], [24, 21], [24, 23], [27, 25], [28, 24], [29, 28], [29, 7], [30, 29], [31, 30], [32, 31], [33, 32], [34, 33], [35, 8], [36, 35], [37, 36], [38, 34], [39, 38], [40, 8], [41, 40], [42, 41], [43, 42], [44, 43], [45, 41], [47, 41], [49, 43], [51, 50], [52, 49], [52, 51], [55, 53], [56, 52], [57, 29], [57, 56], [58, 57], [59, 58], [60, 59], [61, 60], [62, 61], [63, 8], [64, 63], [65, 64], [66, 62], [67, 66], [68, 8], [69, 68], [70, 69], [71, 70], [72, 71], [73, 69], [75, 69], [77, 71], [79, 78], [80, 77], [80, 79], [83, 81], [84, 80], [85, 57], [85, 84], [86, 85], [87, 86], [88, 87], [89, 88], [90, 89], [91, 8], [92, 91], [93, 92], [94, 90], [95, 94], [98, 93], [98, 145], [99, 98], [101, 39], [102, 143], [102, 96], [103, 8], [104, 102], [105, 103], [109, 67], [110, 127], [110, 107], [111, 9], [112, 110], [113, 111], [115, 109], [115, 65], [116, 37], [116, 110], [117, 114], [117, 65], [118, 116], [119, 117], [121, 93], [121, 115], [122, 116], [122, 65], [123, 93], [123, 120], [124, 122], [125, 123], [127, 107], [127, 127], [128, 107], [128, 127], [129, 128], [129, 143], [129, 96], [130, 129], [131, 37], [131, 101], [131, 121], [132, 93], [132, 102], [132, 122], [133, 37], [133, 128], [134, 132], [135, 133], [137, 39], [138, 96], [138, 143], [139, 9], [140, 138], [141, 139], [143, 96], [143, 143], [144, 8], [145, 144], [146, 143], [146, 145], [146, 96], [147, 146], [149, 11], [150, 149], [151, 6], [152, 5], [153, 4], [154, 3], [155, 2], [156, 0], [157, 148]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4b5ed34b4fdd7db8f6011127b925e233316dd9c6084837aab7ac931b7ad71ffd_4b5ed34b4fdd7db8f6011127b925e233316dd9c6084837aab7ac931b7ad71ffd.jsonl.gz", "strip_func_name": "sub_403FA2", "query": "\n\n\n__int64 __fastcall sub_403FA2(unsigned __int64 *a1, unsigned __int64 *a2)\n{\n__int64 v2; // rax\nvoid *v3; // rsp\nunsigned __int64 v4; // rax\nvoid *v5; // rsp\nunsigned __int64 v6; // rax\nvoid *v7; // rsp\n__int64 v9[4]; // [rsp+0h] [rbp-D0h] BYREF\nunsigned __int64 *v10; // [rsp+20h] [rbp-B0h]\nunsigned __int64 *v11; // [rsp+28h] [rbp-A8h]\n__int64 v12[2]; // [rsp+30h] [rbp-A0h] BYREF\nunsigned __int64 v13; // [rsp+40h] [rbp-90h] BYREF\n__int64 v14; // [rsp+48h] [rbp-88h]\nunsigned __int64 v15; // [rsp+50h] [rbp-80h] BYREF\n__int64 v16; // [rsp+58h] [rbp-78h]\nunsigned __int64 v17; // [rsp+60h] [rbp-70h]\nunsigned __int64 v18; // [rsp+68h] [rbp-68h]\nunsigned __int64 v19; // [rsp+70h] [rbp-60h]\nunsigned __int64 v20; // [rsp+78h] [rbp-58h]\nunsigned __int64 v21; // [rsp+80h] [rbp-50h]\nunsigned __int64 i; // [rsp+88h] [rbp-48h]\nunsigned __int64 j; // [rsp+90h] [rbp-40h]\nunsigned __int64 v24; // [rsp+98h] [rbp-38h]\n\nv11 = a1;\nv10 = a2;\nv2 = *a1;\nv24 = *a1 - 1;\nv9[2] = v2;\nv9[3] = 0LL;\nHIBYTE(v9[0]) = HIBYTE(v2);\nv9[1] = 0LL;\nv3 = alloca(16 * ((8 * v2 + 15) / 0x10uLL));\nv21 = 8 * (((unsigned __int64)v9 + 7) >> 3);\nv15 = *a1;\nv16 = v21;\nv4 = *a1;\nv20 = *a1 - 1;\nv5 = alloca(16 * ((8 * v4 + 15) / 0x10));\nv19 = v21;\nv13 = *a1;\nv14 = v21;\nv6 = *a1;\nv18 = *a1 - 1;\nv7 = alloca(16 * ((8 * v6 + 15) / 0x10));\nv17 = v21;\nv12[0] = *a1;\nv12[1] = v21;\nfor ( i = 0LL; i < v11[1]; ++i )\n{\nsub_4083E5(v12);\nsub_4016F9(v11, i, v16);\nfor ( j = 0LL; j < i; ++j )\n{\nsub_4016F9(v10, j, v14);\nsub_408A4A(&v13, &v15, &v13);\nsub_408511(v12, &v13, v12);\n}\nsub_40858D(&v15, v12, &v15);\nsub_401772(v10, i, v16);\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v10,v11,v12,v13,v15,v17,v19,v21,i,j,sub_403FA2,sub_4083E5,sub_4016F9,sub_408A4A,sub_408511,sub_40858D,sub_401772,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'm', 'a2': 'mort', 'v10': 'morta', 'v11': 'ma', 'v12': 'q', 'v13': 'w', 'v15': 'v', 'v17': 'p_q_vec', 'v19': 'p_w_vec', 'v21': 'p_v_vec', 'i': 't', 'j': 'g', 'sub_403FA2': 'zsl_mtx_gram_schmidt', 'sub_4083E5': 'zsl_vec_init', 'sub_4016F9': 'zsl_mtx_get_col', 'sub_408A4A': 'zsl_vec_project', 'sub_408511': 'zsl_vec_add', 'sub_40858D': 'zsl_vec_sub', 'sub_401772': 'zsl_mtx_set_col'}"}
modrm
d69c84f7c0642e584aadc8969c263015ca08f14872619aeb9cd241b3589e04ff
tekknolagi
ghuloum
NA
byte modrm(byte mod, byte rm, byte reg) { return ((mod & 0x3) << 6) | ((reg & 0x7) << 3) | (rm & 0x7); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401AED", "function_addr": 4201197, "binary_name": "d69c84f7c0642e584aadc8969c263015ca08f14872619aeb9cd241b3589e04ff.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov ecx, esi"], [3, "mov eax, edx"], [4, "mov edx, edi"], [5, "mov [rbp+var_4], dl"], [6, "mov edx, ecx"], [7, "mov [rbp+var_8], dl"], [8, "mov [rbp+var_C], al"], [9, "movzx eax, [rbp+var_4]"], [10, "shl eax, 6"], [11, "mov edx, eax"], [12, "movzx eax, [rbp+var_C]"], [13, "shl eax, 3"], [14, "and eax, 38h"], [15, "or edx, eax"], [16, "movzx eax, [rbp+var_8]"], [17, "and eax, 7"], [18, "or eax, edx"], [19, "pop rbp"], [20, "retn"]], "data_dep": [[5, 4], [6, 2], [7, 6], [8, 3], [9, 5], [10, 9], [11, 10], [12, 8], [13, 12], [14, 13], [15, 11], [15, 14], [16, 7], [17, 16], [18, 17], [18, 15], [19, 0], [20, 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/d69c84f7c0642e584aadc8969c263015ca08f14872619aeb9cd241b3589e04ff_d69c84f7c0642e584aadc8969c263015ca08f14872619aeb9cd241b3589e04ff.jsonl.gz", "strip_func_name": "sub_401AED", "query": "\n\n\n__int64 __fastcall sub_401AED(unsigned __int8 a1, char a2, char a3)\n{\nreturn (8 * a3) & 0x38 | (a1 << 6) | a2 & 7u;\n}\n\n\n\nQ:[a3,a1,a2,sub_401AED,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'reg', 'a1': 'mod', 'a2': 'rm', 'sub_401AED': 'modrm'}"}
mtd_is_locked
da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b
axboe
fio
NA
int mtd_is_locked(const struct mtd_dev_info *mtd, int fd, int eb) { int ret; erase_info_t ei; ei.start = eb * mtd->eb_size; ei.length = mtd->eb_size; ret = ioctl(fd, MEMISLOCKED, &ei); if (ret < 0) { if (errno != ENOTTY && errno != EOPNOTSUPP) return mtd_ioctl_error(mtd, eb, "MEMISLOCKED"); else errno = EOPNOTSUPP; } return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "mtd_is_locked", "function_addr": 4854274, "binary_name": "da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+fd], esi"], [5, "mov [rbp+var_20], edx"], [6, "mov rax, [rbp+var_18]"], [7, "mov eax, [rax+0E4h]"], [8, "imul eax, [rbp+var_20]"], [9, "mov [rbp+var_C], eax"], [10, "mov rax, [rbp+var_18]"], [11, "mov eax, [rax+0E4h]"], [12, "mov [rbp+var_8], eax"], [13, "lea rdx, [rbp+var_C]"], [14, "mov eax, [rbp+fd]"], [15, "mov esi, 80084D17h"], [16, "mov edi, eax"], [17, "mov eax, 0"], [18, "call _ioctl"], [19, "mov [rbp+var_4], eax"], [20, "cmp [rbp+var_4], 0"], [21, "jns short loc_4A128E"], [22, "call ___errno_location"], [23, "mov eax, [rax]"], [24, "cmp eax, 19h"], [25, "jz short loc_4A1283"], [26, "call ___errno_location"], [27, "mov eax, [rax]"], [28, "cmp eax, 5Fh "], [29, "jz short loc_4A1283"], [30, "mov ecx, [rbp+var_20]"], [31, "mov rax, [rbp+var_18]"], [32, "mov edx, offset aMemislocked"], [33, "mov esi, ecx"], [34, "mov rdi, rax"], [35, "call sub_4A0D87"], [36, "jmp short locret_4A1291"], [37, "call ___errno_location"], [38, "mov dword ptr [rax], 5Fh "], [39, "mov eax, [rbp+var_4]"], [40, "leave"], [41, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 5], [8, 7], [9, 8], [10, 3], [11, 10], [12, 11], [13, 9], [14, 4], [16, 14], [19, 18], [20, 19], [21, 20], [23, 22], [24, 23], [25, 24], [27, 26], [28, 27], [29, 28], [30, 5], [31, 3], [33, 30], [34, 31], [38, 37], [39, 19], [41, 39], [41, 35]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b_da112328d43ad283d891ef745b1d04f93c0e61c8af6f1658d5fe5192a776b52b.jsonl.gz", "strip_func_name": "mtd_is_locked", "query": "\n\n\n__int64 __fastcall mtd_is_locked(unsigned int *a1, int a2, unsigned int a3)\n{\nint v5[2]; // [rsp+14h] [rbp-Ch] BYREF\nint v6; // [rsp+1Ch] [rbp-4h]\n\nv5[0] = a3 * a1[57];\nv5[1] = a1[57];\nv6 = ioctl(a2, 0x80084D17uLL, v5);\nif ( v6 < 0 )\n{\nif ( *__errno_location() != 25 && *__errno_location() != 95 )\nreturn sub_4A0D87(a1, a3, \"MEMISLOCKED\");\n*__errno_location() = 95;\n}\nreturn (unsigned int)v6;\n}\n\n\n\nQ:[a3,a1,a2,v5,sub_4A0D87,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'eb', 'a1': 'mtd', 'a2': 'fd', 'v5': 'ei', 'sub_4A0D87': 'mtd_ioctl_error'}"}
gt_alignment_get_counter
507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69
smarco
gem3-mapper
NA
GT_INLINE uint64_t gt_alignment_get_counter(gt_alignment* const alignment,const uint64_t stratum) { GT_ALIGNMENT_CHECK(alignment); return *gt_vector_get_elm(alignment->counters,stratum,uint64_t); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_409481", "function_addr": 4232321, "binary_name": "507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_10], rsi"], [4, "mov rax, [rbp+var_8]"], [5, "mov rax, [rax+20h]"], [6, "mov rdx, [rax]"], [7, "mov rax, [rbp+var_10]"], [8, "shl rax, 3"], [9, "add rax, rdx"], [10, "mov rax, [rax]"], [11, "pop rbp"], [12, "retn"]], "data_dep": [[4, 2], [5, 4], [6, 5], [7, 3], [8, 7], [9, 6], [9, 8], [10, 9], [11, 0], [12, 10]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69_507b6d6826ab1404fd3df13a4b27da226b5beb2f60ed3e979a82f4c0a6725d69.jsonl.gz", "strip_func_name": "sub_409481", "query": "\n\n\n__int64 __fastcall sub_409481(__int64 a1, __int64 a2)\n{\nreturn *(_QWORD *)(**(_QWORD **)(a1 + 32) + 8 * a2);\n}\n\n\n\nQ:[a1,a2,sub_409481,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'alignment', 'a2': 'stratum', 'sub_409481': 'gt_alignment_get_counter'}"}
btstack_run_loop_posix_get_time_ms
0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26
Matheus-Garbelini
esp32_bluetooth_classic_sniffer
NA
static uint32_t btstack_run_loop_posix_get_time_ms(void){ uint32_t time_ms; #ifdef _POSIX_MONOTONIC_CLOCK struct timespec now_ts; clock_gettime(CLOCK_MONOTONIC, &now_ts); time_ms = (uint32_t) timespec_diff_milis(&init_ts, &now_ts); #else struct timeval tv; gettimeofday(&tv, NULL); time_ms = (uint32_t) ((tv.tv_sec - init_tv.tv_sec) * 1000) + (tv.tv_usec / 1000); #endif return time_ms; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401C48", "function_addr": 4201544, "binary_name": "0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "lea rax, [rbp+tp]"], [4, "mov rsi, rax"], [5, "mov edi, 1"], [6, "call _clock_gettime"], [7, "lea rax, [rbp+tp]"], [8, "mov rsi, rax"], [9, "mov edi, offset tp"], [10, "call sub_401C13"], [11, "mov [rbp+var_4], eax"], [12, "mov eax, [rbp+var_4]"], [13, "leave"], [14, "retn"]], "data_dep": [[4, 3], [7, 6], [8, 7], [11, 10], [12, 11], [14, 12]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26_0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26.jsonl.gz", "strip_func_name": "sub_401C48", "query": "\n\n\n__int64 sub_401C48()\n{\nstruct timespec tp; // [rsp+0h] [rbp-20h] BYREF\n\nclock_gettime(1, &tp);\nreturn (unsigned int)sub_401C13(&::tp, &tp);\n}\n\n\n\nQ:[tp,sub_401C48,sub_401C13,]\nAssistant: ", "hints": "[]", "response": "{'tp': 'now_ts', 'sub_401C48': 'btstack_run_loop_posix_get_time_ms', 'sub_401C13': 'timespec_diff_milis'}"}
mbedtls_md
6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7
mattsta
trade-balancer
NA
int mbedtls_md( const mbedtls_md_info_t *md_info, const unsigned char *input, size_t ilen, unsigned char *output ) { if( md_info == NULL ) return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); switch( md_info->type ) { #if defined(MBEDTLS_MD2_C) case MBEDTLS_MD_MD2: return( mbedtls_md2_ret( input, ilen, output ) ); #endif #if defined(MBEDTLS_MD4_C) case MBEDTLS_MD_MD4: return( mbedtls_md4_ret( input, ilen, output ) ); #endif #if defined(MBEDTLS_MD5_C) case MBEDTLS_MD_MD5: return( mbedtls_md5_ret( input, ilen, output ) ); #endif #if defined(MBEDTLS_RIPEMD160_C) case MBEDTLS_MD_RIPEMD160: return( mbedtls_ripemd160_ret( input, ilen, output ) ); #endif #if defined(MBEDTLS_SHA1_C) case MBEDTLS_MD_SHA1: return( mbedtls_sha1_ret( input, ilen, output ) ); #endif #if defined(MBEDTLS_SHA256_C) case MBEDTLS_MD_SHA224: return( mbedtls_sha256_ret( input, ilen, output, 1 ) ); case MBEDTLS_MD_SHA256: return( mbedtls_sha256_ret( input, ilen, output, 0 ) ); #endif #if defined(MBEDTLS_SHA512_C) #if !defined(MBEDTLS_SHA512_NO_SHA384) case MBEDTLS_MD_SHA384: return( mbedtls_sha512_ret( input, ilen, output, 1 ) ); #endif case MBEDTLS_MD_SHA512: return( mbedtls_sha512_ret( input, ilen, output, 0 ) ); #endif default: return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_454EF9", "function_addr": 4542201, "binary_name": "6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_18], rdx"], [6, "mov [rbp+var_20], rcx"], [7, "cmp [rbp+var_8], 0"], [8, "jnz short loc_454F22"], [9, "mov eax, 0FFFFAF00h"], [10, "jmp locret_455003"], [11, "mov rax, [rbp+var_8]"], [12, "mov eax, [rax+8]"], [13, "sub eax, 3"], [14, "cmp eax, 6"], [15, "ja def_454F3F"], [16, "mov eax, eax"], [17, "mov rax, ds:jpt_454F3F[rax*8]"], [18, "jmp rax"], [19, "mov rdx, [rbp+var_20]"], [20, "mov rcx, [rbp+var_18]"], [21, "mov rax, [rbp+var_10]"], [22, "mov rsi, rcx"], [23, "mov rdi, rax"], [24, "call sub_456E28"], [25, "jmp locret_455003"], [26, "mov rdx, [rbp+var_20]"], [27, "mov rcx, [rbp+var_18]"], [28, "mov rax, [rbp+var_10]"], [29, "mov rsi, rcx"], [30, "mov rdi, rax"], [31, "call sub_4313AD"], [32, "jmp locret_455003"], [33, "mov rdx, [rbp+var_20]"], [34, "mov rcx, [rbp+var_18]"], [35, "mov rax, [rbp+var_10]"], [36, "mov rsi, rcx"], [37, "mov rdi, rax"], [38, "call sub_438C03"], [39, "jmp short locret_455003"], [40, "mov rdx, [rbp+var_20]"], [41, "mov rsi, [rbp+var_18]"], [42, "mov rax, [rbp+var_10]"], [43, "mov ecx, 1"], [44, "mov rdi, rax"], [45, "call sub_43AAF9"], [46, "jmp short locret_455003"], [47, "mov rdx, [rbp+var_20]"], [48, "mov rsi, [rbp+var_18]"], [49, "mov rax, [rbp+var_10]"], [50, "mov ecx, 0"], [51, "mov rdi, rax"], [52, "call sub_43AAF9"], [53, "jmp short locret_455003"], [54, "mov rdx, [rbp+var_20]"], [55, "mov rsi, [rbp+var_18]"], [56, "mov rax, [rbp+var_10]"], [57, "mov ecx, 1"], [58, "mov rdi, rax"], [59, "call sub_43C6DF"], [60, "jmp short locret_455003"], [61, "mov rdx, [rbp+var_20]"], [62, "mov rsi, [rbp+var_18]"], [63, "mov rax, [rbp+var_10]"], [64, "mov ecx, 0"], [65, "mov rdi, rax"], [66, "call sub_43C6DF"], [67, "jmp short locret_455003"], [68, "mov eax, 0FFFFAF00h"], [69, "leave"], [70, "retn"]], "data_dep": [[7, 3], [8, 7], [11, 3], [12, 11], [13, 12], [14, 13], [15, 14], [16, 13], [18, 17], [19, 6], [20, 5], [21, 4], [22, 20], [23, 21], [26, 6], [27, 5], [28, 4], [29, 27], [30, 28], [33, 6], [34, 5], [35, 4], [36, 34], [37, 35], [40, 6], [41, 5], [42, 4], [44, 42], [47, 6], [48, 5], [49, 4], [51, 49], [54, 6], [55, 5], [56, 4], [58, 56], [61, 6], [62, 5], [63, 4], [65, 63], [70, 9], [70, 24], [70, 45], [70, 66], [70, 38], [70, 59], [70, 68], [70, 31], [70, 52]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7_6455e8619308c575139ba376a3fbff14e2036d5af8bad040d3e43a4f91fcf4d7.jsonl.gz", "strip_func_name": "sub_454EF9", "query": "\n\n\n__int64 __fastcall sub_454EF9(__int64 a1, unsigned int *a2, size_t a3, _BYTE *a4)\n{\n__int64 result; // rax\n\nif ( !a1 )\nreturn 4294946560LL;\nswitch ( *(_DWORD *)(a1 + 8) )\n{\ncase 3:\nresult = sub_456E28(a2, a3, a4);\nbreak;\ncase 4:\nresult = sub_438C03(a2, a3, a4);\nbreak;\ncase 5:\nresult = sub_43AAF9((char *)a2, a3, a4, 1);\nbreak;\ncase 6:\nresult = sub_43AAF9((char *)a2, a3, a4, 0);\nbreak;\ncase 7:\nresult = sub_43C6DF((char *)a2, a3, a4, 1);\nbreak;\ncase 8:\nresult = sub_43C6DF((char *)a2, a3, a4, 0);\nbreak;\ncase 9:\nresult = sub_4313AD((unsigned __int16 *)a2, a3, (__int64)a4);\nbreak;\ndefault:\nresult = 4294946560LL;\nbreak;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,sub_454EF9,sub_456E28,sub_438C03,sub_43AAF9,sub_43C6DF,sub_4313AD,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'ilen', 'a4': 'output', 'a1': 'md_info', 'a2': 'input', 'sub_454EF9': 'mbedtls_md', 'sub_456E28': 'mbedtls_md5_ret', 'sub_438C03': 'mbedtls_sha1_ret', 'sub_43AAF9': 'mbedtls_sha256_ret', 'sub_43C6DF': 'mbedtls_sha512_ret', 'sub_4313AD': 'mbedtls_ripemd160_ret'}"}
mlx90614_get_ir_sensor
bdd09f880961d5d488722db5049dec2e430ce24e171974006130814f47079e8d
hepingood
mlx90614
NA
uint8_t mlx90614_get_ir_sensor(mlx90614_handle_t *handle, mlx90614_ir_sensor_t *sensor) { uint8_t res; uint16_t prev; if (handle == NULL) /* check handle */ { return 2; /* return error */ } if (handle->inited != 1) /* check handle initialization */ { return 3; /* return error */ } res = a_mlx90614_read(handle, MLX90614_REG_EEPROM_CONFIG1, (uint16_t *)&prev); /* read config */ if (res != 0) /* check result */ { handle->debug_print("mlx90614: read config failed.\n"); /* return error */ return 1; } prev &= (0x01 << 6); /* get config */ *sensor = (mlx90614_ir_sensor_t)(0x01 & (prev >> 6)); /* ge sensor */ return 0; /* success return 0 */ }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401B72", "function_addr": 4201330, "binary_name": "bdd09f880961d5d488722db5049dec2e430ce24e171974006130814f47079e8d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "cmp [rbp+var_18], 0"], [6, "jnz short loc_401B90"], [7, "mov eax, 2"], [8, "jmp short locret_401C00"], [9, "mov rax, [rbp+var_18]"], [10, "movzx eax, byte ptr [rax+48h]"], [11, "cmp al, 1"], [12, "jz short loc_401BA3"], [13, "mov eax, 3"], [14, "jmp short locret_401C00"], [15, "lea rdx, [rbp+var_4]"], [16, "mov rax, [rbp+var_18]"], [17, "mov esi, 25h "], [18, "mov rdi, rax"], [19, "call sub_401290"], [20, "mov [rbp+var_1], al"], [21, "cmp [rbp+var_1], 0"], [22, "jz short loc_401BDC"], [23, "mov rax, [rbp+var_18]"], [24, "mov rdx, [rax+30h]"], [25, "mov edi, offset aMlx90614ReadCo"], [26, "mov eax, 0"], [27, "call rdx"], [28, "mov eax, 1"], [29, "jmp short locret_401C00"], [30, "movzx eax, [rbp+var_4]"], [31, "and eax, 40h"], [32, "mov [rbp+var_4], ax"], [33, "movzx eax, [rbp+var_4]"], [34, "shr ax, 6"], [35, "and eax, 1"], [36, "movzx edx, ax"], [37, "mov rax, [rbp+var_20]"], [38, "mov [rax], edx"], [39, "mov eax, 0"], [40, "leave"], [41, "retn"]], "data_dep": [[5, 3], [6, 5], [9, 3], [10, 9], [11, 10], [12, 11], [16, 3], [18, 16], [20, 19], [21, 20], [22, 21], [23, 3], [24, 23], [27, 24], [31, 30], [32, 31], [33, 32], [34, 33], [35, 34], [36, 35], [37, 4], [38, 37], [38, 36], [41, 39], [41, 7], [41, 13], [41, 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/bdd09f880961d5d488722db5049dec2e430ce24e171974006130814f47079e8d_bdd09f880961d5d488722db5049dec2e430ce24e171974006130814f47079e8d.jsonl.gz", "strip_func_name": "sub_401B72", "query": "\n\n\n__int64 __fastcall sub_401B72(__int64 a1, int *a2)\n{\n__int64 result; // rax\nunsigned __int16 v3; // [rsp+1Ch] [rbp-4h] BYREF\n\nif ( !a1 )\nreturn 2LL;\nif ( *(_BYTE *)(a1 + 72) != 1 )\nreturn 3LL;\nif ( (unsigned __int8)sub_401290((unsigned __int8 *)a1, 0x25u, &v3) )\n{\n(*(void (__fastcall **)(const char *))(a1 + 48))(\"mlx90614: read config failed.\\n\");\nresult = 1LL;\n}\nelse\n{\nv3 &= 0x40u;\n*a2 = (v3 >> 6) & 1;\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,sub_401B72,sub_401290,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'handle', 'a2': 'sensor', 'v3': 'prev', 'sub_401B72': 'mlx90614_get_ir_sensor', 'sub_401290': 'a_mlx90614_read'}"}
color_age_on
f61639a4f3ccfd452706cec584dd79ef5321998064c29d5e749b84492ac9281d
leahneukirchen
lr
NA
static void color_age_on(time_t t) { time_t age = now - t; int c; if (!Gflag) return; if (age < 0LL) c = 196; else if (age < 60LL) c = 255; else if (age < 60*60LL) c = 252; else if (age < 24*60*60LL) c = 250; else if (age < 7*24*60*60LL) c = 244; else if (age < 4*7*24*60*60LL) c = 244; else if (age < 26*7*24*60*60LL) c = 242; else if (age < 52*7*24*60*60LL) c = 240; else if (age < 2*52*7*24*60*60LL) c = 238; else c = 236; fg256(c); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_406BB8", "function_addr": 4221880, "binary_name": "f61639a4f3ccfd452706cec584dd79ef5321998064c29d5e749b84492ac9281d.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, cs:timer"], [5, "sub rax, [rbp+var_18]"], [6, "mov [rbp+var_10], rax"], [7, "mov eax, cs:dword_40E620"], [8, "test eax, eax"], [9, "jz loc_406C9F"], [10, "cmp [rbp+var_10], 0"], [11, "jns short loc_406BF4"], [12, "mov [rbp+var_4], 0C4h"], [13, "jmp loc_406C93"], [14, "cmp [rbp+var_10], 3Bh "], [15, "jg short loc_406C07"], [16, "mov [rbp+var_4], 0FFh"], [17, "jmp loc_406C93"], [18, "cmp [rbp+var_10], 0E0Fh"], [19, "jg short loc_406C1A"], [20, "mov [rbp+var_4], 0FCh"], [21, "jmp short loc_406C93"], [22, "cmp [rbp+var_10], 1517Fh"], [23, "jg short loc_406C2D"], [24, "mov [rbp+var_4], 0FAh"], [25, "jmp short loc_406C93"], [26, "cmp [rbp+var_10], 93A7Fh"], [27, "jg short loc_406C40"], [28, "mov [rbp+var_4], 0F4h"], [29, "jmp short loc_406C93"], [30, "cmp [rbp+var_10], 24E9FFh"], [31, "jg short loc_406C53"], [32, "mov [rbp+var_4], 0F4h"], [33, "jmp short loc_406C93"], [34, "cmp [rbp+var_10], 0EFF0FFh"], [35, "jg short loc_406C66"], [36, "mov [rbp+var_4], 0F2h"], [37, "jmp short loc_406C93"], [38, "cmp [rbp+var_10], 1DFE1FFh"], [39, "jg short loc_406C79"], [40, "mov [rbp+var_4], 0F0h"], [41, "jmp short loc_406C93"], [42, "cmp [rbp+var_10], 3BFC3FFh"], [43, "jg short loc_406C8C"], [44, "mov [rbp+var_4], 0EEh"], [45, "jmp short loc_406C93"], [46, "mov [rbp+var_4], 0ECh"], [47, "mov eax, [rbp+var_4]"], [48, "mov edi, eax"], [49, "call sub_40600B"], [50, "jmp short locret_406CA0"], [51, "nop"], [52, "leave"], [53, "retn"]], "data_dep": [[5, 4], [5, 3], [6, 5], [8, 7], [9, 8], [10, 6], [11, 10], [14, 6], [15, 14], [18, 6], [19, 18], [22, 6], [23, 22], [26, 6], [27, 26], [30, 6], [31, 30], [34, 6], [35, 34], [38, 6], [39, 38], [42, 6], [43, 42], [47, 16], [47, 28], [47, 40], [47, 46], [47, 12], [47, 24], [47, 36], [47, 20], [47, 32], [47, 44], [48, 47], [53, 49], [53, 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/f61639a4f3ccfd452706cec584dd79ef5321998064c29d5e749b84492ac9281d_f61639a4f3ccfd452706cec584dd79ef5321998064c29d5e749b84492ac9281d.jsonl.gz", "strip_func_name": "sub_406BB8", "query": "\n\n\nint __fastcall sub_406BB8(__int64 a1)\n{\nint result; // eax\n__int64 v2; // [rsp+10h] [rbp-10h]\n\nv2 = timer - a1;\nresult = dword_40E620;\nif ( dword_40E620 )\n{\nif ( v2 >= 0 )\n{\nif ( v2 > 59 )\n{\nif ( v2 > 3599 )\n{\nif ( v2 > 86399 )\n{\nif ( v2 <= 604799 || v2 <= 2419199 )\n{\nresult = sub_40600B(0xF4u);\n}\nelse if ( v2 > 15724799 )\n{\nif ( v2 > 31449599 )\n{\nif ( v2 > 62899199 )\nresult = sub_40600B(0xECu);\nelse\nresult = sub_40600B(0xEEu);\n}\nelse\n{\nresult = sub_40600B(0xF0u);\n}\n}\nelse\n{\nresult = sub_40600B(0xF2u);\n}\n}\nelse\n{\nresult = sub_40600B(0xFAu);\n}\n}\nelse\n{\nresult = sub_40600B(0xFCu);\n}\n}\nelse\n{\nresult = sub_40600B(0xFFu);\n}\n}\nelse\n{\nresult = sub_40600B(0xC4u);\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,v2,sub_406BB8,sub_40600B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 't', 'v2': 'age', 'sub_406BB8': 'color_age_on', 'sub_40600B': 'fg256'}"}
addArgumentToVtab
1f521185abebe790038be8fb8b4eb165b2fd6d5af5b82a99f02d98f6827de627
andoma
movian
NA
static void addArgumentToVtab(Parse *pParse){ if( pParse->sArg.z && pParse->pNewTable ){ const char *z = (const char*)pParse->sArg.z; int n = pParse->sArg.n; sqlite3 *db = pParse->db; addModuleArgument(db, pParse->pNewTable, sqlite3DbStrNDup(db, z, n)); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_48D83F", "function_addr": 4773951, "binary_name": "1f521185abebe790038be8fb8b4eb165b2fd6d5af5b82a99f02d98f6827de627.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "mov rax, [rbp+var_28]"], [5, "mov rax, [rax+258h]"], [6, "test rax, rax"], [7, "jz short loc_48D8C8"], [8, "mov rax, [rbp+var_28]"], [9, "mov rax, [rax+220h]"], [10, "test rax, rax"], [11, "jz short loc_48D8C8"], [12, "mov rax, [rbp+var_28]"], [13, "mov rax, [rax+258h]"], [14, "mov [rbp+var_8], rax"], [15, "mov rax, [rbp+var_28]"], [16, "mov eax, [rax+260h]"], [17, "mov [rbp+var_C], eax"], [18, "mov rax, [rbp+var_28]"], [19, "mov rax, [rax]"], [20, "mov [rbp+var_18], rax"], [21, "mov eax, [rbp+var_C]"], [22, "movsxd rdx, eax"], [23, "mov rcx, [rbp+var_8]"], [24, "mov rax, [rbp+var_18]"], [25, "mov rsi, rcx"], [26, "mov rdi, rax"], [27, "call sub_4137D3"], [28, "mov rdx, rax"], [29, "mov rax, [rbp+var_28]"], [30, "mov rcx, [rax+220h]"], [31, "mov rax, [rbp+var_18]"], [32, "mov rsi, rcx"], [33, "mov rdi, rax"], [34, "call sub_48D5E5"], [35, "nop"], [36, "leave"], [37, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [8, 3], [9, 8], [10, 9], [11, 10], [12, 3], [13, 12], [14, 13], [15, 3], [16, 15], [17, 16], [18, 3], [19, 18], [20, 19], [21, 17], [22, 21], [23, 14], [24, 20], [25, 23], [26, 24], [28, 27], [29, 3], [30, 29], [31, 20], [32, 30], [33, 31], [37, 6], [37, 10], [37, 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/1f521185abebe790038be8fb8b4eb165b2fd6d5af5b82a99f02d98f6827de627_1f521185abebe790038be8fb8b4eb165b2fd6d5af5b82a99f02d98f6827de627.jsonl.gz", "strip_func_name": "sub_48D83F", "query": "\n\n\nvoid __fastcall sub_48D83F(__int64 a1)\n{\n_QWORD *v1; // rax\n__int64 v2; // [rsp+18h] [rbp-18h]\n\nif ( *(_QWORD *)(a1 + 600) )\n{\nif ( *(_QWORD *)(a1 + 544) )\n{\nv2 = *(_QWORD *)a1;\nv1 = sub_4137D3(*(_QWORD *)a1, *(const void **)(a1 + 600), *(int *)(a1 + 608));\nsub_48D5E5(v2, *(_QWORD *)(a1 + 544), v1);\n}\n}\n}\n\n\n\nQ:[a1,v2,sub_48D83F,sub_4137D3,sub_48D5E5,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pParse', 'v2': 'db', 'sub_48D83F': 'addArgumentToVtab', 'sub_4137D3': 'sqlite3DbStrNDup', 'sub_48D5E5': 'addModuleArgument'}"}
j_load_lm
9b85fa48a868983d7ee8c1ec5b0fcd80355cfe0cf4a097485a7f6533d5af5dbe
hecomi
node-julius
NA
boolean j_load_lm(Recog *recog, JCONF_LM *lmconf) { JCONF_SEARCH *sh; PROCESS_LM *lm; PROCESS_AM *am, *atmp; jlog("STAT: *** loading LM%02d %s\n", lmconf->id, lmconf->name); /* find which am process instance to assign to each LM */ am = NULL; for(sh=recog->jconf->search_root;sh;sh=sh->next) { if (sh->lmconf == lmconf) { for(atmp=recog->amlist;atmp;atmp=atmp->next) { if (sh->amconf == atmp->config) { am = atmp; } } } } if (am == NULL) { jlog("ERROR: cannot find corresponding AM for LM%02d %s\n", lmconf->id, lmconf->name); jlog("ERROR: you should write all AM/LM combinations to be used for recognition with \"-SR\"\n"); return FALSE; } /* create LM process instance */ lm = j_process_lm_new(recog, lmconf); /* assign AM process instance to the LM instance */ lm->am = am; /* load language model */ if (lm->lmtype == LM_PROB) { /* LM (N-gram) */ if ((lm->winfo = initialize_dict(lm->config, lm->am->hmminfo)) == NULL) { jlog("ERROR: m_fusion: failed to initialize dictionary\n"); return FALSE; } if (lm->config->ngram_filename_lr_arpa || lm->config->ngram_filename_rl_arpa || lm->config->ngram_filename) { if ((lm->ngram = initialize_ngram(lm->config, lm->winfo)) == NULL) { jlog("ERROR: m_fusion: failed to initialize N-gram\n"); return FALSE; } } } if (lm->lmtype == LM_DFA) { /* DFA */ if (lm->config->dfa_filename != NULL && lm->config->dictfilename != NULL) { /* here add grammar specified by "-dfa" and "-v" to grammar list */ multigram_add_gramlist(lm->config->dfa_filename, lm->config->dictfilename, lm->config, LM_DFA_GRAMMAR); } /* load all the specified grammars */ if (multigram_load_all_gramlist(lm) == FALSE) { jlog("ERROR: m_fusion: some error occured in reading grammars\n"); return FALSE; } /* setup for later wchmm building */ multigram_update(lm); /* the whole lexicon will be forced to built in the boot sequence, so reset the global modification flag here */ lm->global_modified = FALSE; } jlog("STAT: *** LM%02d %s loaded\n", lmconf->id, lmconf->name); return TRUE; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_419DA9", "function_addr": 4300201, "binary_name": "9b85fa48a868983d7ee8c1ec5b0fcd80355cfe0cf4a097485a7f6533d5af5dbe.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, "lea rdx, [rax+2]"], [7, "mov rax, [rbp+var_30]"], [8, "movzx eax, word ptr [rax]"], [9, "cwde"], [10, "mov esi, eax"], [11, "lea rdi, aStatLoadingLm0"], [12, "mov eax, 0"], [13, "call sub_466AFB"], [14, "mov [rbp+var_10], 0"], [15, "mov rax, [rbp+var_28]"], [16, "mov rax, [rax]"], [17, "mov rax, [rax+90h]"], [18, "mov [rbp+var_8], rax"], [19, "jmp short loc_419E55"], [20, "mov rax, [rbp+var_8]"], [21, "mov rax, [rax+50h]"], [22, "cmp [rbp+var_30], rax"], [23, "jnz short loc_419E46"], [24, "mov rax, [rbp+var_28]"], [25, "mov rax, [rax+48h]"], [26, "mov [rbp+var_18], rax"], [27, "jmp short loc_419E3F"], [28, "mov rax, [rbp+var_8]"], [29, "mov rdx, [rax+48h]"], [30, "mov rax, [rbp+var_18]"], [31, "mov rax, [rax]"], [32, "cmp rdx, rax"], [33, "jnz short loc_419E30"], [34, "mov rax, [rbp+var_18]"], [35, "mov [rbp+var_10], rax"], [36, "mov rax, [rbp+var_18]"], [37, "mov rax, [rax+380h]"], [38, "mov [rbp+var_18], rax"], [39, "cmp [rbp+var_18], 0"], [40, "jnz short loc_419E14"], [41, "mov rax, [rbp+var_8]"], [42, "mov rax, [rax+0F8h]"], [43, "mov [rbp+var_8], rax"], [44, "cmp [rbp+var_8], 0"], [45, "jnz short loc_419DF8"], [46, "cmp [rbp+var_10], 0"], [47, "jnz short loc_419EA1"], [48, "mov rax, [rbp+var_30]"], [49, "lea rdx, [rax+2]"], [50, "mov rax, [rbp+var_30]"], [51, "movzx eax, word ptr [rax]"], [52, "cwde"], [53, "mov esi, eax"], [54, "lea rdi, aErrorCannotFin"], [55, "mov eax, 0"], [56, "call sub_466AFB"], [57, "lea rdi, aErrorYouShould_0"], [58, "mov eax, 0"], [59, "call sub_466AFB"], [60, "mov eax, 0"], [61, "jmp locret_41A063"], [62, "mov rdx, [rbp+var_30]"], [63, "mov rax, [rbp+var_28]"], [64, "mov rsi, rdx"], [65, "mov rdi, rax"], [66, "call sub_406CF3"], [67, "mov [rbp+var_20], rax"], [68, "mov rax, [rbp+var_20]"], [69, "mov rdx, [rbp+var_10]"], [70, "mov [rax+8], rdx"], [71, "mov rax, [rbp+var_20]"], [72, "mov eax, [rax+10h]"], [73, "cmp eax, 1"], [74, "jnz loc_419F9F"], [75, "mov rax, [rbp+var_20]"], [76, "mov rax, [rax+8]"], [77, "mov rdx, [rax+10h]"], [78, "mov rax, [rbp+var_20]"], [79, "mov rax, [rax]"], [80, "mov rsi, rdx"], [81, "mov rdi, rax"], [82, "call sub_419495"], [83, "mov rdx, [rbp+var_20]"], [84, "mov [rdx+18h], rax"], [85, "mov rax, [rbp+var_20]"], [86, "mov rax, [rax+18h]"], [87, "test rax, rax"], [88, "jnz short loc_419F22"], [89, "lea rdi, aErrorMFusionFa_9"], [90, "mov eax, 0"], [91, "call sub_466AFB"], [92, "mov eax, 0"], [93, "jmp locret_41A063"], [94, "mov rax, [rbp+var_20]"], [95, "mov rax, [rax]"], [96, "mov rax, [rax+78h]"], [97, "test rax, rax"], [98, "jnz short loc_419F55"], [99, "mov rax, [rbp+var_20]"], [100, "mov rax, [rax]"], [101, "mov rax, [rax+80h]"], [102, "test rax, rax"], [103, "jnz short loc_419F55"], [104, "mov rax, [rbp+var_20]"], [105, "mov rax, [rax]"], [106, "mov rax, [rax+70h]"], [107, "test rax, rax"], [108, "jz short loc_419F9F"], [109, "mov rax, [rbp+var_20]"], [110, "mov rdx, [rax+18h]"], [111, "mov rax, [rbp+var_20]"], [112, "mov rax, [rax]"], [113, "mov rsi, rdx"], [114, "mov rdi, rax"], [115, "call sub_419906"], [116, "mov rdx, [rbp+var_20]"], [117, "mov [rdx+20h], rax"], [118, "mov rax, [rbp+var_20]"], [119, "mov rax, [rax+20h]"], [120, "test rax, rax"], [121, "jnz short loc_419F9F"], [122, "lea rdi, aErrorMFusionFa_10"], [123, "mov eax, 0"], [124, "call sub_466AFB"], [125, "mov eax, 0"], [126, "jmp locret_41A063"], [127, "mov rax, [rbp+var_20]"], [128, "mov eax, [rax+10h]"], [129, "cmp eax, 2"], [130, "jnz loc_41A03B"], [131, "mov rax, [rbp+var_20]"], [132, "mov rax, [rax]"], [133, "mov rax, [rax+88h]"], [134, "test rax, rax"], [135, "jz short loc_419FFF"], [136, "mov rax, [rbp+var_20]"], [137, "mov rax, [rax]"], [138, "mov rax, [rax+50h]"], [139, "test rax, rax"], [140, "jz short loc_419FFF"], [141, "mov rax, [rbp+var_20]"], [142, "mov rdx, [rax]"], [143, "mov rax, [rbp+var_20]"], [144, "mov rax, [rax]"], [145, "mov rsi, [rax+50h]"], [146, "mov rax, [rbp+var_20]"], [147, "mov rax, [rax]"], [148, "mov rax, [rax+88h]"], [149, "mov ecx, 1"], [150, "mov rdi, rax"], [151, "call sub_41E405"], [152, "mov rax, [rbp+var_20]"], [153, "mov rdi, rax"], [154, "call sub_41DE39"], [155, "test al, al"], [156, "jnz short loc_41A027"], [157, "lea rdi, aErrorMFusionSo"], [158, "mov eax, 0"], [159, "call sub_466AFB"], [160, "mov eax, 0"], [161, "jmp short locret_41A063"], [162, "mov rax, [rbp+var_20]"], [163, "mov rdi, rax"], [164, "call sub_41D482"], [165, "mov rax, [rbp+var_20]"], [166, "mov byte ptr [rax+40h], 0"], [167, "mov rax, [rbp+var_30]"], [168, "lea rdx, [rax+2]"], [169, "mov rax, [rbp+var_30]"], [170, "movzx eax, word ptr [rax]"], [171, "cwde"], [172, "mov esi, eax"], [173, "lea rdi, aStatLm02dSLoad"], [174, "mov eax, 0"], [175, "call sub_466AFB"], [176, "mov eax, 1"], [177, "leave"], [178, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 4], [8, 7], [10, 8], [15, 3], [16, 15], [17, 16], [18, 17], [20, 18], [20, 43], [21, 20], [22, 21], [22, 4], [23, 22], [24, 3], [25, 24], [26, 25], [28, 18], [28, 43], [29, 28], [30, 38], [30, 26], [31, 30], [32, 29], [32, 31], [33, 32], [34, 38], [34, 26], [35, 34], [36, 38], [36, 26], [37, 36], [38, 37], [39, 26], [39, 38], [40, 39], [41, 18], [41, 43], [42, 41], [43, 42], [44, 18], [44, 43], [45, 44], [46, 35], [46, 14], [47, 46], [48, 4], [49, 48], [49, 29], [49, 6], [50, 4], [51, 50], [53, 51], [54, 11], [57, 54], [62, 4], [63, 3], [64, 62], [65, 63], [67, 66], [68, 67], [69, 35], [69, 14], [70, 68], [70, 69], [71, 67], [72, 70], [72, 71], [73, 72], [74, 73], [75, 67], [76, 70], [76, 75], [76, 84], [77, 76], [77, 84], [77, 70], [78, 67], [79, 78], [79, 84], [79, 70], [80, 77], [81, 79], [83, 67], [84, 83], [84, 82], [85, 67], [86, 85], [86, 84], [87, 86], [88, 87], [89, 81], [94, 67], [95, 84], [95, 70], [95, 94], [96, 95], [96, 84], [96, 70], [97, 96], [98, 97], [99, 67], [100, 84], [100, 70], [100, 99], [101, 84], [101, 70], [101, 100], [102, 101], [103, 102], [104, 67], [105, 70], [105, 104], [105, 84], [106, 84], [106, 70], [106, 105], [107, 106], [108, 107], [109, 67], [110, 84], [110, 70], [110, 109], [110, 117], [111, 67], [112, 84], [112, 70], [112, 111], [112, 117], [113, 110], [114, 112], [116, 67], [117, 116], [117, 115], [118, 67], [119, 118], [119, 117], [120, 119], [121, 120], [122, 114], [127, 67], [128, 117], [128, 84], [128, 70], [128, 127], [129, 128], [130, 129], [131, 67], [132, 84], [132, 70], [132, 131], [132, 117], [133, 132], [133, 70], [133, 117], [133, 84], [134, 133], [135, 134], [136, 67], [137, 117], [137, 84], [137, 70], [137, 136], [138, 137], [138, 84], [138, 70], [138, 117], [139, 138], [140, 139], [141, 67], [142, 84], [142, 141], [142, 70], [142, 117], [143, 67], [144, 70], [144, 143], [144, 117], [144, 84], [145, 117], [145, 144], [145, 84], [145, 70], [146, 67], [147, 146], [147, 84], [147, 70], [147, 117], [148, 70], [148, 147], [148, 117], [148, 84], [150, 148], [152, 67], [153, 152], [155, 154], [156, 155], [157, 153], [162, 67], [163, 162], [165, 67], [166, 165], [167, 4], [168, 116], [168, 84], [168, 166], [168, 70], [168, 83], [168, 69], [168, 142], [168, 117], [168, 167], [169, 4], [170, 169], [170, 84], [170, 166], [170, 70], [170, 117], [172, 170], [173, 163], [173, 114], [173, 81], [173, 65], [178, 125], [178, 60], [178, 92], [178, 176], [178, 160]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_419DA9", "query": "\n\n\n__int64 __fastcall sub_419DA9(_QWORD *a1, __int16 *a2, __int64 a3, int a4, int a5, int a6)\n{\nint v6; // ecx\nint v7; // er8\nint v8; // er9\nint v9; // esi\nint v10; // edx\nint v11; // ecx\nint v12; // er8\nint v13; // er9\nint v15; // ecx\nint v16; // er8\nint v17; // er9\nint v18; // edx\nint v19; // ecx\nint v20; // er8\nint v21; // er9\n__int16 *v22; // [rsp+0h] [rbp-30h]\n__int64 *v23; // [rsp+10h] [rbp-20h]\n_QWORD *j; // [rsp+18h] [rbp-18h]\n_QWORD *v25; // [rsp+20h] [rbp-10h]\n_QWORD *i; // [rsp+28h] [rbp-8h]\n\nv22 = a2;\nsub_466AFB((unsigned int)\"STAT: *** loading LM%02d %s\\n\", *a2, (_DWORD)a2 + 2, a4, a5, a6);\nv25 = 0LL;\nfor ( i = *(_QWORD **)(*a1 + 144LL); i; i = (_QWORD *)i[31] )\n{\nif ( a2 == (__int16 *)i[10] )\n{\nfor ( j = (_QWORD *)a1[9]; j; j = (_QWORD *)j[112] )\n{\nif ( i[9] == *j )\nv25 = j;\n}\n}\n}\nif ( !v25 )\n{\nv9 = *a2;\nsub_466AFB((unsigned int)\"ERROR: cannot find corresponding AM for LM%02d %s\\n\", v9, (_DWORD)v22 + 2, v6, v7, v8);\nsub_466AFB(\n(unsigned int)\"ERROR: you should write all AM/LM combinations to be used for recognition with \\\"-SR\\\"\\n\",\nv9,\nv10,\nv11,\nv12,\nv13);\nreturn 0LL;\n}\nv23 = sub_406CF3((__int64)a1, (__int64)a2);\nv23[1] = (__int64)v25;\nif ( *((_DWORD *)v23 + 4) == 1 )\n{\na2 = *(__int16 **)(v23[1] + 16);\nv23[3] = (__int64)sub_419495(*v23, (__int64)a2);\nif ( !v23[3] )\n{\nsub_466AFB(\n(unsigned int)\"ERROR: m_fusion: failed to initialize dictionary\\n\",\n(_DWORD)a2,\n(_DWORD)v23,\nv15,\nv16,\nv17);\nreturn 0LL;\n}\nif ( *(_QWORD *)(*v23 + 120) || *(_QWORD *)(*v23 + 128) || *(_QWORD *)(*v23 + 112) )\n{\na2 = (__int16 *)v23[3];\nv23[4] = sub_419906(*v23, (__int64)a2);\nif ( !v23[4] )\n{\nsub_466AFB(\n(unsigned int)\"ERROR: m_fusion: failed to initialize N-gram\\n\",\n(_DWORD)a2,\n(_DWORD)v23,\nv15,\nv16,\nv17);\nreturn 0LL;\n}\n}\n}\nif ( *((_DWORD *)v23 + 4) == 2 )\n{\nif ( *(_QWORD *)(*v23 + 136) )\n{\nif ( *(_QWORD *)(*v23 + 80) )\n{\na2 = *(__int16 **)(*v23 + 80);\nsub_41E405(*(_QWORD *)(*v23 + 136), a2, *v23, 1LL);\n}\n}\nif ( !(unsigned __int8)sub_41DE39(v23) )\n{\nsub_466AFB(\n(unsigned int)\"ERROR: m_fusion: some error occured in reading grammars\\n\",\n(_DWORD)a2,\nv18,\nv19,\nv20,\nv21);\nreturn 0LL;\n}\nsub_41D482(v23);\n*((_BYTE *)v23 + 64) = 0;\n}\nsub_466AFB((unsigned int)\"STAT: *** LM%02d %s loaded\\n\", *v22, (_DWORD)v22 + 2, v15, v16, v17);\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,v9,v23,j,v25,i,sub_419DA9,sub_466AFB,sub_406CF3,sub_419495,sub_419906,sub_41E405,sub_41DE39,sub_41D482,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'recog', 'a2': 'lmconf', 'v9': 'lmconf', 'v23': 'lm', 'j': 'atmp', 'v25': 'am', 'i': 'sh', 'sub_419DA9': 'j_load_lm', 'sub_466AFB': 'jlog', 'sub_406CF3': 'j_process_lm_new', 'sub_419495': 'initialize_dict', 'sub_419906': 'initialize_ngram', 'sub_41E405': 'multigram_add_gramlist', 'sub_41DE39': 'multigram_load_all_gramlist', 'sub_41D482': 'multigram_update'}"}
mycore_ustrcasecmp_without_checks_by_secondary
83ddb9e668ebc621076aa87174a2271b3cf83eff718f2ac454b937c5de61feea
lexborisov
Modest
NA
bool mycore_ustrcasecmp_without_checks_by_secondary(const unsigned char* ustr1, const unsigned char* ustr2) { while (*ustr1 != '\0') { if(mycore_string_chars_lowercase_map[*ustr1] != mycore_string_chars_lowercase_map[*ustr2]) return false; ustr1++; ustr2++; } return true; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4038CD", "function_addr": 4208845, "binary_name": "83ddb9e668ebc621076aa87174a2271b3cf83eff718f2ac454b937c5de61feea.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, "jmp short loc_40391E"], [5, "mov rax, [rbp+var_8]"], [6, "movzx eax, byte ptr [rax]"], [7, "movzx eax, al"], [8, "cdqe"], [9, "lea rdx, unk_41A720"], [10, "movzx edx, byte ptr [rax+rdx]"], [11, "mov rax, [rbp+var_10]"], [12, "movzx eax, byte ptr [rax]"], [13, "movzx eax, al"], [14, "cdqe"], [15, "lea rcx, unk_41A720"], [16, "movzx eax, byte ptr [rax+rcx]"], [17, "cmp dl, al"], [18, "jz short loc_403914"], [19, "mov eax, 0"], [20, "jmp short loc_40392E"], [21, "add [rbp+var_8], 1"], [22, "add [rbp+var_10], 1"], [23, "mov rax, [rbp+var_8]"], [24, "movzx eax, byte ptr [rax]"], [25, "test al, al"], [26, "jnz short loc_4038DB"], [27, "mov eax, 1"], [28, "pop rbp"], [29, "retn"]], "data_dep": [[5, 21], [5, 2], [6, 5], [7, 6], [9, 10], [10, 7], [11, 22], [11, 3], [12, 11], [13, 12], [15, 15], [16, 13], [17, 10], [17, 16], [18, 17], [21, 21], [21, 2], [22, 22], [22, 3], [23, 21], [23, 2], [24, 23], [25, 24], [26, 25], [28, 0], [29, 19], [29, 27]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/83ddb9e668ebc621076aa87174a2271b3cf83eff718f2ac454b937c5de61feea_83ddb9e668ebc621076aa87174a2271b3cf83eff718f2ac454b937c5de61feea.jsonl.gz", "strip_func_name": "sub_4038CD", "query": "\n\n\n__int64 __fastcall sub_4038CD(_BYTE *a1, unsigned __int8 *a2)\n{\nwhile ( *a1 )\n{\nif ( byte_41A720[(unsigned __int8)*a1] != byte_41A720[*a2] )\nreturn 0LL;\n++a1;\n++a2;\n}\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,sub_4038CD,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ustr1', 'a2': 'ustr2', 'sub_4038CD': 'mycore_ustrcasecmp_without_checks_by_secondary'}"}
DecodeMemBarrierOption
0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8
michalsc
Emu68
NA
static DecodeStatus DecodeMemBarrierOption(MCInst *Inst, unsigned Val, uint64_t Address, const void *Decoder) { if (Val & ~0xf) return MCDisassembler_Fail; MCOperand_CreateImm0(Inst, Val); return MCDisassembler_Success; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_47012A", "function_addr": 4653354, "binary_name": "0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8.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 [rbp+var_20], rcx"], [7, "mov eax, [rbp+var_C]"], [8, "and eax, 0FFFFFFF0h"], [9, "test eax, eax"], [10, "jz short loc_470152"], [11, "mov eax, 0"], [12, "jmp short locret_470169"], [13, "mov edx, [rbp+var_C]"], [14, "mov rax, [rbp+var_8]"], [15, "mov rsi, rdx"], [16, "mov rdi, rax"], [17, "call sub_437F1F"], [18, "mov eax, 3"], [19, "leave"], [20, "retn"]], "data_dep": [[7, 4], [8, 7], [9, 8], [10, 9], [13, 4], [14, 3], [15, 13], [16, 14], [20, 11], [20, 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/0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8_0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8.jsonl.gz", "strip_func_name": "sub_47012A", "query": "\n\n\n__int64 __fastcall sub_47012A(__int64 a1, unsigned int a2)\n{\nif ( (a2 & 0xFFFFFFF0) != 0 )\nreturn 0LL;\nsub_437F1F(a1, a2);\nreturn 3LL;\n}\n\n\n\nQ:[a1,a2,sub_47012A,sub_437F1F,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'Inst', 'a2': 'Val', 'sub_47012A': 'DecodeMemBarrierOption', 'sub_437F1F': 'MCOperand_CreateImm0'}"}
print_nuvoton_chips
8f546fdfb581421fdfbfeb375ad304f6d5289eb31a93e4934d4f651ec840ff14
teslamotors
coreboot
NA
void print_nuvoton_chips(void) { print_vendor_chips("Nuvoton", reg_table); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40357F", "function_addr": 4207999, "binary_name": "8f546fdfb581421fdfbfeb375ad304f6d5289eb31a93e4934d4f651ec840ff14.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov esi, offset unk_544880"], [3, "mov edi, offset aNuvoton"], [4, "call sub_401DAA"], [5, "nop"], [6, "pop rbp"], [7, "retn"]], "data_dep": [[6, 0], [7, 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/8f546fdfb581421fdfbfeb375ad304f6d5289eb31a93e4934d4f651ec840ff14_8f546fdfb581421fdfbfeb375ad304f6d5289eb31a93e4934d4f651ec840ff14.jsonl.gz", "strip_func_name": "sub_40357F", "query": "\n\n\nint sub_40357F()\n{\nreturn sub_401DAA(\"Nuvoton\", (__int64)&unk_544880);\n}\n\n\n\nQ:[sub_40357F,sub_401DAA,]\nAssistant: ", "hints": "[]", "response": "{'sub_40357F': 'print_nuvoton_chips', 'sub_401DAA': 'print_vendor_chips'}"}
handle_read_blob_request
0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26
Matheus-Garbelini
esp32_bluetooth_classic_sniffer
NA
static uint16_t handle_read_blob_request(att_connection_t * att_connection, uint8_t * request_buffer, uint16_t request_len, uint8_t * response_buffer, uint16_t response_buffer_size){ if (request_len != 5u) return setup_error_invalid_pdu(response_buffer, ATT_READ_BLOB_REQUEST); uint16_t handle = little_endian_read_16(request_buffer, 1); uint16_t value_offset = little_endian_read_16(request_buffer, 3); return handle_read_blob_request2(att_connection, response_buffer, response_buffer_size, handle, value_offset); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_422730", "function_addr": 4335408, "binary_name": "0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov eax, edx"], [6, "mov [rbp+var_30], rcx"], [7, "mov edx, r8d"], [8, "mov [rbp+var_24], ax"], [9, "mov eax, edx"], [10, "mov [rbp+var_28], ax"], [11, "cmp [rbp+var_24], 5"], [12, "jz short loc_42276D"], [13, "mov rax, [rbp+var_30]"], [14, "mov esi, 0Ch"], [15, "mov rdi, rax"], [16, "call sub_421803"], [17, "jmp short locret_4227B6"], [18, "mov rax, [rbp+var_20]"], [19, "mov esi, 1"], [20, "mov rdi, rax"], [21, "call sub_40680F"], [22, "mov [rbp+var_2], ax"], [23, "mov rax, [rbp+var_20]"], [24, "mov esi, 3"], [25, "mov rdi, rax"], [26, "call sub_40680F"], [27, "mov [rbp+var_4], ax"], [28, "movzx edi, [rbp+var_4]"], [29, "movzx ecx, [rbp+var_2]"], [30, "movzx edx, [rbp+var_28]"], [31, "mov rsi, [rbp+var_30]"], [32, "mov rax, [rbp+var_18]"], [33, "mov r8d, edi"], [34, "mov rdi, rax"], [35, "call sub_422579"], [36, "leave"], [37, "retn"]], "data_dep": [[8, 5], [9, 7], [10, 9], [11, 8], [12, 11], [13, 6], [15, 13], [18, 4], [20, 18], [22, 21], [23, 4], [25, 23], [27, 26], [28, 27], [29, 22], [30, 10], [31, 6], [32, 3], [33, 28], [34, 32], [37, 35], [37, 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/0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26_0ec769b39caa7de6d8dc3712435708369a3bed222c654df5c72541697a297b26.jsonl.gz", "strip_func_name": "sub_422730", "query": "\n\n\n__int64 __fastcall sub_422730(_BYTE *a1, __int64 a2, __int16 a3, _BYTE *a4, __int16 a5)\n{\nunsigned __int16 v8; // [rsp+2Ch] [rbp-4h]\nunsigned __int16 v9; // [rsp+2Eh] [rbp-2h]\n\nif ( a3 != 5 )\nreturn sub_421803(a4, 12);\nv9 = sub_40680F(a2, 1);\nv8 = sub_40680F(a2, 3);\nreturn sub_422579(a1, a4, a5, v9, v8);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v9,sub_422730,sub_421803,sub_40680F,sub_422579,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'request_len', 'a4': 'response_buffer', 'a1': 'att_connection', 'a2': 'request_buffer', 'a5': 'response_buffer_size', 'v9': 'handle', 'sub_422730': 'handle_read_blob_request', 'sub_421803': 'setup_error_invalid_pdu', 'sub_40680F': 'little_endian_read_16', 'sub_422579': 'handle_read_blob_request2'}"}
BITv06_highbit32
2f91978c4963d9d742b336bb9bf6c83ff51c5a97f2b6e1fd1fbd2d6ab517b224
dimkr
szl
NA
MEM_STATIC unsigned BITv06_highbit32 (register U32 val) { # if defined(_MSC_VER) /* Visual */ unsigned long r=0; _BitScanReverse ( &r, val ); return (unsigned) r; # elif defined(__GNUC__) && (__GNUC__ >= 3) /* Use GCC Intrinsic */ return 31 - __builtin_clz (val); # else /* Software version */ static const unsigned DeBruijnClz[32] = { 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31 }; U32 v = val; unsigned r; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; r = DeBruijnClz[ (U32) (v * 0x07C4ACDDU) >> 27]; return r; # endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_460986", "function_addr": 4589958, "binary_name": "2f91978c4963d9d742b336bb9bf6c83ff51c5a97f2b6e1fd1fbd2d6ab517b224.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, edi"], [3, "bsr eax, eax"], [4, "xor eax, 1Fh"], [5, "mov edx, 1Fh"], [6, "sub edx, eax"], [7, "mov eax, edx"], [8, "pop rbp"], [9, "retn"]], "data_dep": [[3, 2], [4, 3], [6, 5], [6, 4], [7, 6], [8, 0], [9, 7]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2f91978c4963d9d742b336bb9bf6c83ff51c5a97f2b6e1fd1fbd2d6ab517b224_2f91978c4963d9d742b336bb9bf6c83ff51c5a97f2b6e1fd1fbd2d6ab517b224.jsonl.gz", "strip_func_name": "sub_460986", "query": "\n\n\n__int64 __fastcall sub_460986(unsigned int a1)\n{\nunsigned int v1; // eax\n\n_BitScanReverse(&v1, a1);\nreturn 31 - (v1 ^ 0x1F);\n}\n\n\n\nQ:[sub_460986,]\nAssistant: ", "hints": "[]", "response": "{'sub_460986': 'BITv06_highbit32'}"}
FL2_initEncoders
24d78b488ac6efd29907ebed989997e5db3f729ef5517ddab75dceaf3790cdd4
powturbo
TurboBench
NA
static int FL2_initEncoders(FL2_CCtx* const cctx) { for(unsigned u = 0; u < cctx->jobCount; ++u) { if (LZMA2_hashAlloc(cctx->jobs[u].enc, &cctx->params.cParams) != 0) return 1; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40BD26", "function_addr": 4242726, "binary_name": "24d78b488ac6efd29907ebed989997e5db3f729ef5517ddab75dceaf3790cdd4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_4], 0"], [5, "jmp short loc_40BD7D"], [6, "mov rax, [rbp+var_18]"], [7, "lea rdx, [rax+58h]"], [8, "mov rsi, [rbp+var_18]"], [9, "mov ecx, [rbp+var_4]"], [10, "mov rax, rcx"], [11, "add rax, rax"], [12, "add rax, rcx"], [13, "shl rax, 4"], [14, "add rax, rsi"], [15, "add rax, 138h"], [16, "mov rax, [rax]"], [17, "mov rsi, rdx"], [18, "mov rdi, rax"], [19, "call sub_410FE1"], [20, "test eax, eax"], [21, "jz short loc_40BD79"], [22, "mov eax, 1"], [23, "jmp short locret_40BD91"], [24, "add [rbp+var_4], 1"], [25, "mov rax, [rbp+var_18]"], [26, "mov eax, [rax+128h]"], [27, "cmp [rbp+var_4], eax"], [28, "jb short loc_40BD3B"], [29, "mov eax, 0"], [30, "leave"], [31, "retn"]], "data_dep": [[6, 3], [7, 7], [7, 6], [8, 3], [9, 4], [9, 24], [10, 9], [11, 10], [12, 9], [12, 11], [13, 12], [14, 13], [14, 8], [15, 14], [16, 15], [17, 7], [18, 16], [20, 19], [21, 20], [24, 4], [24, 24], [25, 3], [26, 25], [27, 4], [27, 24], [27, 26], [28, 27], [31, 29], [31, 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/24d78b488ac6efd29907ebed989997e5db3f729ef5517ddab75dceaf3790cdd4_24d78b488ac6efd29907ebed989997e5db3f729ef5517ddab75dceaf3790cdd4.jsonl.gz", "strip_func_name": "sub_40BD26", "query": "\n\n\n__int64 __fastcall sub_40BD26(__int64 a1)\n{\nunsigned int i; // [rsp+1Ch] [rbp-4h]\n\nfor ( i = 0; i < *(_DWORD *)(a1 + 296); ++i )\n{\nif ( (unsigned int)sub_410FE1(*(_QWORD *)(a1 + 48LL * i + 312), a1 + 88) )\nreturn 1LL;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,i,sub_40BD26,sub_410FE1,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'cctx', 'i': 'u', 'sub_40BD26': 'FL2_initEncoders', 'sub_410FE1': 'LZMA2_hashAlloc'}"}
get_tun_device
892d4ad8f5dfe4411c8390258729963722141430ec472d7869a6e65f44b91019
samdmarshall
Onlive-Source-Backup
NA
static int get_tun_device(char tapif[IFNAMSIZ]) { struct ifreq ifr; int netfd; /* Start with this zeroed. Messy but sure. */ memset(&ifr, 0, sizeof(ifr)); /* We open the /dev/net/tun device and tell it we want a tap device. A * tap device is like a tun device, only somehow different. To tell * the truth, I completely blundered my way through this code, but it * works now! */ netfd = open_or_die("/dev/net/tun", O_RDWR); ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_VNET_HDR; strcpy(ifr.ifr_name, "tap%d"); if (ioctl(netfd, TUNSETIFF, &ifr) != 0) err(1, "configuring /dev/net/tun"); if (ioctl(netfd, TUNSETOFFLOAD, TUN_F_CSUM|TUN_F_TSO4|TUN_F_TSO6|TUN_F_TSO_ECN) != 0) err(1, "Could not set features for tun device"); /* We don't need checksums calculated for packets coming in this * device: trust us! */ ioctl(netfd, TUNSETNOCSUM, 1); memcpy(tapif, ifr.ifr_name, IFNAMSIZ); return netfd; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40507C", "function_addr": 4214908, "binary_name": "892d4ad8f5dfe4411c8390258729963722141430ec472d7869a6e65f44b91019.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_38], rdi"], [4, "lea rax, [rbp+s]"], [5, "mov edx, 28h "], [6, "mov esi, 0"], [7, "mov rdi, rax"], [8, "call _memset"], [9, "mov esi, 2"], [10, "mov edi, offset aDevNetTun"], [11, "call sub_40272C"], [12, "mov [rbp+fd], eax"], [13, "mov [rbp+var_20], 5002h"], [14, "lea rax, [rbp+s]"], [15, "mov dword ptr [rax], 25706174h"], [16, "mov word ptr [rax+4], 64h "], [17, "lea rdx, [rbp+s]"], [18, "mov eax, [rbp+fd]"], [19, "mov esi, 400454CAh"], [20, "mov edi, eax"], [21, "mov eax, 0"], [22, "call _ioctl"], [23, "test eax, eax"], [24, "jz short loc_4050F6"], [25, "mov esi, offset aConfiguringDev"], [26, "mov edi, 1"], [27, "mov eax, 0"], [28, "call _err"], [29, "mov eax, [rbp+fd]"], [30, "mov edx, 0Fh"], [31, "mov esi, 400454D0h"], [32, "mov edi, eax"], [33, "mov eax, 0"], [34, "call _ioctl"], [35, "test eax, eax"], [36, "jz short loc_405127"], [37, "mov esi, offset aCouldNotSetFea"], [38, "mov edi, 1"], [39, "mov eax, 0"], [40, "call _err"], [41, "mov eax, [rbp+fd]"], [42, "mov edx, 1"], [43, "mov esi, 400454C8h"], [44, "mov edi, eax"], [45, "mov eax, 0"], [46, "call _ioctl"], [47, "mov rax, [rbp+s]"], [48, "mov rdx, [rbp+var_28]"], [49, "mov rcx, [rbp+var_38]"], [50, "mov [rcx], rax"], [51, "mov [rcx+8], rdx"], [52, "mov eax, [rbp+fd]"], [53, "leave"], [54, "retn"]], "data_dep": [[7, 4], [12, 11], [14, 11], [15, 14], [16, 14], [17, 5], [18, 12], [20, 18], [23, 22], [24, 23], [29, 12], [32, 29], [35, 34], [36, 35], [41, 12], [44, 41], [49, 3], [50, 49], [50, 47], [51, 49], [51, 48], [52, 12], [54, 52]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/892d4ad8f5dfe4411c8390258729963722141430ec472d7869a6e65f44b91019_892d4ad8f5dfe4411c8390258729963722141430ec472d7869a6e65f44b91019.jsonl.gz", "strip_func_name": "sub_40507C", "query": "\n\n\n__int64 __fastcall sub_40507C(_QWORD *a1)\n{\n__int64 v1; // rdx\n__int64 s[2]; // [rsp+10h] [rbp-30h] BYREF\n__int16 v4; // [rsp+20h] [rbp-20h]\nint fd; // [rsp+3Ch] [rbp-4h]\n\nmemset(s, 0, 0x28uLL);\nfd = sub_40272C(\"/dev/net/tun\", 2);\nv4 = 20482;\nstrcpy((char *)s, \"tap%d\");\nif ( ioctl(fd, 0x400454CAuLL, s) )\nerr(1, \"configuring /dev/net/tun\");\nif ( ioctl(fd, 0x400454D0uLL, 15LL) )\nerr(1, \"Could not set features for tun device\");\nioctl(fd, 0x400454C8uLL, 1LL);\nv1 = s[1];\n*a1 = s[0];\na1[1] = v1;\nreturn (unsigned int)fd;\n}\n\n\n\nQ:[a1,s,fd,sub_40507C,sub_40272C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'tapif', 's': 'ifr', 'fd': 'netfd', 'sub_40507C': 'get_tun_device', 'sub_40272C': 'open_or_die'}"}
goep_client_request_create_put
ef3e83fa7cd2ea82c8d52009344d188bc01d84108831282655bc59beb173d4ac
bluekitchen
btstack
NA
void goep_client_request_create_put(uint16_t goep_cid){ goep_client_t * goep_client = goep_client_for_cid(goep_cid); if (goep_client == NULL){ return; } goep_client_packet_init(goep_client, OBEX_OPCODE_PUT | OBEX_OPCODE_FINAL_BIT_MASK); uint8_t * buffer = goep_client_get_outgoing_buffer(goep_client); uint16_t buffer_len = goep_client_get_outgoing_buffer_len(goep_client); obex_message_builder_request_create_put(buffer, buffer_len, goep_client->obex_connection_id); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4488C5", "function_addr": 4491461, "binary_name": "ef3e83fa7cd2ea82c8d52009344d188bc01d84108831282655bc59beb173d4ac.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov eax, edi"], [4, "mov [rbp+var_24], ax"], [5, "movzx eax, [rbp+var_24]"], [6, "mov edi, eax"], [7, "call sub_447591"], [8, "mov [rbp+var_8], rax"], [9, "cmp [rbp+var_8], 0"], [10, "jz short loc_448935"], [11, "mov rax, [rbp+var_8]"], [12, "mov esi, 82h"], [13, "mov rdi, rax"], [14, "call sub_4480ED"], [15, "mov rax, [rbp+var_8]"], [16, "mov rdi, rax"], [17, "call sub_448092"], [18, "mov [rbp+var_10], rax"], [19, "mov rax, [rbp+var_8]"], [20, "mov rdi, rax"], [21, "call sub_4480B9"], [22, "mov [rbp+var_12], ax"], [23, "mov rax, [rbp+var_8]"], [24, "mov edx, [rax+64h]"], [25, "movzx ecx, [rbp+var_12]"], [26, "mov rax, [rbp+var_10]"], [27, "mov esi, ecx"], [28, "mov rdi, rax"], [29, "call sub_446996"], [30, "jmp short locret_448936"], [31, "nop"], [32, "leave"], [33, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [8, 7], [9, 8], [10, 9], [11, 8], [13, 11], [15, 8], [16, 15], [18, 17], [19, 8], [20, 19], [22, 21], [23, 8], [24, 23], [25, 22], [26, 18], [27, 25], [28, 26], [33, 29], [33, 7]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/ef3e83fa7cd2ea82c8d52009344d188bc01d84108831282655bc59beb173d4ac_ef3e83fa7cd2ea82c8d52009344d188bc01d84108831282655bc59beb173d4ac.jsonl.gz", "strip_func_name": "sub_4488C5", "query": "\n\n\n__int64 __fastcall sub_4488C5(__int16 a1)\n{\n__int64 result; // rax\n__int64 v2; // rdx\n__int64 v3; // rcx\nint v4; // er8\nint v5; // er9\nunsigned __int16 v6; // [rsp+1Eh] [rbp-12h]\n_BYTE *v7; // [rsp+20h] [rbp-10h]\n__int64 v8; // [rsp+28h] [rbp-8h]\n\nresult = sub_447591(a1);\nv8 = result;\nif ( result )\n{\nsub_4480ED(result, 130LL, v2, v3, v4, v5);\nv7 = sub_448092(v8);\nv6 = sub_4480B9(v8);\nresult = sub_446996(v7, v6, *(_DWORD *)(v8 + 100));\n}\nreturn result;\n}\n\n\n\nQ:[a1,v7,v8,sub_4488C5,sub_447591,sub_4480ED,sub_448092,sub_4480B9,sub_446996,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'goep_cid', 'v7': 'buffer', 'v8': 'goep_client', 'sub_4488C5': 'goep_client_request_create_put', 'sub_447591': 'goep_client_for_cid', 'sub_4480ED': 'goep_client_packet_init', 'sub_448092': 'goep_client_get_outgoing_buffer', 'sub_4480B9': 'goep_client_get_outgoing_buffer_len', 'sub_446996': 'obex_message_builder_request_create_put'}"}
sqlite3MemJournalSize
1f521185abebe790038be8fb8b4eb165b2fd6d5af5b82a99f02d98f6827de627
andoma
movian
NA
SQLITE_PRIVATE int sqlite3MemJournalSize(void){ return sizeof(MemJournal); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_453FA7", "function_addr": 4538279, "binary_name": "1f521185abebe790038be8fb8b4eb165b2fd6d5af5b82a99f02d98f6827de627.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov eax, 30h "], [3, "pop rbp"], [4, "retn"]], "data_dep": [[3, 0], [4, 2]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1f521185abebe790038be8fb8b4eb165b2fd6d5af5b82a99f02d98f6827de627_1f521185abebe790038be8fb8b4eb165b2fd6d5af5b82a99f02d98f6827de627.jsonl.gz", "strip_func_name": "sub_453FA7", "query": "\n\n\n__int64 sub_453FA7()\n{\nreturn 48LL;\n}\n\n\n\nQ:[sub_453FA7,]\nAssistant: ", "hints": "[]", "response": "{'sub_453FA7': 'sqlite3MemJournalSize'}"}
main
155215a5e60d9de6b617701ffe3bbb4c4223ad731ef61ee59bb01bc6ac812026
evilpan
Airkiss
NA
int main(void) { wireless_scan_head head; wireless_scan *presult = NULL; memset(&head, 0, sizeof(head)); assert(0 == wifi_scan("wlan0", &head)); /* Traverse the results */ presult = head.result; while (NULL != presult) { print_ap_info(presult); presult = presult->next; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "main", "function_addr": 4198850, "binary_name": "155215a5e60d9de6b617701ffe3bbb4c4223ad731ef61ee59bb01bc6ac812026.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], 0"], [4, "lea rax, [rbp+s]"], [5, "mov edx, 10h"], [6, "mov esi, 0"], [7, "mov rdi, rax"], [8, "call _memset"], [9, "lea rax, [rbp+s]"], [10, "mov rsi, rax"], [11, "mov edi, offset aWlan0"], [12, "call sub_40125D"], [13, "test eax, eax"], [14, "jz short loc_401216"], [15, "mov ecx, offset function"], [16, "mov edx, 0Ah"], [17, "mov esi, offset file"], [18, "mov edi, offset assertion"], [19, "call ___assert_fail"], [20, "mov rax, [rbp+s]"], [21, "mov [rbp+var_8], rax"], [22, "jmp short loc_401237"], [23, "mov rax, [rbp+var_8]"], [24, "mov rdi, rax"], [25, "call sub_4014BB"], [26, "mov rax, [rbp+var_8]"], [27, "mov rax, [rax]"], [28, "mov [rbp+var_8], rax"], [29, "cmp [rbp+var_8], 0"], [30, "jnz short loc_401220"], [31, "mov eax, 0"], [32, "leave"], [33, "retn"]], "data_dep": [[7, 4], [9, 8], [10, 9], [13, 12], [14, 13], [21, 20], [23, 28], [23, 21], [24, 23], [26, 21], [26, 28], [27, 26], [28, 27], [29, 21], [29, 28], [30, 29], [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/155215a5e60d9de6b617701ffe3bbb4c4223ad731ef61ee59bb01bc6ac812026_155215a5e60d9de6b617701ffe3bbb4c4223ad731ef61ee59bb01bc6ac812026.jsonl.gz", "strip_func_name": "main", "query": "\n\n\n__int64 __fastcall main(int a1, char **a2, char **a3)\n{\n__int64 s[3]; // [rsp+0h] [rbp-20h] BYREF\n__int64 *i; // [rsp+18h] [rbp-8h]\n\ni = 0LL;\nmemset(s, 0, 0x10uLL);\nif ( (unsigned int)sub_40125D(\"wlan0\", s) )\n__assert_fail(\"0 == wifi_scan(\\\"wlan0\\\", &head)\", \"main.c\", 0xAu, \"main\");\nfor ( i = (__int64 *)s[0]; i; i = (__int64 *)*i )\nsub_4014BB(i);\nreturn 0LL;\n}\n\n\n\nQ:[a2,a3,a1,s,i,sub_40125D,sub_4014BB,]\nAssistant: ", "hints": "[]", "response": "{'a2': 'argv', 'a3': 'envp', 'a1': 'argc', 's': 'head', 'i': 'presult', 'sub_40125D': 'wifi_scan', 'sub_4014BB': 'print_ap_info'}"}
db_getuservalue
38bb5bcc430e0fa7d34733714ee56efeac7c173483e07cba4dab1c923e34ac41
etlegacy
etlegacy
NA
static int db_getuservalue (lua_State *L) { int n = (int)luaL_optinteger(L, 2, 1); if (lua_type(L, 1) != LUA_TUSERDATA) luaL_pushfail(L); else if (lua_getiuservalue(L, 1, n) != LUA_TNONE) { lua_pushboolean(L, 1); return 2; } return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_432912", "function_addr": 4401426, "binary_name": "38bb5bcc430e0fa7d34733714ee56efeac7c173483e07cba4dab1c923e34ac41.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 edx, 1"], [6, "mov esi, 2"], [7, "mov rdi, rax"], [8, "call luaL_optinteger"], [9, "mov [rbp+var_4], eax"], [10, "mov rax, [rbp+var_18]"], [11, "mov esi, 1"], [12, "mov rdi, rax"], [13, "call lua_type"], [14, "cmp eax, 7"], [15, "jz short loc_43295B"], [16, "mov rax, [rbp+var_18]"], [17, "mov rdi, rax"], [18, "call lua_pushnil"], [19, "jmp short loc_43298C"], [20, "mov edx, [rbp+var_4]"], [21, "mov rax, [rbp+var_18]"], [22, "mov esi, 1"], [23, "mov rdi, rax"], [24, "call lua_getiuservalue"], [25, "cmp eax, 0FFFFFFFFh"], [26, "jz short loc_43298C"], [27, "mov rax, [rbp+var_18]"], [28, "mov esi, 1"], [29, "mov rdi, rax"], [30, "call lua_pushboolean"], [31, "mov eax, 2"], [32, "jmp short locret_432991"], [33, "mov eax, 1"], [34, "leave"], [35, "retn"]], "data_dep": [[4, 3], [7, 4], [9, 8], [10, 3], [12, 10], [14, 13], [15, 14], [16, 3], [17, 16], [20, 9], [21, 3], [23, 21], [25, 24], [26, 25], [27, 3], [29, 27], [35, 33], [35, 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/38bb5bcc430e0fa7d34733714ee56efeac7c173483e07cba4dab1c923e34ac41_38bb5bcc430e0fa7d34733714ee56efeac7c173483e07cba4dab1c923e34ac41.jsonl.gz", "strip_func_name": "sub_432912", "query": "\n\n\n__int64 __fastcall sub_432912(_QWORD *a1)\n{\nint v2; // [rsp+1Ch] [rbp-4h]\n\nv2 = luaL_optinteger(a1, 2u, 1LL);\nif ( (unsigned int)lua_type(a1, 1) == 7 )\n{\nif ( (unsigned int)lua_getiuservalue(a1, 1, v2) != -1 )\n{\nlua_pushboolean((__int64)a1, 1);\nreturn 2LL;\n}\n}\nelse\n{\nlua_pushnil((__int64)a1);\n}\nreturn 1LL;\n}\n\n\n\nQ:[a1,v2,sub_432912,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'L', 'v2': 'n', 'sub_432912': 'db_getuservalue'}"}
sim_disk_attach_help
1812cddc11d5d37e1bfd4b1269e60e52c00acecac170e6456fc2ba2cddc55918
open-simh
simh
NA
t_stat sim_disk_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr) { static struct example_fields { const char *dname; const char *dtype; const char *dsize; const char *dtype2; const char *dsize2; const char *dtype3; const char *dsize3; const char *dtype4; const char *dsize4; } ex_data[] = { {"RQ", "RD54", "159MB", "RX50", "409KB", "RA81", "456MB", "RA92", "1505MB"}, {"RP", "RM03", "33MW", "RM03", "33MW", "RP07", "258MW", "RM03", "15MW"}, {"RP", "RM03", "39MW", "RM03", "39MW", "RP07", "110MW", "RM03", "15MW"}, }; struct example_fields *ex = &ex_data[0]; if (strcmp (dptr->name, "RP") == 0) ex = &ex_data[1]; if (strstr (sim_name, "-10")) { ex = &ex_data[2]; if (strstr (sim_name, "PDP") == NULL) ex->dname = "RPA"; } fprintf (st, "%s Disk Attach Help\n\n", dptr->name); fprintf (st, "Disk container files can be one of several different types:\n\n"); if (strstr (sim_name, "-10") == NULL) { fprintf (st, " SIMH A disk is an unstructured binary file of the size appropriate\n"); fprintf (st, " for the disk drive being simulated accessed by C runtime APIs\n"); fprintf (st, " VHD Virtual Disk format which is described in the \"Microsoft\n"); fprintf (st, " Virtual Hard Disk (VHD) Image Format Specification\". The\n"); fprintf (st, " VHD implementation includes support for 1) Fixed (Preallocated)\n"); fprintf (st, " disks, 2) Dynamically Expanding disks, and 3) Differencing disks.\n"); fprintf (st, " RAW platform specific access to physical disk or CDROM drives\n\n"); } else { fprintf (st, " SIMH A disk is an unstructured binary file of 64bit integers\n" " access by C runtime APIs\n"); fprintf (st, " VHD A disk is an unstructured binary file of 64bit integers\n" " contained in a VHD container\n"); fprintf (st, " RAW A disk is an unstructured binary file of 64bit integers\n" " accessed by direct read/write APIs\n"); fprintf (st, " DBD9 Compatible with KLH10 is a packed big endian word\n"); fprintf (st, " DLD9 Compatible with KLH10 is a packed little endian word\n\n"); } fprintf (st, "Virtual (VHD) Disk support conforms to the \"Virtual Hard Disk Image Format\n"); fprintf (st, "Specification\", Version 1.0 October 11, 2006.\n"); fprintf (st, "Dynamically expanding disks never change their \"Virtual Size\", but they don't\n"); fprintf (st, "consume disk space on the containing storage until the virtual sectors in the\n"); fprintf (st, "disk are actually written to (i.e. a 2GB Dynamic disk container file with only\n"); fprintf (st, "30MB of data will initially be about 30MB in size and this size will grow up to\n"); fprintf (st, "2GB as different sectors are written to. The VHD format contains metadata\n"); fprintf (st, "which describes the drive size and the simh device type in use when the VHD\n"); fprintf (st, "was created. This metadata is therefore available whenever that VHD is\n"); fprintf (st, "attached to an emulated disk device in the future so the device type and\n"); fprintf (st, "size can be automatically be configured.\n\n"); if (dptr->numunits > 1) { uint32 i, attachable_count = 0, out_count = 0, skip_count; for (i=0; i < dptr->numunits; ++i) if ((dptr->units[i].flags & UNIT_ATTABLE) && !(dptr->units[i].flags & UNIT_DIS)) ++attachable_count; for (i=0; (i < dptr->numunits) && (out_count < 2); ++i) if ((dptr->units[i].flags & UNIT_ATTABLE) && !(dptr->units[i].flags & UNIT_DIS)) { fprintf (st, " sim> ATTACH {switches} %s%d diskfile\n", dptr->name, i); ++out_count; } if (attachable_count > 4) { fprintf (st, " .\n"); fprintf (st, " .\n"); fprintf (st, " .\n"); } skip_count = attachable_count - 2; for (i=0; i < dptr->numunits; ++i) if ((dptr->units[i].flags & UNIT_ATTABLE) && !(dptr->units[i].flags & UNIT_DIS)) { if (skip_count == 0) fprintf (st, " sim> ATTACH {switches} %s%d diskfile\n", dptr->name, i); else --skip_count; } } else fprintf (st, " sim> ATTACH {switches} %s diskfile\n", dptr->name); fprintf (st, "\n%s attach command switches\n", dptr->name); fprintf (st, " -R Attach Read Only.\n"); fprintf (st, " -E Must Exist (if not specified an attempt to create the indicated\n"); fprintf (st, " disk container will be attempted).\n"); fprintf (st, " -F Open the indicated disk container in a specific format (default\n"); fprintf (st, " is to autodetect VHD defaulting to RAW if the indicated\n"); fprintf (st, " container is not a VHD).\n"); fprintf (st, " -I Initialize newly created disk so that each sector contains its\n"); fprintf (st, " sector address\n"); fprintf (st, " -K Verify that the disk contents contain the sector address in each\n"); fprintf (st, " sector. Whole disk checked at attach time and each sector is\n"); fprintf (st, " checked when written.\n"); fprintf (st, " -C Create a disk container and copy its contents from another disk\n"); fprintf (st, " (simh, VHD, or RAW format). The current (or specified with -F)\n"); fprintf (st, " container format will be the format of the created container.\n"); fprintf (st, " AUTO or VHD will create a VHD container, SIMH will create a.\n"); fprintf (st, " SIMH container. Add a -V switch to verify a copy operation.\n"); fprintf (st, " Note: A copy will be performed between dissimilar sized\n"); fprintf (st, " containers. Copying from a larger container to a smaller\n"); fprintf (st, " one will produce a truncated result.\n"); fprintf (st, " -V Perform a verification pass to confirm successful data copy\n"); fprintf (st, " operation.\n"); fprintf (st, " -X When creating a VHD, create a fixed sized VHD (vs a Dynamically\n"); fprintf (st, " expanding one).\n"); fprintf (st, " -D Create a Differencing VHD (relative to an already existing VHD\n"); fprintf (st, " disk)\n"); fprintf (st, " -M Merge a Differencing VHD into its parent VHD disk\n"); fprintf (st, " -O Override consistency checks when attaching differencing disks\n"); fprintf (st, " which have unexpected parent disk GUID or timestamps\n\n"); fprintf (st, " -U Fix inconsistencies which are overridden by the -O switch\n"); if (strstr (sim_name, "-10") == NULL) { fprintf (st, " -Y Answer Yes to prompt to overwrite last track (on disk create)\n"); fprintf (st, " -N Answer No to prompt to overwrite last track (on disk create)\n"); } fprintf (st, "Examples:\n"); fprintf (st, " sim> show %s\n", ex->dname); fprintf (st, " %s, address=20001468-2000146B*, no vector, 4 units\n", ex->dname); fprintf (st, " %s0, %s, not attached, write enabled, %s, autosize, AUTO detect format\n", ex->dname, ex->dsize, ex->dtype); fprintf (st, " %s1, %s, not attached, write enabled, %s, autosize, AUTO detect format\n", ex->dname, ex->dsize, ex->dtype); fprintf (st, " %s2, %s, not attached, write enabled, %s, autosize, AUTO detect format\n", ex->dname, ex->dsize, ex->dtype); fprintf (st, " %s3, %s, not attached, write enabled, %s, autosize, AUTO detect format\n", ex->dname, ex->dsize2, ex->dtype2); fprintf (st, " sim> # attach an existing VHD and determine its size and type automatically\n"); fprintf (st, " sim> attach %s0 %s.vhd\n", ex->dname, ex->dtype3); fprintf (st, " sim> show %s0\n", ex->dname); fprintf (st, " %s0, %s, attached to %s.vhd, write enabled, %s, autosize, VHD format\n", ex->dname, ex->dsize3, ex->dtype3, ex->dtype3); fprintf (st, " sim> # create a new %s drive type VHD\n", ex->dtype4); fprintf (st, " sim> set %s2 %s\n", ex->dname, ex->dtype4); fprintf (st, " sim> attach %s2 -f vhd %s.vhd\n", ex->dname, ex->dtype4); fprintf (st, " %s2: creating new file\n", ex->dname); fprintf (st, " sim> show %s2\n", ex->dname); fprintf (st, " %s2, %s, attached to %s.vhd, write enabled, %s, autosize, VHD format\n", ex->dname, ex->dsize4, ex->dtype4, ex->dtype4); fprintf (st, " sim> # examine the size consumed by the %s VHD file\n", ex->dsize4); fprintf (st, " sim> dir %s.vhd\n", ex->dtype4); fprintf (st, " Directory of H:\\Data\n\n"); fprintf (st, " 04/14/2011 12:57 PM 5,120 %s.vhd\n", ex->dtype4); fprintf (st, " 1 File(s) 5,120 bytes\n"); fprintf (st, " sim> # create a differencing vhd (%s-1-Diff.vhd) with %s.vhd as parent\n", ex->dtype4, ex->dtype4); fprintf (st, " sim> attach %s3 -d %s-1-Diff.vhd %s.vhd\n", ex->dname, ex->dtype4, ex->dtype4); fprintf (st, " sim> # create a VHD (%s-1.vhd) which is a copy of an existing disk\n", ex->dtype4); fprintf (st, " sim> attach %s3 -c %s-1.vhd %s.vhd\n", ex->dname, ex->dtype4, ex->dtype4); fprintf (st, " %s3: creating new virtual disk '%s-1.vhd'\n", ex->dname, ex->dtype4); fprintf (st, " %s3: Copied %s. 99%% complete.\n", ex->dname, ex->dsize4); fprintf (st, " %s3: Copied %s. Done.\n", ex->dname, ex->dsize4); fprintf (st, " sim> show %s3\n", ex->dname); fprintf (st, " %s3, %s, attached to %s-1.vhd, write enabled, %s, autosize, VHD format\n", ex->dname, ex->dsize4, ex->dtype4, ex->dtype4); fprintf (st, " sim> dir %s*\n", ex->dtype4); fprintf (st, " Directory of H:\\Data\n\n"); fprintf (st, " 04/14/2011 01:12 PM 5,120 %s-1.vhd\n", ex->dtype4); fprintf (st, " 04/14/2011 12:58 PM 5,120 %s.vhd\n", ex->dtype4); fprintf (st, " 2 File(s) 10,240 bytes\n"); fprintf (st, " sim> show %s2\n", ex->dname); fprintf (st, " %s2, %s, not attached, write enabled, %s, autosize, VHD format\n", ex->dname, ex->dsize4, ex->dtype4); fprintf (st, " sim> set %s2 %s\n", ex->dname, ex->dtype3); fprintf (st, " sim> set %s2 noauto\n", ex->dname); fprintf (st, " sim> show %s2\n", ex->dname); fprintf (st, " %s2, %s, not attached, write enabled, %s, noautosize, VHD format\n", ex->dname, ex->dsize3, ex->dtype3); fprintf (st, " sim> set %s2 format=simh\n", ex->dname); fprintf (st, " sim> show %s2\n", ex->dname); fprintf (st, " %s2, %s, not attached, write enabled, %s, noautosize, SIMH format\n", ex->dname, ex->dsize3, ex->dtype3); fprintf (st, " sim> # create a VHD from an existing SIMH format disk\n"); fprintf (st, " sim> attach %s2 -c %s-Copy.vhd XYZZY.dsk\n", ex->dname, ex->dtype3); fprintf (st, " %s2: creating new virtual disk '%s-Copy.vhd'\n", ex->dname, ex->dtype3); fprintf (st, " %s2: Copied %s. 99%% complete.\n", ex->dname, ex->dsize3); fprintf (st, " %s2: Copied %s. Done.\n", ex->dname, ex->dsize3); fprintf (st, " sim> show %s2\n", ex->dname); fprintf (st, " %s2, %s, attached to %s-Copy.vhd, write enabled, %s, noautosize, VHD format\n", ex->dname, ex->dsize3, ex->dtype3, ex->dtype3); return SCPE_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_48B725", "function_addr": 4765477, "binary_name": "1812cddc11d5d37e1bfd4b1269e60e52c00acecac170e6456fc2ba2cddc55918.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_30], rsi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_3C], ecx"], [7, "mov [rbp+var_48], r8"], [8, "mov [rbp+var_8], offset off_4EFC00"], [9, "mov rax, [rbp+var_30]"], [10, "mov rax, [rax]"], [11, "mov esi, offset aRp"], [12, "mov rdi, rax"], [13, "call _strcmp"], [14, "test eax, eax"], [15, "jnz short loc_48B768"], [16, "mov [rbp+var_8], offset off_4EFC48"], [17, "mov esi, offset a10"], [18, "mov edi, offset value"], [19, "call _strstr"], [20, "test rax, rax"], [21, "jz short loc_48B7A3"], [22, "mov [rbp+var_8], offset off_4EFC90"], [23, "mov esi, offset off_4C396C"], [24, "mov edi, offset value"], [25, "call _strstr"], [26, "test rax, rax"], [27, "jnz short loc_48B7A3"], [28, "mov rax, [rbp+var_8]"], [29, "mov qword ptr [rax], offset unk_4C3970"], [30, "mov rax, [rbp+var_30]"], [31, "mov rdx, [rax]"], [32, "mov rax, [rbp+var_28]"], [33, "mov esi, offset aSDiskAttachHel"], [34, "mov rdi, rax"], [35, "mov eax, 0"], [36, "call sub_43F06E"], [37, "mov rax, [rbp+var_28]"], [38, "mov esi, offset aDiskContainerF"], [39, "mov rdi, rax"], [40, "mov eax, 0"], [41, "call sub_43F06E"], [42, "mov esi, offset a10"], [43, "mov edi, offset value"], [44, "call _strstr"], [45, "test rax, rax"], [46, "jnz loc_48B88A"], [47, "mov rax, [rbp+var_28]"], [48, "mov esi, offset aSimhADiskIsAnU"], [49, "mov rdi, rax"], [50, "mov eax, 0"], [51, "call sub_43F06E"], [52, "mov rax, [rbp+var_28]"], [53, "mov esi, offset aForTheDiskDriv"], [54, "mov rdi, rax"], [55, "mov eax, 0"], [56, "call sub_43F06E"], [57, "mov rax, [rbp+var_28]"], [58, "mov esi, offset aVhdVirtualDisk"], [59, "mov rdi, rax"], [60, "mov eax, 0"], [61, "call sub_43F06E"], [62, "mov rax, [rbp+var_28]"], [63, "mov esi, offset aVirtualHardDis_0"], [64, "mov rdi, rax"], [65, "mov eax, 0"], [66, "call sub_43F06E"], [67, "mov rax, [rbp+var_28]"], [68, "mov esi, offset aVhdImplementat"], [69, "mov rdi, rax"], [70, "mov eax, 0"], [71, "call sub_43F06E"], [72, "mov rax, [rbp+var_28]"], [73, "mov esi, offset aDisks2Dynamica"], [74, "mov rdi, rax"], [75, "mov eax, 0"], [76, "call sub_43F06E"], [77, "mov rax, [rbp+var_28]"], [78, "mov esi, offset aRawPlatformSpe"], [79, "mov rdi, rax"], [80, "mov eax, 0"], [81, "call sub_43F06E"], [82, "jmp short loc_48B8F8"], [83, "mov rax, [rbp+var_28]"], [84, "mov esi, offset aSimhADiskIsAnU_0"], [85, "mov rdi, rax"], [86, "mov eax, 0"], [87, "call sub_43F06E"], [88, "mov rax, [rbp+var_28]"], [89, "mov esi, offset aVhdADiskIsAnUn"], [90, "mov rdi, rax"], [91, "mov eax, 0"], [92, "call sub_43F06E"], [93, "mov rax, [rbp+var_28]"], [94, "mov esi, offset aRawADiskIsAnUn"], [95, "mov rdi, rax"], [96, "mov eax, 0"], [97, "call sub_43F06E"], [98, "mov rax, [rbp+var_28]"], [99, "mov esi, offset aDbd9Compatible"], [100, "mov rdi, rax"], [101, "mov eax, 0"], [102, "call sub_43F06E"], [103, "mov rax, [rbp+var_28]"], [104, "mov esi, offset aDld9Compatible"], [105, "mov rdi, rax"], [106, "mov eax, 0"], [107, "call sub_43F06E"], [108, "mov rax, [rbp+var_28]"], [109, "mov esi, offset aVirtualVhdDisk"], [110, "mov rdi, rax"], [111, "mov eax, 0"], [112, "call sub_43F06E"], [113, "mov rax, [rbp+var_28]"], [114, "mov esi, offset aSpecificationV"], [115, "mov rdi, rax"], [116, "mov eax, 0"], [117, "call sub_43F06E"], [118, "mov rax, [rbp+var_28]"], [119, "mov esi, offset aDynamicallyExp"], [120, "mov rdi, rax"], [121, "mov eax, 0"], [122, "call sub_43F06E"], [123, "mov rax, [rbp+var_28]"], [124, "mov esi, offset aConsumeDiskSpa"], [125, "mov rdi, rax"], [126, "mov eax, 0"], [127, "call sub_43F06E"], [128, "mov rax, [rbp+var_28]"], [129, "mov esi, offset aDiskAreActuall"], [130, "mov rdi, rax"], [131, "mov eax, 0"], [132, "call sub_43F06E"], [133, "mov rax, [rbp+var_28]"], [134, "mov esi, offset a30mbOfDataWill"], [135, "mov rdi, rax"], [136, "mov eax, 0"], [137, "call sub_43F06E"], [138, "mov rax, [rbp+var_28]"], [139, "mov esi, offset a2gbAsDifferent"], [140, "mov rdi, rax"], [141, "mov eax, 0"], [142, "call sub_43F06E"], [143, "mov rax, [rbp+var_28]"], [144, "mov esi, offset aWhichDescribes"], [145, "mov rdi, rax"], [146, "mov eax, 0"], [147, "call sub_43F06E"], [148, "mov rax, [rbp+var_28]"], [149, "mov esi, offset aWasCreatedThis"], [150, "mov rdi, rax"], [151, "mov eax, 0"], [152, "call sub_43F06E"], [153, "mov rax, [rbp+var_28]"], [154, "mov esi, offset aAttachedToAnEm"], [155, "mov rdi, rax"], [156, "mov eax, 0"], [157, "call sub_43F06E"], [158, "mov rax, [rbp+var_28]"], [159, "mov esi, offset aSizeCanBeAutom"], [160, "mov rdi, rax"], [161, "mov eax, 0"], [162, "call sub_43F06E"], [163, "mov rax, [rbp+var_30]"], [164, "mov eax, [rax+20h]"], [165, "cmp eax, 1"], [166, "jbe loc_48BBF2"], [167, "mov [rbp+var_10], 0"], [168, "mov [rbp+var_14], 0"], [169, "mov [rbp+var_C], 0"], [170, "jmp short loc_48BA67"], [171, "mov rax, [rbp+var_30]"], [172, "mov rcx, [rax+8]"], [173, "mov edx, [rbp+var_C]"], [174, "mov rax, rdx"], [175, "shl rax, 5"], [176, "add rax, rdx"], [177, "shl rax, 3"], [178, "add rax, rcx"], [179, "mov eax, [rax+38h]"], [180, "and eax, 1"], [181, "test eax, eax"], [182, "jz short loc_48BA63"], [183, "mov rax, [rbp+var_30]"], [184, "mov rcx, [rax+8]"], [185, "mov edx, [rbp+var_C]"], [186, "mov rax, rdx"], [187, "shl rax, 5"], [188, "add rax, rdx"], [189, "shl rax, 3"], [190, "add rax, rcx"], [191, "mov eax, [rax+38h]"], [192, "and eax, 800h"], [193, "test eax, eax"], [194, "jnz short loc_48BA63"], [195, "add [rbp+var_10], 1"], [196, "add [rbp+var_C], 1"], [197, "mov rax, [rbp+var_30]"], [198, "mov eax, [rax+20h]"], [199, "cmp [rbp+var_C], eax"], [200, "jb short loc_48BA11"], [201, "mov [rbp+var_C], 0"], [202, "jmp short loc_48BAF2"], [203, "mov rax, [rbp+var_30]"], [204, "mov rcx, [rax+8]"], [205, "mov edx, [rbp+var_C]"], [206, "mov rax, rdx"], [207, "shl rax, 5"], [208, "add rax, rdx"], [209, "shl rax, 3"], [210, "add rax, rcx"], [211, "mov eax, [rax+38h]"], [212, "and eax, 1"], [213, "test eax, eax"], [214, "jz short loc_48BAEE"], [215, "mov rax, [rbp+var_30]"], [216, "mov rcx, [rax+8]"], [217, "mov edx, [rbp+var_C]"], [218, "mov rax, rdx"], [219, "shl rax, 5"], [220, "add rax, rdx"], [221, "shl rax, 3"], [222, "add rax, rcx"], [223, "mov eax, [rax+38h]"], [224, "and eax, 800h"], [225, "test eax, eax"], [226, "jnz short loc_48BAEE"], [227, "mov rax, [rbp+var_30]"], [228, "mov rdx, [rax]"], [229, "mov ecx, [rbp+var_C]"], [230, "mov rax, [rbp+var_28]"], [231, "mov esi, offset aSimAttachSwitc_1"], [232, "mov rdi, rax"], [233, "mov eax, 0"], [234, "call sub_43F06E"], [235, "add [rbp+var_14], 1"], [236, "add [rbp+var_C], 1"], [237, "mov rax, [rbp+var_30]"], [238, "mov eax, [rax+20h]"], [239, "cmp [rbp+var_C], eax"], [240, "jnb short loc_48BB08"], [241, "cmp [rbp+var_14], 1"], [242, "jbe loc_48BA7C"], [243, "cmp [rbp+var_10], 4"], [244, "jbe short loc_48BB50"], [245, "mov rax, [rbp+var_28]"], [246, "mov esi, offset asc_4C4120"], [247, "mov rdi, rax"], [248, "mov eax, 0"], [249, "call sub_43F06E"], [250, "mov rax, [rbp+var_28]"], [251, "mov esi, offset asc_4C4120"], [252, "mov rdi, rax"], [253, "mov eax, 0"], [254, "call sub_43F06E"], [255, "mov rax, [rbp+var_28]"], [256, "mov esi, offset asc_4C4120"], [257, "mov rdi, rax"], [258, "mov eax, 0"], [259, "call sub_43F06E"], [260, "mov eax, [rbp+var_10]"], [261, "sub eax, 2"], [262, "mov [rbp+var_18], eax"], [263, "mov [rbp+var_C], 0"], [264, "jmp short loc_48BBE0"], [265, "mov rax, [rbp+var_30]"], [266, "mov rcx, [rax+8]"], [267, "mov edx, [rbp+var_C]"], [268, "mov rax, rdx"], [269, "shl rax, 5"], [270, "add rax, rdx"], [271, "shl rax, 3"], [272, "add rax, rcx"], [273, "mov eax, [rax+38h]"], [274, "and eax, 1"], [275, "test eax, eax"], [276, "jz short loc_48BBDC"], [277, "mov rax, [rbp+var_30]"], [278, "mov rcx, [rax+8]"], [279, "mov edx, [rbp+var_C]"], [280, "mov rax, rdx"], [281, "shl rax, 5"], [282, "add rax, rdx"], [283, "shl rax, 3"], [284, "add rax, rcx"], [285, "mov eax, [rax+38h]"], [286, "and eax, 800h"], [287, "test eax, eax"], [288, "jnz short loc_48BBDC"], [289, "cmp [rbp+var_18], 0"], [290, "jnz short loc_48BBD8"], [291, "mov rax, [rbp+var_30]"], [292, "mov rdx, [rax]"], [293, "mov ecx, [rbp+var_C]"], [294, "mov rax, [rbp+var_28]"], [295, "mov esi, offset aSimAttachSwitc_1"], [296, "mov rdi, rax"], [297, "mov eax, 0"], [298, "call sub_43F06E"], [299, "jmp short loc_48BBDC"], [300, "sub [rbp+var_18], 1"], [301, "add [rbp+var_C], 1"], [302, "mov rax, [rbp+var_30]"], [303, "mov eax, [rax+20h]"], [304, "cmp [rbp+var_C], eax"], [305, "jb loc_48BB62"], [306, "jmp short loc_48BC0F"], [307, "mov rax, [rbp+var_30]"], [308, "mov rdx, [rax]"], [309, "mov rax, [rbp+var_28]"], [310, "mov esi, offset aSimAttachSwitc_2"], [311, "mov rdi, rax"], [312, "mov eax, 0"], [313, "call sub_43F06E"], [314, "mov rax, [rbp+var_30]"], [315, "mov rdx, [rax]"], [316, "mov rax, [rbp+var_28]"], [317, "mov esi, offset aSAttachCommand"], [318, "mov rdi, rax"], [319, "mov eax, 0"], [320, "call sub_43F06E"], [321, "mov rax, [rbp+var_28]"], [322, "mov esi, offset aRAttachReadOnl_0"], [323, "mov rdi, rax"], [324, "mov eax, 0"], [325, "call sub_43F06E"], [326, "mov rax, [rbp+var_28]"], [327, "mov esi, offset aEMustExistIfNo_0"], [328, "mov rdi, rax"], [329, "mov eax, 0"], [330, "call sub_43F06E"], [331, "mov rax, [rbp+var_28]"], [332, "mov esi, offset aDiskContainerW"], [333, "mov rdi, rax"], [334, "mov eax, 0"], [335, "call sub_43F06E"], [336, "mov rax, [rbp+var_28]"], [337, "mov esi, offset aFOpenTheIndica_0"], [338, "mov rdi, rax"], [339, "mov eax, 0"], [340, "call sub_43F06E"], [341, "mov rax, [rbp+var_28]"], [342, "mov esi, offset aIsToAutodetect"], [343, "mov rdi, rax"], [344, "mov eax, 0"], [345, "call sub_43F06E"], [346, "mov rax, [rbp+var_28]"], [347, "mov esi, offset aContainerIsNot"], [348, "mov rdi, rax"], [349, "mov eax, 0"], [350, "call sub_43F06E"], [351, "mov rax, [rbp+var_28]"], [352, "mov esi, offset aIInitializeNew"], [353, "mov rdi, rax"], [354, "mov eax, 0"], [355, "call sub_43F06E"], [356, "mov rax, [rbp+var_28]"], [357, "mov esi, offset aSectorAddress"], [358, "mov rdi, rax"], [359, "mov eax, 0"], [360, "call sub_43F06E"], [361, "mov rax, [rbp+var_28]"], [362, "mov esi, offset aKVerifyThatThe"], [363, "mov rdi, rax"], [364, "mov eax, 0"], [365, "call sub_43F06E"], [366, "mov rax, [rbp+var_28]"], [367, "mov esi, offset aSectorWholeDis"], [368, "mov rdi, rax"], [369, "mov eax, 0"], [370, "call sub_43F06E"], [371, "mov rax, [rbp+var_28]"], [372, "mov esi, offset aCheckedWhenWri"], [373, "mov rdi, rax"], [374, "mov eax, 0"], [375, "call sub_43F06E"], [376, "mov rax, [rbp+var_28]"], [377, "mov esi, offset aCCreateADiskCo"], [378, "mov rdi, rax"], [379, "mov eax, 0"], [380, "call sub_43F06E"], [381, "mov rax, [rbp+var_28]"], [382, "mov esi, offset aSimhVhdOrRawFo"], [383, "mov rdi, rax"], [384, "mov eax, 0"], [385, "call sub_43F06E"], [386, "mov rax, [rbp+var_28]"], [387, "mov esi, offset aContainerForma"], [388, "mov rdi, rax"], [389, "mov eax, 0"], [390, "call sub_43F06E"], [391, "mov rax, [rbp+var_28]"], [392, "mov esi, offset aAutoOrVhdWillC"], [393, "mov rdi, rax"], [394, "mov eax, 0"], [395, "call sub_43F06E"], [396, "mov rax, [rbp+var_28]"], [397, "mov esi, offset aSimhContainerA"], [398, "mov rdi, rax"], [399, "mov eax, 0"], [400, "call sub_43F06E"], [401, "mov rax, [rbp+var_28]"], [402, "mov esi, offset aNoteACopyWillB"], [403, "mov rdi, rax"], [404, "mov eax, 0"], [405, "call sub_43F06E"], [406, "mov rax, [rbp+var_28]"], [407, "mov esi, offset aContainersCopy"], [408, "mov rdi, rax"], [409, "mov eax, 0"], [410, "call sub_43F06E"], [411, "mov rax, [rbp+var_28]"], [412, "mov esi, offset aOneWillProduce"], [413, "mov rdi, rax"], [414, "mov eax, 0"], [415, "call sub_43F06E"], [416, "mov rax, [rbp+var_28]"], [417, "mov esi, offset aVPerformAVerif"], [418, "mov rdi, rax"], [419, "mov eax, 0"], [420, "call sub_43F06E"], [421, "mov rax, [rbp+var_28]"], [422, "mov esi, offset aOperation"], [423, "mov rdi, rax"], [424, "mov eax, 0"], [425, "call sub_43F06E"], [426, "mov rax, [rbp+var_28]"], [427, "mov esi, offset aXWhenCreatingA"], [428, "mov rdi, rax"], [429, "mov eax, 0"], [430, "call sub_43F06E"], [431, "mov rax, [rbp+var_28]"], [432, "mov esi, offset aExpandingOne"], [433, "mov rdi, rax"], [434, "mov eax, 0"], [435, "call sub_43F06E"], [436, "mov rax, [rbp+var_28]"], [437, "mov esi, offset aDCreateADiffer"], [438, "mov rdi, rax"], [439, "mov eax, 0"], [440, "call sub_43F06E"], [441, "mov rax, [rbp+var_28]"], [442, "mov esi, offset aDisk"], [443, "mov rdi, rax"], [444, "mov eax, 0"], [445, "call sub_43F06E"], [446, "mov rax, [rbp+var_28]"], [447, "mov esi, offset aMMergeADiffere"], [448, "mov rdi, rax"], [449, "mov eax, 0"], [450, "call sub_43F06E"], [451, "mov rax, [rbp+var_28]"], [452, "mov esi, offset aOOverrideConsi"], [453, "mov rdi, rax"], [454, "mov eax, 0"], [455, "call sub_43F06E"], [456, "mov rax, [rbp+var_28]"], [457, "mov esi, offset aWhichHaveUnexp"], [458, "mov rdi, rax"], [459, "mov eax, 0"], [460, "call sub_43F06E"], [461, "mov rax, [rbp+var_28]"], [462, "mov esi, offset aUFixInconsiste"], [463, "mov rdi, rax"], [464, "mov eax, 0"], [465, "call sub_43F06E"], [466, "mov esi, offset a10"], [467, "mov edi, offset value"], [468, "call _strstr"], [469, "test rax, rax"], [470, "jnz short loc_48BEEA"], [471, "mov rax, [rbp+var_28]"], [472, "mov esi, offset aYAnswerYesToPr"], [473, "mov rdi, rax"], [474, "mov eax, 0"], [475, "call sub_43F06E"], [476, "mov rax, [rbp+var_28]"], [477, "mov esi, offset aNAnswerNoToPro"], [478, "mov rdi, rax"], [479, "mov eax, 0"], [480, "call sub_43F06E"], [481, "mov rax, [rbp+var_28]"], [482, "mov esi, offset aExamples_0"], [483, "mov rdi, rax"], [484, "mov eax, 0"], [485, "call sub_43F06E"], [486, "mov rax, [rbp+var_8]"], [487, "mov rdx, [rax]"], [488, "mov rax, [rbp+var_28]"], [489, "mov esi, offset aSimShowS"], [490, "mov rdi, rax"], [491, "mov eax, 0"], [492, "call sub_43F06E"], [493, "mov rax, [rbp+var_8]"], [494, "mov rdx, [rax]"], [495, "mov rax, [rbp+var_28]"], [496, "mov esi, offset aSAddress200014"], [497, "mov rdi, rax"], [498, "mov eax, 0"], [499, "call sub_43F06E"], [500, "mov rax, [rbp+var_8]"], [501, "mov rsi, [rax+8]"], [502, "mov rax, [rbp+var_8]"], [503, "mov rcx, [rax+10h]"], [504, "mov rax, [rbp+var_8]"], [505, "mov rdx, [rax]"], [506, "mov rax, [rbp+var_28]"], [507, "mov r8, rsi"], [508, "mov esi, offset aS0SNotAttached"], [509, "mov rdi, rax"], [510, "mov eax, 0"], [511, "call sub_43F06E"], [512, "mov rax, [rbp+var_8]"], [513, "mov rsi, [rax+8]"], [514, "mov rax, [rbp+var_8]"], [515, "mov rcx, [rax+10h]"], [516, "mov rax, [rbp+var_8]"], [517, "mov rdx, [rax]"], [518, "mov rax, [rbp+var_28]"], [519, "mov r8, rsi"], [520, "mov esi, offset aS1SNotAttached"], [521, "mov rdi, rax"], [522, "mov eax, 0"], [523, "call sub_43F06E"], [524, "mov rax, [rbp+var_8]"], [525, "mov rsi, [rax+8]"], [526, "mov rax, [rbp+var_8]"], [527, "mov rcx, [rax+10h]"], [528, "mov rax, [rbp+var_8]"], [529, "mov rdx, [rax]"], [530, "mov rax, [rbp+var_28]"], [531, "mov r8, rsi"], [532, "mov esi, offset aS2SNotAttached"], [533, "mov rdi, rax"], [534, "mov eax, 0"], [535, "call sub_43F06E"], [536, "mov rax, [rbp+var_8]"], [537, "mov rsi, [rax+18h]"], [538, "mov rax, [rbp+var_8]"], [539, "mov rcx, [rax+20h]"], [540, "mov rax, [rbp+var_8]"], [541, "mov rdx, [rax]"], [542, "mov rax, [rbp+var_28]"], [543, "mov r8, rsi"], [544, "mov esi, offset aS3SNotAttached"], [545, "mov rdi, rax"], [546, "mov eax, 0"], [547, "call sub_43F06E"], [548, "mov rax, [rbp+var_28]"], [549, "mov esi, offset aSimAttachAnExi"], [550, "mov rdi, rax"], [551, "mov eax, 0"], [552, "call sub_43F06E"], [553, "mov rax, [rbp+var_8]"], [554, "mov rcx, [rax+28h]"], [555, "mov rax, [rbp+var_8]"], [556, "mov rdx, [rax]"], [557, "mov rax, [rbp+var_28]"], [558, "mov esi, offset aSimAttachS0SVh"], [559, "mov rdi, rax"], [560, "mov eax, 0"], [561, "call sub_43F06E"], [562, "mov rax, [rbp+var_8]"], [563, "mov rdx, [rax]"], [564, "mov rax, [rbp+var_28]"], [565, "mov esi, offset aSimShowS0"], [566, "mov rdi, rax"], [567, "mov eax, 0"], [568, "call sub_43F06E"], [569, "mov rax, [rbp+var_8]"], [570, "mov rdi, [rax+28h]"], [571, "mov rax, [rbp+var_8]"], [572, "mov rsi, [rax+28h]"], [573, "mov rax, [rbp+var_8]"], [574, "mov rcx, [rax+30h]"], [575, "mov rax, [rbp+var_8]"], [576, "mov rdx, [rax]"], [577, "mov rax, [rbp+var_28]"], [578, "mov r9, rdi"], [579, "mov r8, rsi"], [580, "mov esi, offset unk_4C4C00"], [581, "mov rdi, rax"], [582, "mov eax, 0"], [583, "call sub_43F06E"], [584, "mov rax, [rbp+var_8]"], [585, "mov rdx, [rax+38h]"], [586, "mov rax, [rbp+var_28]"], [587, "mov esi, offset aSimCreateANewS"], [588, "mov rdi, rax"], [589, "mov eax, 0"], [590, "call sub_43F06E"], [591, "mov rax, [rbp+var_8]"], [592, "mov rcx, [rax+38h]"], [593, "mov rax, [rbp+var_8]"], [594, "mov rdx, [rax]"], [595, "mov rax, [rbp+var_28]"], [596, "mov esi, offset aSimSetS2S"], [597, "mov rdi, rax"], [598, "mov eax, 0"], [599, "call sub_43F06E"], [600, "mov rax, [rbp+var_8]"], [601, "mov rcx, [rax+38h]"], [602, "mov rax, [rbp+var_8]"], [603, "mov rdx, [rax]"], [604, "mov rax, [rbp+var_28]"], [605, "mov esi, offset aSimAttachS2FVh"], [606, "mov rdi, rax"], [607, "mov eax, 0"], [608, "call sub_43F06E"], [609, "mov rax, [rbp+var_8]"], [610, "mov rdx, [rax]"], [611, "mov rax, [rbp+var_28]"], [612, "mov esi, offset aS2CreatingNewF"], [613, "mov rdi, rax"], [614, "mov eax, 0"], [615, "call sub_43F06E"], [616, "mov rax, [rbp+var_8]"], [617, "mov rdx, [rax]"], [618, "mov rax, [rbp+var_28]"], [619, "mov esi, offset aSimShowS2"], [620, "mov rdi, rax"], [621, "mov eax, 0"], [622, "call sub_43F06E"], [623, "mov rax, [rbp+var_8]"], [624, "mov rdi, [rax+38h]"], [625, "mov rax, [rbp+var_8]"], [626, "mov rsi, [rax+38h]"], [627, "mov rax, [rbp+var_8]"], [628, "mov rcx, [rax+40h]"], [629, "mov rax, [rbp+var_8]"], [630, "mov rdx, [rax]"], [631, "mov rax, [rbp+var_28]"], [632, "mov r9, rdi"], [633, "mov r8, rsi"], [634, "mov esi, offset aS2SAttachedToS"], [635, "mov rdi, rax"], [636, "mov eax, 0"], [637, "call sub_43F06E"], [638, "mov rax, [rbp+var_8]"], [639, "mov rdx, [rax+40h]"], [640, "mov rax, [rbp+var_28]"], [641, "mov esi, offset aSimExamineTheS"], [642, "mov rdi, rax"], [643, "mov eax, 0"], [644, "call sub_43F06E"], [645, "mov rax, [rbp+var_8]"], [646, "mov rdx, [rax+38h]"], [647, "mov rax, [rbp+var_28]"], [648, "mov esi, offset aSimDirSVhd"], [649, "mov rdi, rax"], [650, "mov eax, 0"], [651, "call sub_43F06E"], [652, "mov rax, [rbp+var_28]"], [653, "mov esi, offset aDirectoryOfHDa"], [654, "mov rdi, rax"], [655, "mov eax, 0"], [656, "call sub_43F06E"], [657, "mov rax, [rbp+var_8]"], [658, "mov rdx, [rax+38h]"], [659, "mov rax, [rbp+var_28]"], [660, "mov esi, offset a041420111257Pm"], [661, "mov rdi, rax"], [662, "mov eax, 0"], [663, "call sub_43F06E"], [664, "mov rax, [rbp+var_28]"], [665, "mov esi, offset a1FileS5120Byte"], [666, "mov rdi, rax"], [667, "mov eax, 0"], [668, "call sub_43F06E"], [669, "mov rax, [rbp+var_8]"], [670, "mov rcx, [rax+38h]"], [671, "mov rax, [rbp+var_8]"], [672, "mov rdx, [rax+38h]"], [673, "mov rax, [rbp+var_28]"], [674, "mov esi, offset aSimCreateADiff"], [675, "mov rdi, rax"], [676, "mov eax, 0"], [677, "call sub_43F06E"], [678, "mov rax, [rbp+var_8]"], [679, "mov rsi, [rax+38h]"], [680, "mov rax, [rbp+var_8]"], [681, "mov rcx, [rax+38h]"], [682, "mov rax, [rbp+var_8]"], [683, "mov rdx, [rax]"], [684, "mov rax, [rbp+var_28]"], [685, "mov r8, rsi"], [686, "mov esi, offset aSimAttachS3DS1"], [687, "mov rdi, rax"], [688, "mov eax, 0"], [689, "call sub_43F06E"], [690, "mov rax, [rbp+var_8]"], [691, "mov rdx, [rax+38h]"], [692, "mov rax, [rbp+var_28]"], [693, "mov esi, offset aSimCreateAVhdS"], [694, "mov rdi, rax"], [695, "mov eax, 0"], [696, "call sub_43F06E"], [697, "mov rax, [rbp+var_8]"], [698, "mov rsi, [rax+38h]"], [699, "mov rax, [rbp+var_8]"], [700, "mov rcx, [rax+38h]"], [701, "mov rax, [rbp+var_8]"], [702, "mov rdx, [rax]"], [703, "mov rax, [rbp+var_28]"], [704, "mov r8, rsi"], [705, "mov esi, offset aSimAttachS3CS1"], [706, "mov rdi, rax"], [707, "mov eax, 0"], [708, "call sub_43F06E"], [709, "mov rax, [rbp+var_8]"], [710, "mov rcx, [rax+38h]"], [711, "mov rax, [rbp+var_8]"], [712, "mov rdx, [rax]"], [713, "mov rax, [rbp+var_28]"], [714, "mov esi, offset aS3CreatingNewV"], [715, "mov rdi, rax"], [716, "mov eax, 0"], [717, "call sub_43F06E"], [718, "mov rax, [rbp+var_8]"], [719, "mov rcx, [rax+40h]"], [720, "mov rax, [rbp+var_8]"], [721, "mov rdx, [rax]"], [722, "mov rax, [rbp+var_28]"], [723, "mov esi, offset aS3CopiedS99Com"], [724, "mov rdi, rax"], [725, "mov eax, 0"], [726, "call sub_43F06E"], [727, "mov rax, [rbp+var_8]"], [728, "mov rcx, [rax+40h]"], [729, "mov rax, [rbp+var_8]"], [730, "mov rdx, [rax]"], [731, "mov rax, [rbp+var_28]"], [732, "mov esi, offset aS3CopiedSDone"], [733, "mov rdi, rax"], [734, "mov eax, 0"], [735, "call sub_43F06E"], [736, "mov rax, [rbp+var_8]"], [737, "mov rdx, [rax]"], [738, "mov rax, [rbp+var_28]"], [739, "mov esi, offset aSimShowS3"], [740, "mov rdi, rax"], [741, "mov eax, 0"], [742, "call sub_43F06E"], [743, "mov rax, [rbp+var_8]"], [744, "mov rdi, [rax+38h]"], [745, "mov rax, [rbp+var_8]"], [746, "mov rsi, [rax+38h]"], [747, "mov rax, [rbp+var_8]"], [748, "mov rcx, [rax+40h]"], [749, "mov rax, [rbp+var_8]"], [750, "mov rdx, [rax]"], [751, "mov rax, [rbp+var_28]"], [752, "mov r9, rdi"], [753, "mov r8, rsi"], [754, "mov esi, offset aS3SAttachedToS"], [755, "mov rdi, rax"], [756, "mov eax, 0"], [757, "call sub_43F06E"], [758, "mov rax, [rbp+var_8]"], [759, "mov rdx, [rax+38h]"], [760, "mov rax, [rbp+var_28]"], [761, "mov esi, offset aSimDirS"], [762, "mov rdi, rax"], [763, "mov eax, 0"], [764, "call sub_43F06E"], [765, "mov rax, [rbp+var_28]"], [766, "mov esi, offset aDirectoryOfHDa"], [767, "mov rdi, rax"], [768, "mov eax, 0"], [769, "call sub_43F06E"], [770, "mov rax, [rbp+var_8]"], [771, "mov rdx, [rax+38h]"], [772, "mov rax, [rbp+var_28]"], [773, "mov esi, offset a041420110112Pm"], [774, "mov rdi, rax"], [775, "mov eax, 0"], [776, "call sub_43F06E"], [777, "mov rax, [rbp+var_8]"], [778, "mov rdx, [rax+38h]"], [779, "mov rax, [rbp+var_28]"], [780, "mov esi, offset a041420111258Pm"], [781, "mov rdi, rax"], [782, "mov eax, 0"], [783, "call sub_43F06E"], [784, "mov rax, [rbp+var_28]"], [785, "mov esi, offset a2FileS10240Byt"], [786, "mov rdi, rax"], [787, "mov eax, 0"], [788, "call sub_43F06E"], [789, "mov rax, [rbp+var_8]"], [790, "mov rdx, [rax]"], [791, "mov rax, [rbp+var_28]"], [792, "mov esi, offset aSimShowS2"], [793, "mov rdi, rax"], [794, "mov eax, 0"], [795, "call sub_43F06E"], [796, "mov rax, [rbp+var_8]"], [797, "mov rsi, [rax+38h]"], [798, "mov rax, [rbp+var_8]"], [799, "mov rcx, [rax+40h]"], [800, "mov rax, [rbp+var_8]"], [801, "mov rdx, [rax]"], [802, "mov rax, [rbp+var_28]"], [803, "mov r8, rsi"], [804, "mov esi, offset aS2SNotAttached_0"], [805, "mov rdi, rax"], [806, "mov eax, 0"], [807, "call sub_43F06E"], [808, "mov rax, [rbp+var_8]"], [809, "mov rcx, [rax+28h]"], [810, "mov rax, [rbp+var_8]"], [811, "mov rdx, [rax]"], [812, "mov rax, [rbp+var_28]"], [813, "mov esi, offset aSimSetS2S"], [814, "mov rdi, rax"], [815, "mov eax, 0"], [816, "call sub_43F06E"], [817, "mov rax, [rbp+var_8]"], [818, "mov rdx, [rax]"], [819, "mov rax, [rbp+var_28]"], [820, "mov esi, offset aSimSetS2Noauto"], [821, "mov rdi, rax"], [822, "mov eax, 0"], [823, "call sub_43F06E"], [824, "mov rax, [rbp+var_8]"], [825, "mov rdx, [rax]"], [826, "mov rax, [rbp+var_28]"], [827, "mov esi, offset aSimShowS2"], [828, "mov rdi, rax"], [829, "mov eax, 0"], [830, "call sub_43F06E"], [831, "mov rax, [rbp+var_8]"], [832, "mov rsi, [rax+28h]"], [833, "mov rax, [rbp+var_8]"], [834, "mov rcx, [rax+30h]"], [835, "mov rax, [rbp+var_8]"], [836, "mov rdx, [rax]"], [837, "mov rax, [rbp+var_28]"], [838, "mov r8, rsi"], [839, "mov esi, offset aS2SNotAttached_1"], [840, "mov rdi, rax"], [841, "mov eax, 0"], [842, "call sub_43F06E"], [843, "mov rax, [rbp+var_8]"], [844, "mov rdx, [rax]"], [845, "mov rax, [rbp+var_28]"], [846, "mov esi, offset aSimSetS2Format"], [847, "mov rdi, rax"], [848, "mov eax, 0"], [849, "call sub_43F06E"], [850, "mov rax, [rbp+var_8]"], [851, "mov rdx, [rax]"], [852, "mov rax, [rbp+var_28]"], [853, "mov esi, offset aSimShowS2"], [854, "mov rdi, rax"], [855, "mov eax, 0"], [856, "call sub_43F06E"], [857, "mov rax, [rbp+var_8]"], [858, "mov rsi, [rax+28h]"], [859, "mov rax, [rbp+var_8]"], [860, "mov rcx, [rax+30h]"], [861, "mov rax, [rbp+var_8]"], [862, "mov rdx, [rax]"], [863, "mov rax, [rbp+var_28]"], [864, "mov r8, rsi"], [865, "mov esi, offset aS2SNotAttached_2"], [866, "mov rdi, rax"], [867, "mov eax, 0"], [868, "call sub_43F06E"], [869, "mov rax, [rbp+var_28]"], [870, "mov esi, offset aSimCreateAVhdF"], [871, "mov rdi, rax"], [872, "mov eax, 0"], [873, "call sub_43F06E"], [874, "mov rax, [rbp+var_8]"], [875, "mov rcx, [rax+28h]"], [876, "mov rax, [rbp+var_8]"], [877, "mov rdx, [rax]"], [878, "mov rax, [rbp+var_28]"], [879, "mov esi, offset aSimAttachS2CSC"], [880, "mov rdi, rax"], [881, "mov eax, 0"], [882, "call sub_43F06E"], [883, "mov rax, [rbp+var_8]"], [884, "mov rcx, [rax+28h]"], [885, "mov rax, [rbp+var_8]"], [886, "mov rdx, [rax]"], [887, "mov rax, [rbp+var_28]"], [888, "mov esi, offset aS2CreatingNewV"], [889, "mov rdi, rax"], [890, "mov eax, 0"], [891, "call sub_43F06E"], [892, "mov rax, [rbp+var_8]"], [893, "mov rcx, [rax+30h]"], [894, "mov rax, [rbp+var_8]"], [895, "mov rdx, [rax]"], [896, "mov rax, [rbp+var_28]"], [897, "mov esi, offset aS2CopiedS99Com"], [898, "mov rdi, rax"], [899, "mov eax, 0"], [900, "call sub_43F06E"], [901, "mov rax, [rbp+var_8]"], [902, "mov rcx, [rax+30h]"], [903, "mov rax, [rbp+var_8]"], [904, "mov rdx, [rax]"], [905, "mov rax, [rbp+var_28]"], [906, "mov esi, offset aS2CopiedSDone"], [907, "mov rdi, rax"], [908, "mov eax, 0"], [909, "call sub_43F06E"], [910, "mov rax, [rbp+var_8]"], [911, "mov rdx, [rax]"], [912, "mov rax, [rbp+var_28]"], [913, "mov esi, offset aSimShowS2"], [914, "mov rdi, rax"], [915, "mov eax, 0"], [916, "call sub_43F06E"], [917, "mov rax, [rbp+var_8]"], [918, "mov rdi, [rax+28h]"], [919, "mov rax, [rbp+var_8]"], [920, "mov rsi, [rax+28h]"], [921, "mov rax, [rbp+var_8]"], [922, "mov rcx, [rax+30h]"], [923, "mov rax, [rbp+var_8]"], [924, "mov rdx, [rax]"], [925, "mov rax, [rbp+var_28]"], [926, "mov r9, rdi"], [927, "mov r8, rsi"], [928, "mov esi, offset aS2SAttachedToS_0"], [929, "mov rdi, rax"], [930, "mov eax, 0"], [931, "call sub_43F06E"], [932, "mov eax, 0"], [933, "leave"], [934, "retn"]], "data_dep": [[9, 4], [10, 9], [12, 10], [14, 13], [15, 14], [20, 19], [21, 20], [26, 25], [27, 26], [28, 22], [29, 28], [30, 4], [31, 29], [31, 30], [32, 3], [34, 32], [37, 3], [39, 37], [45, 44], [46, 45], [47, 3], [49, 47], [52, 3], [54, 52], [57, 3], [59, 57], [62, 3], [64, 62], [67, 3], [69, 67], [72, 3], [74, 72], [77, 3], [79, 77], [83, 3], [85, 83], [88, 3], [90, 88], [93, 3], [95, 93], [98, 3], [100, 98], [103, 3], [105, 103], [108, 3], [110, 108], [113, 3], [115, 113], [118, 3], [120, 118], [123, 3], [125, 123], [128, 3], [130, 128], [133, 3], [135, 133], [138, 3], [140, 138], [143, 3], [145, 143], [148, 3], [150, 148], [153, 3], [155, 153], [158, 3], [160, 158], [163, 4], [164, 163], [164, 29], [165, 164], [166, 165], [171, 4], [172, 171], [172, 29], [173, 169], [173, 196], [174, 173], [175, 174], [176, 175], [176, 173], [177, 176], [178, 177], [178, 172], [179, 178], [179, 29], [180, 179], [181, 180], [182, 181], [183, 4], [184, 183], [184, 29], [185, 169], [185, 196], [186, 185], [187, 186], [188, 187], [188, 185], [189, 188], [190, 189], [190, 184], [191, 190], [191, 29], [192, 191], [193, 192], [194, 193], [195, 195], [195, 167], [196, 169], [196, 196], [197, 4], [198, 197], [198, 29], [199, 196], [199, 198], [199, 169], [200, 199], [203, 4], [204, 203], [204, 29], [205, 201], [205, 236], [206, 205], [207, 206], [208, 205], [208, 207], [209, 208], [210, 209], [210, 204], [211, 29], [211, 210], [212, 211], [213, 212], [214, 213], [215, 4], [216, 29], [216, 215], [217, 201], [217, 236], [218, 217], [219, 218], [220, 217], [220, 219], [221, 220], [222, 221], [222, 216], [223, 222], [223, 29], [224, 223], [225, 224], [226, 225], [227, 4], [228, 29], [228, 227], [229, 236], [229, 201], [230, 3], [232, 230], [235, 235], [235, 168], [236, 201], [236, 236], [237, 4], [238, 29], [238, 237], [239, 236], [239, 201], [239, 238], [240, 239], [241, 168], [241, 235], [242, 241], [243, 195], [243, 167], [244, 243], [245, 3], [247, 245], [250, 3], [252, 250], [255, 3], [257, 255], [260, 195], [260, 167], [261, 260], [262, 261], [265, 4], [266, 29], [266, 265], [267, 301], [267, 263], [268, 267], [269, 268], [270, 269], [270, 267], [271, 270], [272, 271], [272, 266], [273, 272], [273, 29], [274, 273], [275, 274], [276, 275], [277, 4], [278, 277], [278, 29], [279, 301], [279, 263], [280, 279], [281, 280], [282, 279], [282, 281], [283, 282], [284, 283], [284, 278], [285, 29], [285, 284], [286, 285], [287, 286], [288, 287], [289, 300], [289, 262], [290, 289], [291, 4], [292, 291], [292, 29], [293, 301], [293, 263], [294, 3], [296, 294], [300, 300], [300, 262], [301, 301], [301, 263], [302, 4], [303, 302], [303, 29], [304, 263], [304, 303], [304, 301], [305, 304], [307, 4], [308, 29], [308, 307], [309, 3], [311, 309], [314, 4], [315, 29], [315, 314], [316, 3], [318, 316], [321, 3], [323, 321], [326, 3], [328, 326], [331, 3], [333, 331], [336, 3], [338, 336], [341, 3], [343, 341], [346, 3], [348, 346], [351, 3], [353, 351], [356, 3], [358, 356], [361, 3], [363, 361], [366, 3], [368, 366], [371, 3], [373, 371], [376, 3], [378, 376], [381, 3], [383, 381], [386, 3], [388, 386], [391, 3], [393, 391], [396, 3], [398, 396], [401, 3], [403, 401], [406, 3], [408, 406], [411, 3], [413, 411], [416, 3], [418, 416], [421, 3], [423, 421], [426, 3], [428, 426], [431, 3], [433, 431], [436, 3], [438, 436], [441, 3], [443, 441], [446, 3], [448, 446], [451, 3], [453, 451], [456, 3], [458, 456], [461, 3], [463, 461], [469, 468], [470, 469], [471, 3], [473, 471], [476, 3], [478, 476], [481, 3], [483, 481], [486, 22], [486, 8], [486, 16], [487, 486], [487, 29], [488, 3], [490, 488], [493, 22], [493, 8], [493, 16], [494, 493], [494, 29], [495, 3], [497, 495], [500, 16], [500, 22], [500, 8], [501, 500], [501, 29], [502, 22], [502, 8], [502, 16], [503, 29], [503, 502], [504, 22], [504, 8], [504, 16], [505, 504], [505, 29], [506, 3], [507, 501], [509, 506], [512, 22], [512, 8], [512, 16], [513, 512], [513, 29], [514, 16], [514, 22], [514, 8], [515, 514], [515, 29], [516, 22], [516, 8], [516, 16], [517, 29], [517, 516], [518, 3], [519, 513], [521, 518], [524, 22], [524, 8], [524, 16], [525, 29], [525, 524], [526, 22], [526, 8], [526, 16], [527, 29], [527, 526], [528, 16], [528, 22], [528, 8], [529, 528], [529, 29], [530, 3], [531, 525], [533, 530], [536, 22], [536, 8], [536, 16], [537, 29], [537, 536], [538, 22], [538, 8], [538, 16], [539, 538], [539, 29], [540, 22], [540, 8], [540, 16], [541, 29], [541, 540], [542, 3], [543, 537], [545, 542], [548, 3], [550, 548], [553, 22], [553, 8], [553, 16], [554, 553], [554, 29], [555, 16], [555, 22], [555, 8], [556, 555], [556, 29], [557, 3], [559, 557], [562, 22], [562, 8], [562, 16], [563, 29], [563, 562], [564, 3], [566, 564], [569, 8], [569, 16], [569, 22], [570, 569], [570, 29], [571, 22], [571, 8], [571, 16], [572, 571], [572, 29], [573, 22], [573, 8], [573, 16], [574, 573], [574, 29], [575, 22], [575, 8], [575, 16], [576, 29], [576, 575], [577, 3], [578, 570], [579, 572], [581, 577], [584, 22], [584, 8], [584, 16], [585, 584], [585, 29], [586, 3], [588, 586], [591, 22], [591, 8], [591, 16], [592, 591], [592, 29], [593, 16], [593, 22], [593, 8], [594, 593], [594, 29], [595, 3], [597, 595], [600, 22], [600, 8], [600, 16], [601, 29], [601, 600], [602, 22], [602, 8], [602, 16], [603, 602], [603, 29], [604, 3], [606, 604], [609, 22], [609, 8], [609, 16], [610, 29], [610, 609], [611, 3], [613, 611], [616, 22], [616, 8], [616, 16], [617, 29], [617, 616], [618, 3], [620, 618], [623, 8], [623, 22], [623, 16], [624, 29], [624, 623], [625, 22], [625, 8], [625, 16], [626, 625], [626, 29], [627, 22], [627, 8], [627, 16], [628, 29], [628, 627], [629, 22], [629, 8], [629, 16], [630, 629], [630, 29], [631, 3], [632, 624], [633, 626], [635, 631], [638, 8], [638, 22], [638, 16], [639, 29], [639, 638], [640, 3], [642, 640], [645, 16], [645, 22], [645, 8], [646, 645], [646, 29], [647, 3], [649, 647], [652, 3], [654, 652], [657, 22], [657, 8], [657, 16], [658, 29], [658, 657], [659, 3], [661, 659], [664, 3], [666, 664], [669, 22], [669, 8], [669, 16], [670, 29], [670, 669], [671, 22], [671, 8], [671, 16], [672, 29], [672, 671], [673, 3], [675, 673], [678, 16], [678, 22], [678, 8], [679, 678], [679, 29], [680, 22], [680, 8], [680, 16], [681, 29], [681, 680], [682, 22], [682, 8], [682, 16], [683, 29], [683, 682], [684, 3], [685, 679], [687, 684], [690, 22], [690, 8], [690, 16], [691, 29], [691, 690], [692, 3], [694, 692], [697, 16], [697, 22], [697, 8], [698, 697], [698, 29], [699, 22], [699, 8], [699, 16], [700, 699], [700, 29], [701, 22], [701, 8], [701, 16], [702, 29], [702, 701], [703, 3], [704, 698], [706, 703], [709, 22], [709, 8], [709, 16], [710, 29], [710, 709], [711, 16], [711, 22], [711, 8], [712, 711], [712, 29], [713, 3], [715, 713], [718, 22], [718, 8], [718, 16], [719, 718], [719, 29], [720, 22], [720, 8], [720, 16], [721, 29], [721, 720], [722, 3], [724, 722], [727, 16], [727, 22], [727, 8], [728, 727], [728, 29], [729, 22], [729, 8], [729, 16], [730, 729], [730, 29], [731, 3], [733, 731], [736, 22], [736, 8], [736, 16], [737, 736], [737, 29], [738, 3], [740, 738], [743, 16], [743, 22], [743, 8], [744, 743], [744, 29], [745, 22], [745, 8], [745, 16], [746, 29], [746, 745], [747, 22], [747, 8], [747, 16], [748, 29], [748, 747], [749, 16], [749, 22], [749, 8], [750, 29], [750, 749], [751, 3], [752, 744], [753, 746], [755, 751], [758, 22], [758, 8], [758, 16], [759, 29], [759, 758], [760, 3], [762, 760], [765, 3], [767, 765], [770, 16], [770, 22], [770, 8], [771, 770], [771, 29], [772, 3], [774, 772], [777, 22], [777, 8], [777, 16], [778, 29], [778, 777], [779, 3], [781, 779], [784, 3], [786, 784], [789, 16], [789, 22], [789, 8], [790, 789], [790, 29], [791, 3], [793, 791], [796, 22], [796, 8], [796, 16], [797, 29], [797, 796], [798, 16], [798, 22], [798, 8], [799, 798], [799, 29], [800, 16], [800, 22], [800, 8], [801, 29], [801, 800], [802, 3], [803, 797], [805, 802], [808, 22], [808, 8], [808, 16], [809, 29], [809, 808], [810, 22], [810, 8], [810, 16], [811, 29], [811, 810], [812, 3], [814, 812], [817, 16], [817, 22], [817, 8], [818, 817], [818, 29], [819, 3], [821, 819], [824, 22], [824, 8], [824, 16], [825, 29], [825, 824], [826, 3], [828, 826], [831, 22], [831, 8], [831, 16], [832, 831], [832, 29], [833, 22], [833, 8], [833, 16], [834, 29], [834, 833], [835, 22], [835, 8], [835, 16], [836, 835], [836, 29], [837, 3], [838, 832], [840, 837], [843, 22], [843, 8], [843, 16], [844, 843], [844, 29], [845, 3], [847, 845], [850, 22], [850, 8], [850, 16], [851, 850], [851, 29], [852, 3], [854, 852], [857, 22], [857, 8], [857, 16], [858, 857], [858, 29], [859, 22], [859, 8], [859, 16], [860, 29], [860, 859], [861, 22], [861, 16], [861, 8], [862, 861], [862, 29], [863, 3], [864, 858], [866, 863], [869, 3], [871, 869], [874, 22], [874, 8], [874, 16], [875, 874], [875, 29], [876, 22], [876, 8], [876, 16], [877, 876], [877, 29], [878, 3], [880, 878], [883, 22], [883, 8], [883, 16], [884, 29], [884, 883], [885, 16], [885, 22], [885, 8], [886, 885], [886, 29], [887, 3], [889, 887], [892, 22], [892, 8], [892, 16], [893, 29], [893, 892], [894, 22], [894, 8], [894, 16], [895, 29], [895, 894], [896, 3], [898, 896], [901, 22], [901, 8], [901, 16], [902, 901], [902, 29], [903, 22], [903, 8], [903, 16], [904, 29], [904, 903], [905, 3], [907, 905], [910, 22], [910, 8], [910, 16], [911, 910], [911, 29], [912, 3], [914, 912], [917, 8], [917, 22], [917, 16], [918, 29], [918, 917], [919, 22], [919, 8], [919, 16], [920, 919], [920, 29], [921, 22], [921, 8], [921, 16], [922, 29], [922, 921], [923, 16], [923, 22], [923, 8], [924, 923], [924, 29], [925, 3], [926, 918], [927, 920], [929, 925], [934, 932]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1812cddc11d5d37e1bfd4b1269e60e52c00acecac170e6456fc2ba2cddc55918_1812cddc11d5d37e1bfd4b1269e60e52c00acecac170e6456fc2ba2cddc55918.jsonl.gz", "strip_func_name": "sub_48B725", "query": "\n\n\n__int64 __fastcall sub_48B725(FILE *a1, __int64 a2)\n{\n__int64 v2; // rcx\n__int64 v3; // r8\n__int64 v4; // r9\n__int64 v5; // rdx\n__int64 v6; // rcx\n__int64 v7; // r8\n__int64 v8; // r9\n__int64 v9; // rdx\n__int64 v10; // rcx\n__int64 v11; // r8\n__int64 v12; // r9\n__int64 v13; // rdx\n__int64 v14; // rcx\n__int64 v15; // r8\n__int64 v16; // r9\n__int64 v17; // rdx\n__int64 v18; // rcx\n__int64 v19; // r8\n__int64 v20; // r9\n__int64 v21; // rdx\n__int64 v22; // rcx\n__int64 v23; // r8\n__int64 v24; // r9\n__int64 v25; // rdx\n__int64 v26; // rcx\n__int64 v27; // r8\n__int64 v28; // r9\n__int64 v29; // rdx\n__int64 v30; // rcx\n__int64 v31; // r8\n__int64 v32; // r9\n__int64 v33; // rdx\n__int64 v34; // rcx\n__int64 v35; // r8\n__int64 v36; // r9\n__int64 v37; // rdx\n__int64 v38; // rcx\n__int64 v39; // r8\n__int64 v40; // r9\n__int64 v41; // rdx\n__int64 v42; // rcx\n__int64 v43; // r8\n__int64 v44; // r9\n__int64 v45; // rdx\n__int64 v46; // rcx\n__int64 v47; // r8\n__int64 v48; // r9\n__int64 v49; // rdx\n__int64 v50; // rcx\n__int64 v51; // r8\n__int64 v52; // r9\n__int64 v53; // rdx\n__int64 v54; // rcx\n__int64 v55; // r8\n__int64 v56; // r9\n__int64 v57; // rdx\n__int64 v58; // rcx\n__int64 v59; // r8\n__int64 v60; // r9\n__int64 v61; // rdx\n__int64 v62; // rcx\n__int64 v63; // r8\n__int64 v64; // r9\n__int64 v65; // rdx\n__int64 v66; // rcx\n__int64 v67; // r8\n__int64 v68; // r9\n__int64 v69; // rdx\n__int64 v70; // rcx\n__int64 v71; // r8\n__int64 v72; // r9\n__int64 v73; // rdx\n__int64 v74; // rcx\n__int64 v75; // r8\n__int64 v76; // r9\n__int64 v77; // rdx\n__int64 v78; // rcx\n__int64 v79; // r8\n__int64 v80; // r9\n__int64 v81; // rdx\n__int64 v82; // rcx\n__int64 v83; // r8\n__int64 v84; // r9\n__int64 v85; // rdx\n__int64 v86; // rcx\n__int64 v87; // r8\n__int64 v88; // r9\n__int64 v89; // rdx\n__int64 v90; // rcx\n__int64 v91; // r8\n__int64 v92; // r9\n__int64 v93; // rdx\n__int64 v94; // rcx\n__int64 v95; // r8\n__int64 v96; // r9\n__int64 v97; // rdx\n__int64 v98; // rcx\n__int64 v99; // r8\n__int64 v100; // r9\n__int64 v101; // rdx\n__int64 v102; // rcx\n__int64 v103; // r8\n__int64 v104; // r9\n__int64 v105; // rdx\n__int64 v106; // rcx\n__int64 v107; // r8\n__int64 v108; // r9\n__int64 v109; // rdx\n__int64 v110; // rcx\n__int64 v111; // r8\n__int64 v112; // r9\n__int64 v113; // rdx\n__int64 v114; // rcx\n__int64 v115; // r8\n__int64 v116; // r9\n__int64 v117; // rdx\n__int64 v118; // rcx\n__int64 v119; // r8\n__int64 v120; // r9\n__int64 v121; // rdx\n__int64 v122; // rcx\n__int64 v123; // r8\n__int64 v124; // r9\n__int64 v125; // rdx\n__int64 v126; // rcx\n__int64 v127; // r8\n__int64 v128; // r9\n__int64 v129; // rdx\n__int64 v130; // rcx\n__int64 v131; // r8\n__int64 v132; // r9\n__int64 v133; // rdx\n__int64 v134; // rcx\n__int64 v135; // r8\n__int64 v136; // r9\n__int64 v137; // rdx\n__int64 v138; // rcx\n__int64 v139; // r8\n__int64 v140; // r9\n__int64 v141; // rdx\n__int64 v142; // rcx\n__int64 v143; // r8\n__int64 v144; // r9\n__int64 v145; // rdx\n__int64 v146; // rcx\n__int64 v147; // r8\n__int64 v148; // r9\n__int64 v149; // rdx\n__int64 v150; // rcx\n__int64 v151; // r8\n__int64 v152; // r9\n__int64 v153; // rdx\n__int64 v154; // rcx\n__int64 v155; // r8\n__int64 v156; // r9\n__int64 v157; // rdx\n__int64 v158; // rcx\n__int64 v159; // r8\n__int64 v160; // r9\n__int64 v161; // rdx\n__int64 v162; // rcx\n__int64 v163; // r8\n__int64 v164; // r9\n__int64 v165; // rdx\n__int64 v166; // rcx\n__int64 v167; // r8\n__int64 v168; // r9\n__int64 v169; // rdx\n__int64 v170; // rcx\n__int64 v171; // r8\n__int64 v172; // r9\n__int64 v173; // rdx\n__int64 v174; // rcx\n__int64 v175; // r8\n__int64 v176; // r9\n__int64 v177; // rdx\n__int64 v178; // rcx\n__int64 v179; // r8\n__int64 v180; // r9\n__int64 v181; // rdx\n__int64 v182; // rcx\n__int64 v183; // r8\n__int64 v184; // r9\n__int64 v185; // rdx\n__int64 v186; // rcx\n__int64 v187; // r8\n__int64 v188; // r9\n__int64 v189; // rdx\n__int64 v190; // rcx\n__int64 v191; // r8\n__int64 v192; // r9\n__int64 v193; // rdx\n__int64 v194; // rcx\n__int64 v195; // r8\n__int64 v196; // r9\n__int64 v197; // rdx\n__int64 v198; // rcx\n__int64 v199; // r8\n__int64 v200; // r9\n__int64 v201; // rdx\n__int64 v202; // rcx\n__int64 v203; // r8\n__int64 v204; // r9\n__int64 v205; // rdx\n__int64 v206; // rcx\n__int64 v207; // r8\n__int64 v208; // r9\n__int64 v209; // rdx\n__int64 v210; // rcx\n__int64 v211; // r8\n__int64 v212; // r9\n__int64 v213; // rdx\n__int64 v214; // rcx\n__int64 v215; // r8\n__int64 v216; // r9\n__int64 v217; // rdx\n__int64 v218; // rcx\n__int64 v219; // r8\n__int64 v220; // r9\n__int64 v221; // rdx\n__int64 v222; // rcx\n__int64 v223; // r8\n__int64 v224; // r9\n__int64 v225; // rdx\n__int64 v226; // rcx\n__int64 v227; // r8\n__int64 v228; // r9\n__int64 v229; // rdx\n__int64 v230; // rcx\n__int64 v231; // r8\n__int64 v232; // r9\n__int64 v233; // rcx\n__int64 v234; // r8\n__int64 v235; // r9\n__int64 v236; // rcx\n__int64 v237; // r8\n__int64 v238; // r9\n__int64 v239; // r9\n__int64 v240; // r9\n__int64 v241; // r9\n__int64 v242; // r9\n__int64 v243; // rdx\n__int64 v244; // rcx\n__int64 v245; // r8\n__int64 v246; // r9\n__int64 v247; // r8\n__int64 v248; // r9\n__int64 v249; // rcx\n__int64 v250; // r8\n__int64 v251; // r9\n__int64 v252; // rcx\n__int64 v253; // r8\n__int64 v254; // r9\n__int64 v255; // r8\n__int64 v256; // r9\n__int64 v257; // r8\n__int64 v258; // r9\n__int64 v259; // rcx\n__int64 v260; // r8\n__int64 v261; // r9\n__int64 v262; // rcx\n__int64 v263; // r8\n__int64 v264; // r9\n__int64 v265; // rcx\n__int64 v266; // r8\n__int64 v267; // r9\n__int64 v268; // rcx\n__int64 v269; // r8\n__int64 v270; // r9\n__int64 v271; // rdx\n__int64 v272; // rcx\n__int64 v273; // r8\n__int64 v274; // r9\n__int64 v275; // rcx\n__int64 v276; // r8\n__int64 v277; // r9\n__int64 v278; // rdx\n__int64 v279; // rcx\n__int64 v280; // r8\n__int64 v281; // r9\n__int64 v282; // r8\n__int64 v283; // r9\n__int64 v284; // r9\n__int64 v285; // rcx\n__int64 v286; // r8\n__int64 v287; // r9\n__int64 v288; // r9\n__int64 v289; // r8\n__int64 v290; // r9\n__int64 v291; // r8\n__int64 v292; // r9\n__int64 v293; // r8\n__int64 v294; // r9\n__int64 v295; // rcx\n__int64 v296; // r8\n__int64 v297; // r9\n__int64 v298; // rcx\n__int64 v299; // r8\n__int64 v300; // r9\n__int64 v301; // rdx\n__int64 v302; // rcx\n__int64 v303; // r8\n__int64 v304; // r9\n__int64 v305; // rcx\n__int64 v306; // r8\n__int64 v307; // r9\n__int64 v308; // rcx\n__int64 v309; // r8\n__int64 v310; // r9\n__int64 v311; // rdx\n__int64 v312; // rcx\n__int64 v313; // r8\n__int64 v314; // r9\n__int64 v315; // rcx\n__int64 v316; // r8\n__int64 v317; // r9\n__int64 v318; // r9\n__int64 v319; // r8\n__int64 v320; // r9\n__int64 v321; // rcx\n__int64 v322; // r8\n__int64 v323; // r9\n__int64 v324; // rcx\n__int64 v325; // r8\n__int64 v326; // r9\n__int64 v327; // r9\n__int64 v328; // rcx\n__int64 v329; // r8\n__int64 v330; // r9\n__int64 v331; // rcx\n__int64 v332; // r8\n__int64 v333; // r9\n__int64 v334; // r9\n__int64 v335; // rdx\n__int64 v336; // rcx\n__int64 v337; // r8\n__int64 v338; // r9\n__int64 v339; // r8\n__int64 v340; // r9\n__int64 v341; // r8\n__int64 v342; // r9\n__int64 v343; // r8\n__int64 v344; // r9\n__int64 v345; // r8\n__int64 v346; // r9\n__int64 v347; // rcx\n__int64 v348; // r8\n__int64 v349; // r9\nunsigned int v351; // [rsp+38h] [rbp-18h]\nunsigned int v352; // [rsp+3Ch] [rbp-14h]\nunsigned int v353; // [rsp+40h] [rbp-10h]\nunsigned int i; // [rsp+44h] [rbp-Ch]\nunsigned int j; // [rsp+44h] [rbp-Ch]\nunsigned int k; // [rsp+44h] [rbp-Ch]\n__int64 *v357; // [rsp+48h] [rbp-8h]\n\nv357 = (__int64 *)off_4EFC00;\nif ( !strcmp(*(const char **)a2, \"RP\") )\nv357 = (__int64 *)off_4EFC48;\nif ( strstr(value, \"-10\") )\n{\nv357 = (__int64 *)off_4EFC90;\nif ( !strstr(value, off_4C396C) )\noff_4EFC90[0] = (char *)&unk_4C3970;\n}\nsub_43F06E(a1, \"%s Disk Attach Help\\n\\n\", *(_QWORD *)a2, v2, v3, v4);\nsub_43F06E(a1, \"Disk container files can be one of several different types:\\n\\n\", v5, v6, v7, v8);\nif ( strstr(value, \"-10\") )\n{\nsub_43F06E(\na1,\n\" SIMH A disk is an unstructured binary file of 64bit integers\\n access by C runtime APIs\\n\",\nv9,\nv10,\nv11,\nv12);\nsub_43F06E(\na1,\n\" VHD A disk is an unstructured binary file of 64bit integers\\n contained in a VHD container\\n\",\nv41,\nv42,\nv43,\nv44);\nsub_43F06E(\na1,\n\" RAW A disk is an unstructured binary file of 64bit integers\\n\"\n\" accessed by direct read/write APIs\\n\",\nv45,\nv46,\nv47,\nv48);\nsub_43F06E(a1, \" DBD9 Compatible with KLH10 is a packed big endian word\\n\", v49, v50, v51, v52);\nsub_43F06E(a1, \" DLD9 Compatible with KLH10 is a packed little endian word\\n\\n\", v53, v54, v55, v56);\n}\nelse\n{\nsub_43F06E(a1, \" SIMH A disk is an unstructured binary file of the size appropriate\\n\", v9, v10, v11, v12);\nsub_43F06E(a1, \" for the disk drive being simulated accessed by C runtime APIs\\n\", v13, v14, v15, v16);\nsub_43F06E(a1, \" VHD Virtual Disk format which is described in the \\\"Microsoft\\n\", v17, v18, v19, v20);\nsub_43F06E(a1, \" Virtual Hard Disk (VHD) Image Format Specification\\\". The\\n\", v21, v22, v23, v24);\nsub_43F06E(a1, \" VHD implementation includes support for 1) Fixed (Preallocated)\\n\", v25, v26, v27, v28);\nsub_43F06E(a1, \" disks, 2) Dynamically Expanding disks, and 3) Differencing disks.\\n\", v29, v30, v31, v32);\nsub_43F06E(a1, \" RAW platform specific access to physical disk or CDROM drives\\n\\n\", v33, v34, v35, v36);\n}\nsub_43F06E(a1, \"Virtual (VHD) Disk support conforms to the \\\"Virtual Hard Disk Image Format\\n\", v37, v38, v39, v40);\nsub_43F06E(a1, \"Specification\\\", Version 1.0 October 11, 2006.\\n\", v57, v58, v59, v60);\nsub_43F06E(\na1,\n\"Dynamically expanding disks never change their \\\"Virtual Size\\\", but they don't\\n\",\nv61,\nv62,\nv63,\nv64);\nsub_43F06E(a1, \"consume disk space on the containing storage until the virtual sectors in the\\n\", v65, v66, v67, v68);\nsub_43F06E(a1, \"disk are actually written to (i.e. a 2GB Dynamic disk container file with only\\n\", v69, v70, v71, v72);\nsub_43F06E(\na1,\n\"30MB of data will initially be about 30MB in size and this size will grow up to\\n\",\nv73,\nv74,\nv75,\nv76);\nsub_43F06E(a1, \"2GB as different sectors are written to. The VHD format contains metadata\\n\", v77, v78, v79, v80);\nsub_43F06E(a1, \"which describes the drive size and the simh device type in use when the VHD\\n\", v81, v82, v83, v84);\nsub_43F06E(a1, \"was created. This metadata is therefore available whenever that VHD is\\n\", v85, v86, v87, v88);\nsub_43F06E(a1, \"attached to an emulated disk device in the future so the device type and\\n\", v89, v90, v91, v92);\nsub_43F06E(a1, \"size can be automatically be configured.\\n\\n\", v93, v94, v95, v96);\nif ( *(_DWORD *)(a2 + 32) <= 1u )\n{\nsub_43F06E(a1, \" sim> ATTACH {switches} %s diskfile\\n\", *(_QWORD *)a2, v98, v99, v100);\n}\nelse\n{\nv353 = 0;\nv352 = 0;\nfor ( i = 0; i < *(_DWORD *)(a2 + 32); ++i )\n{\nv98 = *(_QWORD *)(a2 + 8);\nv97 = i;\nif ( (*(_DWORD *)(v98 + 264LL * i + 56) & 1) != 0 )\n{\nv98 = *(_QWORD *)(a2 + 8);\nv97 = i;\nif ( (*(_DWORD *)(v98 + 264LL * i + 56) & 0x800) == 0 )\n++v353;\n}\n}\nfor ( j = 0; j < *(_DWORD *)(a2 + 32) && v352 <= 1; ++j )\n{\nv98 = *(_QWORD *)(a2 + 8);\nv97 = j;\nif ( (*(_DWORD *)(v98 + 264LL * j + 56) & 1) != 0 )\n{\nv98 = *(_QWORD *)(a2 + 8);\nv97 = j;\nif ( (*(_DWORD *)(v98 + 264LL * j + 56) & 0x800) == 0 )\n{\nsub_43F06E(a1, \" sim> ATTACH {switches} %s%d diskfile\\n\", *(_QWORD *)a2, j, v99, v100);\n++v352;\n}\n}\n}\nif ( v353 > 4 )\n{\nsub_43F06E(a1, \" .\\n\", v97, v98, v99, v100);\nsub_43F06E(a1, \" .\\n\", v101, v102, v103, v104);\nsub_43F06E(a1, \" .\\n\", v105, v106, v107, v108);\n}\nv351 = v353 - 2;\nfor ( k = 0; k < *(_DWORD *)(a2 + 32); ++k )\n{\nv98 = *(_QWORD *)(a2 + 8);\nif ( (*(_DWORD *)(v98 + 264LL * k + 56) & 1) != 0 )\n{\nv98 = *(_QWORD *)(a2 + 8);\nif ( (*(_DWORD *)(v98 + 264LL * k + 56) & 0x800) == 0 )\n{\nif ( v351 )\n--v351;\nelse\nsub_43F06E(a1, \" sim> ATTACH {switches} %s%d diskfile\\n\", *(_QWORD *)a2, k, v99, v100);\n}\n}\n}\n}\nsub_43F06E(a1, \"\\n%s attach command switches\\n\", *(_QWORD *)a2, v98, v99, v100);\nsub_43F06E(a1, \" -R Attach Read Only.\\n\", v109, v110, v111, v112);\nsub_43F06E(\na1,\n\" -E Must Exist (if not specified an attempt to create the indicated\\n\",\nv113,\nv114,\nv115,\nv116);\nsub_43F06E(a1, \" disk container will be attempted).\\n\", v117, v118, v119, v120);\nsub_43F06E(\na1,\n\" -F Open the indicated disk container in a specific format (default\\n\",\nv121,\nv122,\nv123,\nv124);\nsub_43F06E(a1, \" is to autodetect VHD defaulting to RAW if the indicated\\n\", v125, v126, v127, v128);\nsub_43F06E(a1, \" container is not a VHD).\\n\", v129, v130, v131, v132);\nsub_43F06E(\na1,\n\" -I Initialize newly created disk so that each sector contains its\\n\",\nv133,\nv134,\nv135,\nv136);\nsub_43F06E(a1, \" sector address\\n\", v137, v138, v139, v140);\nsub_43F06E(\na1,\n\" -K Verify that the disk contents contain the sector address in each\\n\",\nv141,\nv142,\nv143,\nv144);\nsub_43F06E(\na1,\n\" sector. Whole disk checked at attach time and each sector is\\n\",\nv145,\nv146,\nv147,\nv148);\nsub_43F06E(a1, \" checked when written.\\n\", v149, v150, v151, v152);\nsub_43F06E(\na1,\n\" -C Create a disk container and copy its contents from another disk\\n\",\nv153,\nv154,\nv155,\nv156);\nsub_43F06E(\na1,\n\" (simh, VHD, or RAW format). The current (or specified with -F)\\n\",\nv157,\nv158,\nv159,\nv160);\nsub_43F06E(\na1,\n\" container format will be the format of the created container.\\n\",\nv161,\nv162,\nv163,\nv164);\nsub_43F06E(\na1,\n\" AUTO or VHD will create a VHD container, SIMH will create a.\\n\",\nv165,\nv166,\nv167,\nv168);\nsub_43F06E(\na1,\n\" SIMH container. Add a -V switch to verify a copy operation.\\n\",\nv169,\nv170,\nv171,\nv172);\nsub_43F06E(a1, \" Note: A copy will be performed between dissimilar sized\\n\", v173, v174, v175, v176);\nsub_43F06E(a1, \" containers. Copying from a larger container to a smaller\\n\", v177, v178, v179, v180);\nsub_43F06E(a1, \" one will produce a truncated result.\\n\", v181, v182, v183, v184);\nsub_43F06E(\na1,\n\" -V Perform a verification pass to confirm successful data copy\\n\",\nv185,\nv186,\nv187,\nv188);\nsub_43F06E(a1, \" operation.\\n\", v189, v190, v191, v192);\nsub_43F06E(\na1,\n\" -X When creating a VHD, create a fixed sized VHD (vs a Dynamically\\n\",\nv193,\nv194,\nv195,\nv196);\nsub_43F06E(a1, \" expanding one).\\n\", v197, v198, v199, v200);\nsub_43F06E(\na1,\n\" -D Create a Differencing VHD (relative to an already existing VHD\\n\",\nv201,\nv202,\nv203,\nv204);\nsub_43F06E(a1, \" disk)\\n\", v205, v206, v207, v208);\nsub_43F06E(a1, \" -M Merge a Differencing VHD into its parent VHD disk\\n\", v209, v210, v211, v212);\nsub_43F06E(\na1,\n\" -O Override consistency checks when attaching differencing disks\\n\",\nv213,\nv214,\nv215,\nv216);\nsub_43F06E(a1, \" which have unexpected parent disk GUID or timestamps\\n\\n\", v217, v218, v219, v220);\nsub_43F06E(a1, \" -U Fix inconsistencies which are overridden by the -O switch\\n\", v221, v222, v223, v224);\nif ( !strstr(value, \"-10\") )\n{\nsub_43F06E(\na1,\n\" -Y Answer Yes to prompt to overwrite last track (on disk create)\\n\",\nv225,\nv226,\nv227,\nv228);\nsub_43F06E(\na1,\n\" -N Answer No to prompt to overwrite last track (on disk create)\\n\",\nv229,\nv230,\nv231,\nv232);\n}\nsub_43F06E(a1, \"Examples:\\n\", v225, v226, v227, v228);\nsub_43F06E(a1, \" sim> show %s\\n\", *v357, v233, v234, v235);\nsub_43F06E(a1, \" %s, address=20001468-2000146B*, no vector, 4 units\\n\", *v357, v236, v237, v238);\nsub_43F06E(\na1,\n\" %s0, %s, not attached, write enabled, %s, autosize, AUTO detect format\\n\",\n*v357,\nv357[2],\nv357[1],\nv239);\nsub_43F06E(\na1,\n\" %s1, %s, not attached, write enabled, %s, autosize, AUTO detect format\\n\",\n*v357,\nv357[2],\nv357[1],\nv240);\nsub_43F06E(\na1,\n\" %s2, %s, not attached, write enabled, %s, autosize, AUTO detect format\\n\",\n*v357,\nv357[2],\nv357[1],\nv241);\nsub_43F06E(\na1,\n\" %s3, %s, not attached, write enabled, %s, autosize, AUTO detect format\\n\",\n*v357,\nv357[4],\nv357[3],\nv242);\nsub_43F06E(\na1,\n\" sim> # attach an existing VHD and determine its size and type automatically\\n\",\nv243,\nv244,\nv245,\nv246);\nsub_43F06E(a1, \" sim> attach %s0 %s.vhd\\n\", *v357, v357[5], v247, v248);\nsub_43F06E(a1, \" sim> show %s0\\n\", *v357, v249, v250, v251);\nsub_43F06E(\na1,\n\" %s0, %s, attached to %s.vhd, write enabled, %s, autosize, VHD format\\n\",\n*v357,\nv357[6],\nv357[5],\nv357[5]);\nsub_43F06E(a1, \" sim> # create a new %s drive type VHD\\n\", v357[7], v252, v253, v254);\nsub_43F06E(a1, \" sim> set %s2 %s\\n\", *v357, v357[7], v255, v256);\nsub_43F06E(a1, \" sim> attach %s2 -f vhd %s.vhd\\n\", *v357, v357[7], v257, v258);\nsub_43F06E(a1, \" %s2: creating new file\\n\", *v357, v259, v260, v261);\nsub_43F06E(a1, \" sim> show %s2\\n\", *v357, v262, v263, v264);\nsub_43F06E(\na1,\n\" %s2, %s, attached to %s.vhd, write enabled, %s, autosize, VHD format\\n\",\n*v357,\nv357[8],\nv357[7],\nv357[7]);\nsub_43F06E(a1, \" sim> # examine the size consumed by the %s VHD file\\n\", v357[8], v265, v266, v267);\nsub_43F06E(a1, \" sim> dir %s.vhd\\n\", v357[7], v268, v269, v270);\nsub_43F06E(a1, \" Directory of H:\\\\Data\\n\\n\", v271, v272, v273, v274);\nsub_43F06E(a1, \" 04/14/2011 12:57 PM 5,120 %s.vhd\\n\", v357[7], v275, v276, v277);\nsub_43F06E(a1, \" 1 File(s) 5,120 bytes\\n\", v278, v279, v280, v281);\nsub_43F06E(\na1,\n\" sim> # create a differencing vhd (%s-1-Diff.vhd) with %s.vhd as parent\\n\",\nv357[7],\nv357[7],\nv282,\nv283);\nsub_43F06E(a1, \" sim> attach %s3 -d %s-1-Diff.vhd %s.vhd\\n\", *v357, v357[7], v357[7], v284);\nsub_43F06E(a1, \" sim> # create a VHD (%s-1.vhd) which is a copy of an existing disk\\n\", v357[7], v285, v286, v287);\nsub_43F06E(a1, \" sim> attach %s3 -c %s-1.vhd %s.vhd\\n\", *v357, v357[7], v357[7], v288);\nsub_43F06E(a1, \" %s3: creating new virtual disk '%s-1.vhd'\\n\", *v357, v357[7], v289, v290);\nsub_43F06E(a1, \" %s3: Copied %s. 99%% complete.\\n\", *v357, v357[8], v291, v292);\nsub_43F06E(a1, \" %s3: Copied %s. Done.\\n\", *v357, v357[8], v293, v294);\nsub_43F06E(a1, \" sim> show %s3\\n\", *v357, v295, v296, v297);\nsub_43F06E(\na1,\n\" %s3, %s, attached to %s-1.vhd, write enabled, %s, autosize, VHD format\\n\",\n*v357,\nv357[8],\nv357[7],\nv357[7]);\nsub_43F06E(a1, \" sim> dir %s*\\n\", v357[7], v298, v299, v300);\nsub_43F06E(a1, \" Directory of H:\\\\Data\\n\\n\", v301, v302, v303, v304);\nsub_43F06E(a1, \" 04/14/2011 01:12 PM 5,120 %s-1.vhd\\n\", v357[7], v305, v306, v307);\nsub_43F06E(a1, \" 04/14/2011 12:58 PM 5,120 %s.vhd\\n\", v357[7], v308, v309, v310);\nsub_43F06E(a1, \" 2 File(s) 10,240 bytes\\n\", v311, v312, v313, v314);\nsub_43F06E(a1, \" sim> show %s2\\n\", *v357, v315, v316, v317);\nsub_43F06E(a1, \" %s2, %s, not attached, write enabled, %s, autosize, VHD format\\n\", *v357, v357[8], v357[7], v318);\nsub_43F06E(a1, \" sim> set %s2 %s\\n\", *v357, v357[5], v319, v320);\nsub_43F06E(a1, \" sim> set %s2 noauto\\n\", *v357, v321, v322, v323);\nsub_43F06E(a1, \" sim> show %s2\\n\", *v357, v324, v325, v326);\nsub_43F06E(a1, \" %s2, %s, not attached, write enabled, %s, noautosize, VHD format\\n\", *v357, v357[6], v357[5], v327);\nsub_43F06E(a1, \" sim> set %s2 format=simh\\n\", *v357, v328, v329, v330);\nsub_43F06E(a1, \" sim> show %s2\\n\", *v357, v331, v332, v333);\nsub_43F06E(a1, \" %s2, %s, not attached, write enabled, %s, noautosize, SIMH format\\n\", *v357, v357[6], v357[5], v334);\nsub_43F06E(a1, \" sim> # create a VHD from an existing SIMH format disk\\n\", v335, v336, v337, v338);\nsub_43F06E(a1, \" sim> attach %s2 -c %s-Copy.vhd XYZZY.dsk\\n\", *v357, v357[5], v339, v340);\nsub_43F06E(a1, \" %s2: creating new virtual disk '%s-Copy.vhd'\\n\", *v357, v357[5], v341, v342);\nsub_43F06E(a1, \" %s2: Copied %s. 99%% complete.\\n\", *v357, v357[6], v343, v344);\nsub_43F06E(a1, \" %s2: Copied %s. Done.\\n\", *v357, v357[6], v345, v346);\nsub_43F06E(a1, \" sim> show %s2\\n\", *v357, v347, v348, v349);\nsub_43F06E(\na1,\n\" %s2, %s, attached to %s-Copy.vhd, write enabled, %s, noautosize, VHD format\\n\",\n*v357,\nv357[6],\nv357[5],\nv357[5]);\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v170,v223,v25,v351,v352,v353,i,v357,sub_48B725,sub_43F06E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'st', 'a2': 'dptr', 'v170': 'flag', 'v223': 'cptr', 'v25': 'uptr', 'v351': 'skip_count', 'v352': 'out_count', 'v353': 'attachable_count', 'i': 'ia', 'v357': 'ex', 'sub_48B725': 'sim_disk_attach_help', 'sub_43F06E': 'Fprintf'}"}
_sim_rem_message
c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7
open-simh
simh
NA
static t_stat _sim_rem_message (const char *cmd, t_stat stat) { CTAB *cmdp = NULL; t_stat stat_nomessage = stat & SCPE_NOMESSAGE; /* extract possible message supression flag */ cmdp = find_cmd (cmd); stat = SCPE_BARE_STATUS(stat); /* remove possible flag */ if (!stat_nomessage) { if (cmdp && (cmdp->message)) /* special message handler? */ cmdp->message (NULL, stat); /* let it deal with display */ else { if (stat >= SCPE_BASE) /* error? */ sim_printf ("%s\r\n", sim_error_text (stat)); } } return stat; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_444DD2", "function_addr": 4476370, "binary_name": "c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7.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 [rbp+var_8], 0"], [6, "mov eax, [rbp+var_1C]"], [7, "and eax, 40000000h"], [8, "mov [rbp+var_C], eax"], [9, "mov rax, [rbp+var_18]"], [10, "mov rdi, rax"], [11, "call sub_419474"], [12, "mov [rbp+var_8], rax"], [13, "and [rbp+var_1C], 8FFFFFFFh"], [14, "cmp [rbp+var_C], 0"], [15, "jnz short loc_444E5D"], [16, "cmp [rbp+var_8], 0"], [17, "jz short loc_444E3B"], [18, "mov rax, [rbp+var_8]"], [19, "mov rax, [rax+28h]"], [20, "test rax, rax"], [21, "jz short loc_444E3B"], [22, "mov rax, [rbp+var_8]"], [23, "mov rdx, [rax+28h]"], [24, "mov eax, [rbp+var_1C]"], [25, "mov esi, eax"], [26, "mov edi, 0"], [27, "call rdx"], [28, "jmp short loc_444E5D"], [29, "cmp [rbp+var_1C], 3Fh "], [30, "jle short loc_444E5D"], [31, "mov eax, [rbp+var_1C]"], [32, "mov edi, eax"], [33, "call sub_43B014"], [34, "mov rsi, rax"], [35, "mov edi, offset aS_24"], [36, "mov eax, 0"], [37, "call sub_43C43C"], [38, "mov eax, [rbp+var_1C]"], [39, "leave"], [40, "retn"]], "data_dep": [[6, 4], [7, 6], [8, 7], [9, 3], [10, 9], [12, 11], [13, 4], [14, 8], [15, 14], [16, 12], [17, 16], [18, 12], [19, 18], [20, 19], [21, 20], [22, 12], [23, 22], [24, 13], [25, 24], [27, 23], [29, 13], [30, 29], [31, 13], [32, 31], [34, 33], [38, 13], [40, 38]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7_c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7.jsonl.gz", "strip_func_name": "sub_444DD2", "query": "\n\n\n__int64 __fastcall sub_444DD2(__int64 a1, int a2)\n{\nconst char *v2; // rax\n__int64 v3; // rdx\n__int64 v4; // rcx\n__int64 v5; // r8\n__int64 v6; // r9\nint v8; // [rsp+4h] [rbp-1Ch]\n__int64 v9; // [rsp+18h] [rbp-8h]\n\nv9 = sub_419474(a1);\nv8 = a2 & 0x8FFFFFFF;\nif ( (a2 & 0x40000000) == 0 )\n{\nif ( v9 && *(_QWORD *)(v9 + 40) )\n{\n(*(void (__fastcall **)(_QWORD, _QWORD))(v9 + 40))(0LL, (unsigned int)v8);\n}\nelse if ( v8 > 63 )\n{\nv2 = sub_43B014(v8);\nsub_43C43C(\"%s\\r\\n\", (__int64)v2, v3, v4, v5, v6);\n}\n}\nreturn (unsigned int)v8;\n}\n\n\n\nQ:[a1,a2,v8,v9,sub_444DD2,sub_419474,sub_43B014,sub_43C43C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'cmd', 'a2': 'stat', 'v8': 'stata', 'v9': 'cmdp', 'sub_444DD2': '_sim_rem_message', 'sub_419474': 'find_cmd', 'sub_43B014': 'sim_error_text', 'sub_43C43C': 'sim_printf'}"}
licence_parse_platform_challange
0751e249e278081842d74c20af54dbc95f1a371e2f46402cafa4c4cbd3d44694
robertdavidgraham
rdpscan
NA
static RD_BOOL licence_parse_platform_challange(STREAM s, uint8 ** token, uint8 ** signature) { uint16 tokenlen; in_uint8s(s, 6); /* unknown: f8 3d 15 00 04 f6 */ in_uint16_le(s, tokenlen); if (tokenlen != LICENCE_TOKEN_SIZE) { error("token len %d\n", tokenlen); return False; } in_uint8p(s, *token, tokenlen); in_uint8p(s, *signature, LICENCE_SIGNATURE_SIZE); return s_check_end(s); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40D121", "function_addr": 4247841, "binary_name": "0751e249e278081842d74c20af54dbc95f1a371e2f46402cafa4c4cbd3d44694.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov rax, [rbp+var_18]"], [7, "mov rax, [rax]"], [8, "lea rdx, [rax+6]"], [9, "mov rax, [rbp+var_18]"], [10, "mov [rax], rdx"], [11, "mov rax, [rbp+var_18]"], [12, "mov rax, [rax]"], [13, "movzx eax, word ptr [rax]"], [14, "mov [rbp+var_2], ax"], [15, "mov rax, [rbp+var_18]"], [16, "mov rax, [rax]"], [17, "lea rdx, [rax+2]"], [18, "mov rax, [rbp+var_18]"], [19, "mov [rax], rdx"], [20, "cmp [rbp+var_2], 0Ah"], [21, "jz short loc_40D18A"], [22, "movzx eax, [rbp+var_2]"], [23, "mov esi, eax"], [24, "mov edi, offset aTokenLenD"], [25, "mov eax, 0"], [26, "call error"], [27, "mov eax, 0"], [28, "jmp short locret_40D1E5"], [29, "mov rax, [rbp+var_18]"], [30, "mov rdx, [rax]"], [31, "mov rax, [rbp+var_20]"], [32, "mov [rax], rdx"], [33, "mov rax, [rbp+var_18]"], [34, "mov rdx, [rax]"], [35, "movzx eax, [rbp+var_2]"], [36, "add rdx, rax"], [37, "mov rax, [rbp+var_18]"], [38, "mov [rax], rdx"], [39, "mov rax, [rbp+var_18]"], [40, "mov rdx, [rax]"], [41, "mov rax, [rbp+var_28]"], [42, "mov [rax], rdx"], [43, "mov rax, [rbp+var_18]"], [44, "mov rax, [rax]"], [45, "lea rdx, [rax+10h]"], [46, "mov rax, [rbp+var_18]"], [47, "mov [rax], rdx"], [48, "mov rax, [rbp+var_18]"], [49, "mov rdx, [rax]"], [50, "mov rax, [rbp+var_18]"], [51, "mov rax, [rax+8]"], [52, "cmp rdx, rax"], [53, "setz al"], [54, "movzx eax, al"], [55, "leave"], [56, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 3], [10, 9], [10, 8], [11, 3], [12, 10], [12, 11], [13, 10], [13, 12], [14, 13], [15, 3], [16, 10], [16, 15], [17, 8], [17, 10], [17, 16], [18, 3], [19, 18], [19, 17], [20, 14], [21, 20], [22, 14], [23, 22], [29, 3], [30, 42], [30, 32], [30, 29], [30, 38], [30, 47], [30, 10], [30, 19], [31, 4], [32, 31], [32, 30], [33, 3], [34, 33], [34, 32], [35, 14], [36, 34], [36, 35], [37, 3], [38, 37], [38, 36], [39, 3], [40, 38], [40, 39], [41, 5], [42, 41], [42, 40], [43, 3], [44, 42], [44, 43], [45, 40], [45, 42], [45, 44], [46, 3], [47, 46], [47, 45], [48, 3], [49, 47], [49, 48], [50, 3], [51, 47], [51, 50], [52, 49], [52, 51], [53, 52], [53, 51], [54, 53], [56, 27], [56, 54]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0751e249e278081842d74c20af54dbc95f1a371e2f46402cafa4c4cbd3d44694_0751e249e278081842d74c20af54dbc95f1a371e2f46402cafa4c4cbd3d44694.jsonl.gz", "strip_func_name": "sub_40D121", "query": "\n\n\n_BOOL8 __fastcall sub_40D121(__int64 *a1, __int64 *a2, __int64 *a3, int a4, int a5, int a6)\n{\n__int64 v6; // rdx\n_BOOL8 result; // rax\nunsigned __int16 v9; // [rsp+2Eh] [rbp-2h]\n\n*a1 += 6LL;\nv9 = *(_WORD *)*a1;\nv6 = *a1 + 2;\n*a1 = v6;\nif ( v9 == 10 )\n{\n*a2 = *a1;\n*a1 += 10LL;\n*a3 = *a1;\n*a1 += 16LL;\nresult = *a1 == a1[1];\n}\nelse\n{\nerror((unsigned int)\"token len %d\\n\", v9, v6, a4, a5, a6);\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v6,v9,sub_40D121,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'signature', 'a1': 's', 'a2': 'token', 'v6': 'signature', 'v9': 'tokenlen', 'sub_40D121': 'licence_parse_platform_challange'}"}
mbedtls_asn1_write_null
63478882d8c315fd651c021bacfeb78d34d5a8242796b227c60d4db34f7c0f1c
mireq
esp32-simulator
NA
int mbedtls_asn1_write_null( unsigned char **p, unsigned char *start ) { int ret; size_t len = 0; // Write NULL // MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, 0) ); MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_NULL ) ); return( (int) len ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4213DE", "function_addr": 4330462, "binary_name": "63478882d8c315fd651c021bacfeb78d34d5a8242796b227c60d4db34f7c0f1c.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 rcx, [rbp+var_20]"], [7, "mov rax, [rbp+var_18]"], [8, "mov edx, 0"], [9, "mov rsi, rcx"], [10, "mov rdi, rax"], [11, "call sub_420EB5"], [12, "mov [rbp+var_C], eax"], [13, "cmp [rbp+var_C], 0"], [14, "jns short loc_42141C"], [15, "mov eax, [rbp+var_C]"], [16, "jmp short locret_421458"], [17, "mov eax, [rbp+var_C]"], [18, "cdqe"], [19, "add [rbp+var_8], rax"], [20, "mov rcx, [rbp+var_20]"], [21, "mov rax, [rbp+var_18]"], [22, "mov edx, 5"], [23, "mov rsi, rcx"], [24, "mov rdi, rax"], [25, "call sub_4211B8"], [26, "mov [rbp+var_C], eax"], [27, "cmp [rbp+var_C], 0"], [28, "jns short loc_42144B"], [29, "mov eax, [rbp+var_C]"], [30, "jmp short locret_421458"], [31, "mov eax, [rbp+var_C]"], [32, "cdqe"], [33, "add [rbp+var_8], rax"], [34, "mov rax, [rbp+var_8]"], [35, "leave"], [36, "retn"]], "data_dep": [[6, 4], [7, 3], [9, 6], [10, 7], [12, 11], [13, 12], [14, 13], [15, 12], [17, 12], [19, 5], [19, 17], [20, 4], [21, 3], [23, 20], [24, 21], [26, 25], [27, 26], [28, 27], [29, 26], [31, 26], [33, 19], [33, 31], [34, 33], [36, 34], [36, 15], [36, 29]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/63478882d8c315fd651c021bacfeb78d34d5a8242796b227c60d4db34f7c0f1c_63478882d8c315fd651c021bacfeb78d34d5a8242796b227c60d4db34f7c0f1c.jsonl.gz", "strip_func_name": "sub_4213DE", "query": "\n\n\n__int64 __fastcall sub_4213DE(_QWORD *a1, __int64 a2)\n{\n__int64 result; // rax\n_BYTE v3[12]; // [rsp+14h] [rbp-Ch]\nint v4; // [rsp+14h] [rbp-Ch]\n__int64 v5; // [rsp+18h] [rbp-8h]\n\n*(_DWORD *)&v3[8] = 0;\n*(_QWORD *)v3 = (unsigned int)sub_420EB5(a1, a2, 0LL);\nif ( *(int *)v3 < 0 )\nreturn *(unsigned int *)v3;\nv5 = *(int *)v3 + *(_QWORD *)&v3[4];\nv4 = sub_4211B8(a1, a2, 5);\nif ( v4 >= 0 )\nresult = v4 + v5;\nelse\nresult = (unsigned int)v4;\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,v5,sub_4213DE,sub_420EB5,sub_4211B8,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'p', 'a2': 'start', 'v3': 'reta', 'v5': 'len', 'sub_4213DE': 'mbedtls_asn1_write_null', 'sub_420EB5': 'mbedtls_asn1_write_len', 'sub_4211B8': 'mbedtls_asn1_write_tag'}"}
ZSTD_DUBT_findBestMatch
8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05
soedinglab
MMseqs2
NA
static size_t ZSTD_DUBT_findBestMatch(ZSTD_matchState_t* ms, const BYTE* const ip, const BYTE* const iend, size_t* offsetPtr, U32 const mls, const ZSTD_dictMode_e dictMode) { const ZSTD_compressionParameters* const cParams = &ms->cParams; U32* const hashTable = ms->hashTable; U32 const hashLog = cParams->hashLog; size_t const h = ZSTD_hashPtr(ip, hashLog, mls); U32 matchIndex = hashTable[h]; const BYTE* const base = ms->window.base; U32 const current = (U32)(ip-base); U32 const windowLow = ms->window.lowLimit; U32* const bt = ms->chainTable; U32 const btLog = cParams->chainLog - 1; U32 const btMask = (1 << btLog) - 1; U32 const btLow = (btMask >= current) ? 0 : current - btMask; U32 const unsortLimit = MAX(btLow, windowLow); U32* nextCandidate = bt + 2*(matchIndex&btMask); U32* unsortedMark = bt + 2*(matchIndex&btMask) + 1; U32 nbCompares = 1U << cParams->searchLog; U32 nbCandidates = nbCompares; U32 previousCandidate = 0; DEBUGLOG(7, "ZSTD_DUBT_findBestMatch (%u) ", current); assert(ip <= iend-8); /* required for h calculation */ /* reach end of unsorted candidates list */ while ( (matchIndex > unsortLimit) && (*unsortedMark == ZSTD_DUBT_UNSORTED_MARK) && (nbCandidates > 1) ) { DEBUGLOG(8, "ZSTD_DUBT_findBestMatch: candidate %u is unsorted", matchIndex); *unsortedMark = previousCandidate; /* the unsortedMark becomes a reversed chain, to move up back to original position */ previousCandidate = matchIndex; matchIndex = *nextCandidate; nextCandidate = bt + 2*(matchIndex&btMask); unsortedMark = bt + 2*(matchIndex&btMask) + 1; nbCandidates --; } /* nullify last candidate if it's still unsorted * simplification, detrimental to compression ratio, beneficial for speed */ if ( (matchIndex > unsortLimit) && (*unsortedMark==ZSTD_DUBT_UNSORTED_MARK) ) { DEBUGLOG(7, "ZSTD_DUBT_findBestMatch: nullify last unsorted candidate %u", matchIndex); *nextCandidate = *unsortedMark = 0; } /* batch sort stacked candidates */ matchIndex = previousCandidate; while (matchIndex) { /* will end on matchIndex == 0 */ U32* const nextCandidateIdxPtr = bt + 2*(matchIndex&btMask) + 1; U32 const nextCandidateIdx = *nextCandidateIdxPtr; ZSTD_insertDUBT1(ms, matchIndex, iend, nbCandidates, unsortLimit, dictMode); matchIndex = nextCandidateIdx; nbCandidates++; } /* find longest match */ { size_t commonLengthSmaller = 0, commonLengthLarger = 0; const BYTE* const dictBase = ms->window.dictBase; const U32 dictLimit = ms->window.dictLimit; const BYTE* const dictEnd = dictBase + dictLimit; const BYTE* const prefixStart = base + dictLimit; U32* smallerPtr = bt + 2*(current&btMask); U32* largerPtr = bt + 2*(current&btMask) + 1; U32 matchEndIdx = current + 8 + 1; U32 dummy32; /* to be nullified at the end */ size_t bestLength = 0; matchIndex = hashTable[h]; hashTable[h] = current; /* Update Hash Table */ while (nbCompares-- && (matchIndex > windowLow)) { U32* const nextPtr = bt + 2*(matchIndex & btMask); size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */ const BYTE* match; if ((dictMode != ZSTD_extDict) || (matchIndex+matchLength >= dictLimit)) { match = base + matchIndex; matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend); } else { match = dictBase + matchIndex; matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); if (matchIndex+matchLength >= dictLimit) match = base + matchIndex; /* to prepare for next usage of match[matchLength] */ } if (matchLength > bestLength) { if (matchLength > matchEndIdx - matchIndex) matchEndIdx = matchIndex + (U32)matchLength; if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(current-matchIndex+1) - ZSTD_highbit32((U32)offsetPtr[0]+1)) ) bestLength = matchLength, *offsetPtr = ZSTD_REP_MOVE + current - matchIndex; if (ip+matchLength == iend) { /* equal : no way to know if inf or sup */ if (dictMode == ZSTD_dictMatchState) { nbCompares = 0; /* in addition to avoiding checking any * further in this loop, make sure we * skip checking in the dictionary. */ } break; /* drop, to guarantee consistency (miss a little bit of compression) */ } } if (match[matchLength] < ip[matchLength]) { /* match is smaller than current */ *smallerPtr = matchIndex; /* update smaller idx */ commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */ if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */ smallerPtr = nextPtr+1; /* new "smaller" => larger of match */ matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */ } else { /* match is larger than current */ *largerPtr = matchIndex; commonLengthLarger = matchLength; if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */ largerPtr = nextPtr; matchIndex = nextPtr[0]; } } *smallerPtr = *largerPtr = 0; if (dictMode == ZSTD_dictMatchState && nbCompares) { bestLength = ZSTD_DUBT_findBetterDictMatch( ms, ip, iend, offsetPtr, bestLength, nbCompares, mls, dictMode); } assert(matchEndIdx > current+8); /* ensure nextToUpdate is increased */ ms->nextToUpdate = matchEndIdx - 8; /* skip repetitive patterns */ if (bestLength >= MINMATCH) { U32 const mIndex = current - ((U32)*offsetPtr - ZSTD_REP_MOVE); (void)mIndex; DEBUGLOG(8, "ZSTD_DUBT_findBestMatch(%u) : found match of length %u and offsetCode %u (pos %u)", current, (U32)bestLength, (U32)*offsetPtr, mIndex); } return bestLength; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_423850", "function_addr": 4339792, "binary_name": "8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "push r12"], [3, "push rbx"], [4, "sub rsp, 118h"], [5, "mov [rbp+var_108], rdi"], [6, "mov [rbp+var_110], rsi"], [7, "mov [rbp+var_118], rdx"], [8, "mov [rbp+var_120], rcx"], [9, "mov [rbp+var_124], r8d"], [10, "mov [rbp+var_128], r9d"], [11, "mov rax, [rbp+var_108]"], [12, "add rax, 0B0h"], [13, "mov [rbp+var_80], rax"], [14, "mov rax, [rbp+var_108]"], [15, "mov rax, [rax+30h]"], [16, "mov [rbp+var_88], rax"], [17, "mov rax, [rbp+var_80]"], [18, "mov eax, [rax+8]"], [19, "mov [rbp+var_8C], eax"], [20, "mov edx, [rbp+var_124]"], [21, "mov ecx, [rbp+var_8C]"], [22, "mov rax, [rbp+var_110]"], [23, "mov esi, ecx"], [24, "mov rdi, rax"], [25, "call sub_422E59"], [26, "mov [rbp+var_98], rax"], [27, "mov rax, [rbp+var_98]"], [28, "lea rdx, ds:0[rax*4]"], [29, "mov rax, [rbp+var_88]"], [30, "add rax, rdx"], [31, "mov eax, [rax]"], [32, "mov [rbp+var_14], eax"], [33, "mov rax, [rbp+var_108]"], [34, "mov rax, [rax+8]"], [35, "mov [rbp+var_A0], rax"], [36, "mov rax, [rbp+var_110]"], [37, "sub rax, [rbp+var_A0]"], [38, "mov [rbp+var_A4], eax"], [39, "mov rax, [rbp+var_108]"], [40, "mov eax, [rax+1Ch]"], [41, "mov [rbp+var_A8], eax"], [42, "mov rax, [rbp+var_108]"], [43, "mov rax, [rax+40h]"], [44, "mov [rbp+var_B0], rax"], [45, "mov rax, [rbp+var_80]"], [46, "mov eax, [rax+4]"], [47, "sub eax, 1"], [48, "mov [rbp+var_B4], eax"], [49, "mov eax, [rbp+var_B4]"], [50, "mov edx, 1"], [51, "mov ecx, eax"], [52, "shl edx, cl"], [53, "mov eax, edx"], [54, "sub eax, 1"], [55, "mov [rbp+var_B8], eax"], [56, "mov eax, [rbp+var_B8]"], [57, "cmp eax, [rbp+var_A4]"], [58, "jnb short loc_423988"], [59, "mov eax, [rbp+var_A4]"], [60, "sub eax, [rbp+var_B8]"], [61, "jmp short loc_42398D"], [62, "mov eax, 0"], [63, "mov [rbp+var_BC], eax"], [64, "mov eax, [rbp+var_BC]"], [65, "cmp [rbp+var_A8], eax"], [66, "cmovnb eax, [rbp+var_A8]"], [67, "mov [rbp+var_C0], eax"], [68, "mov eax, [rbp+var_14]"], [69, "and eax, [rbp+var_B8]"], [70, "add eax, eax"], [71, "mov eax, eax"], [72, "lea rdx, ds:0[rax*4]"], [73, "mov rax, [rbp+var_B0]"], [74, "add rax, rdx"], [75, "mov [rbp+var_20], rax"], [76, "mov eax, [rbp+var_14]"], [77, "and eax, [rbp+var_B8]"], [78, "add eax, eax"], [79, "mov eax, eax"], [80, "add rax, 1"], [81, "lea rdx, ds:0[rax*4]"], [82, "mov rax, [rbp+var_B0]"], [83, "add rax, rdx"], [84, "mov [rbp+var_28], rax"], [85, "mov rax, [rbp+var_80]"], [86, "mov eax, [rax+0Ch]"], [87, "mov edx, 1"], [88, "mov ecx, eax"], [89, "shl edx, cl"], [90, "mov eax, edx"], [91, "mov [rbp+var_2C], eax"], [92, "mov eax, [rbp+var_2C]"], [93, "mov [rbp+var_30], eax"], [94, "mov [rbp+var_34], 0"], [95, "jmp short loc_423A80"], [96, "mov rax, [rbp+var_28]"], [97, "mov edx, [rbp+var_34]"], [98, "mov [rax], edx"], [99, "mov eax, [rbp+var_14]"], [100, "mov [rbp+var_34], eax"], [101, "mov rax, [rbp+var_20]"], [102, "mov eax, [rax]"], [103, "mov [rbp+var_14], eax"], [104, "mov eax, [rbp+var_14]"], [105, "and eax, [rbp+var_B8]"], [106, "add eax, eax"], [107, "mov eax, eax"], [108, "lea rdx, ds:0[rax*4]"], [109, "mov rax, [rbp+var_B0]"], [110, "add rax, rdx"], [111, "mov [rbp+var_20], rax"], [112, "mov eax, [rbp+var_14]"], [113, "and eax, [rbp+var_B8]"], [114, "add eax, eax"], [115, "mov eax, eax"], [116, "add rax, 1"], [117, "lea rdx, ds:0[rax*4]"], [118, "mov rax, [rbp+var_B0]"], [119, "add rax, rdx"], [120, "mov [rbp+var_28], rax"], [121, "sub [rbp+var_30], 1"], [122, "mov eax, [rbp+var_14]"], [123, "cmp eax, [rbp+var_C0]"], [124, "jbe short loc_423AA0"], [125, "mov rax, [rbp+var_28]"], [126, "mov eax, [rax]"], [127, "cmp eax, 1"], [128, "jnz short loc_423AA0"], [129, "cmp [rbp+var_30], 1"], [130, "ja loc_423A1A"], [131, "mov eax, [rbp+var_14]"], [132, "cmp eax, [rbp+var_C0]"], [133, "jbe short loc_423ACC"], [134, "mov rax, [rbp+var_28]"], [135, "mov eax, [rax]"], [136, "cmp eax, 1"], [137, "jnz short loc_423ACC"], [138, "mov rax, [rbp+var_28]"], [139, "mov dword ptr [rax], 0"], [140, "mov rax, [rbp+var_28]"], [141, "mov edx, [rax]"], [142, "mov rax, [rbp+var_20]"], [143, "mov [rax], edx"], [144, "mov eax, [rbp+var_34]"], [145, "mov [rbp+var_14], eax"], [146, "jmp short loc_423B49"], [147, "mov eax, [rbp+var_14]"], [148, "and eax, [rbp+var_B8]"], [149, "add eax, eax"], [150, "mov eax, eax"], [151, "add rax, 1"], [152, "lea rdx, ds:0[rax*4]"], [153, "mov rax, [rbp+var_B0]"], [154, "add rax, rdx"], [155, "mov [rbp+var_F8], rax"], [156, "mov rax, [rbp+var_F8]"], [157, "mov eax, [rax]"], [158, "mov [rbp+var_FC], eax"], [159, "mov r8d, [rbp+var_128]"], [160, "mov edi, [rbp+var_C0]"], [161, "mov ecx, [rbp+var_30]"], [162, "mov rdx, [rbp+var_118]"], [163, "mov esi, [rbp+var_14]"], [164, "mov rax, [rbp+var_108]"], [165, "mov r9d, r8d"], [166, "mov r8d, edi"], [167, "mov rdi, rax"], [168, "call sub_4230D7"], [169, "mov eax, [rbp+var_FC]"], [170, "mov [rbp+var_14], eax"], [171, "add [rbp+var_30], 1"], [172, "cmp [rbp+var_14], 0"], [173, "jnz short loc_423AD4"], [174, "mov [rbp+var_40], 0"], [175, "mov [rbp+var_48], 0"], [176, "mov rax, [rbp+var_108]"], [177, "mov rax, [rax+10h]"], [178, "mov [rbp+var_C8], rax"], [179, "mov rax, [rbp+var_108]"], [180, "mov eax, [rax+18h]"], [181, "mov [rbp+var_CC], eax"], [182, "mov edx, [rbp+var_CC]"], [183, "mov rax, [rbp+var_C8]"], [184, "add rax, rdx"], [185, "mov [rbp+var_D8], rax"], [186, "mov edx, [rbp+var_CC]"], [187, "mov rax, [rbp+var_A0]"], [188, "add rax, rdx"], [189, "mov [rbp+var_E0], rax"], [190, "mov eax, [rbp+var_A4]"], [191, "and eax, [rbp+var_B8]"], [192, "add eax, eax"], [193, "mov eax, eax"], [194, "lea rdx, ds:0[rax*4]"], [195, "mov rax, [rbp+var_B0]"], [196, "add rax, rdx"], [197, "mov [rbp+var_50], rax"], [198, "mov eax, [rbp+var_A4]"], [199, "and eax, [rbp+var_B8]"], [200, "add eax, eax"], [201, "mov eax, eax"], [202, "add rax, 1"], [203, "lea rdx, ds:0[rax*4]"], [204, "mov rax, [rbp+var_B0]"], [205, "add rax, rdx"], [206, "mov [rbp+var_58], rax"], [207, "mov eax, [rbp+var_A4]"], [208, "add eax, 9"], [209, "mov [rbp+var_5C], eax"], [210, "mov [rbp+var_68], 0"], [211, "mov rax, [rbp+var_98]"], [212, "lea rdx, ds:0[rax*4]"], [213, "mov rax, [rbp+var_88]"], [214, "add rax, rdx"], [215, "mov eax, [rax]"], [216, "mov [rbp+var_14], eax"], [217, "mov rax, [rbp+var_98]"], [218, "lea rdx, ds:0[rax*4]"], [219, "mov rax, [rbp+var_88]"], [220, "add rdx, rax"], [221, "mov eax, [rbp+var_A4]"], [222, "mov [rdx], eax"], [223, "jmp loc_423ED9"], [224, "mov eax, [rbp+var_14]"], [225, "and eax, [rbp+var_B8]"], [226, "add eax, eax"], [227, "mov eax, eax"], [228, "lea rdx, ds:0[rax*4]"], [229, "mov rax, [rbp+var_B0]"], [230, "add rax, rdx"], [231, "mov [rbp+var_E8], rax"], [232, "mov rax, [rbp+var_40]"], [233, "cmp [rbp+var_48], rax"], [234, "cmovbe rax, [rbp+var_48]"], [235, "mov [rbp+var_70], rax"], [236, "cmp [rbp+var_128], 1"], [237, "jnz short loc_423CAC"], [238, "mov edx, [rbp+var_14]"], [239, "mov rax, [rbp+var_70]"], [240, "add rdx, rax"], [241, "mov eax, [rbp+var_CC]"], [242, "cmp rdx, rax"], [243, "jb short loc_423CF0"], [244, "mov edx, [rbp+var_14]"], [245, "mov rax, [rbp+var_A0]"], [246, "add rax, rdx"], [247, "mov [rbp+var_78], rax"], [248, "mov rdx, [rbp+var_78]"], [249, "mov rax, [rbp+var_70]"], [250, "lea rsi, [rdx+rax]"], [251, "mov rdx, [rbp+var_110]"], [252, "mov rax, [rbp+var_70]"], [253, "lea rcx, [rdx+rax]"], [254, "mov rax, [rbp+var_118]"], [255, "mov rdx, rax"], [256, "mov rdi, rcx"], [257, "call sub_422A43"], [258, "add [rbp+var_70], rax"], [259, "jmp short loc_423D69"], [260, "mov edx, [rbp+var_14]"], [261, "mov rax, [rbp+var_C8]"], [262, "add rax, rdx"], [263, "mov [rbp+var_78], rax"], [264, "mov rdx, [rbp+var_78]"], [265, "mov rax, [rbp+var_70]"], [266, "lea rsi, [rdx+rax]"], [267, "mov rdx, [rbp+var_110]"], [268, "mov rax, [rbp+var_70]"], [269, "lea rdi, [rdx+rax]"], [270, "mov rcx, [rbp+var_E0]"], [271, "mov rdx, [rbp+var_D8]"], [272, "mov rax, [rbp+var_118]"], [273, "mov r8, rcx"], [274, "mov rcx, rdx"], [275, "mov rdx, rax"], [276, "call sub_422BC5"], [277, "add [rbp+var_70], rax"], [278, "mov edx, [rbp+var_14]"], [279, "mov rax, [rbp+var_70]"], [280, "add rdx, rax"], [281, "mov eax, [rbp+var_CC]"], [282, "cmp rdx, rax"], [283, "jb short loc_423D69"], [284, "mov edx, [rbp+var_14]"], [285, "mov rax, [rbp+var_A0]"], [286, "add rax, rdx"], [287, "mov [rbp+var_78], rax"], [288, "mov rax, [rbp+var_70]"], [289, "cmp rax, [rbp+var_68]"], [290, "jbe loc_423E2F"], [291, "mov eax, [rbp+var_5C]"], [292, "sub eax, [rbp+var_14]"], [293, "mov eax, eax"], [294, "cmp [rbp+var_70], rax"], [295, "jbe short loc_423D93"], [296, "mov rax, [rbp+var_70]"], [297, "mov edx, eax"], [298, "mov eax, [rbp+var_14]"], [299, "add eax, edx"], [300, "mov [rbp+var_5C], eax"], [301, "mov rax, [rbp+var_70]"], [302, "mov edx, eax"], [303, "mov rax, [rbp+var_68]"], [304, "mov ecx, eax"], [305, "mov eax, edx"], [306, "sub eax, ecx"], [307, "lea r12d, ds:0[rax*4]"], [308, "mov eax, [rbp+var_A4]"], [309, "sub eax, [rbp+var_14]"], [310, "add eax, 1"], [311, "mov edi, eax"], [312, "call sub_4228CA"], [313, "mov ebx, eax"], [314, "mov rax, [rbp+var_120]"], [315, "mov rax, [rax]"], [316, "add eax, 1"], [317, "mov edi, eax"], [318, "call sub_4228CA"], [319, "mov edx, eax"], [320, "mov eax, ebx"], [321, "sub eax, edx"], [322, "cmp r12d, eax"], [323, "jle short loc_423DFF"], [324, "mov rax, [rbp+var_70]"], [325, "mov [rbp+var_68], rax"], [326, "mov eax, [rbp+var_A4]"], [327, "sub eax, [rbp+var_14]"], [328, "add eax, 2"], [329, "mov edx, eax"], [330, "mov rax, [rbp+var_120]"], [331, "mov [rax], rdx"], [332, "mov rdx, [rbp+var_110]"], [333, "mov rax, [rbp+var_70]"], [334, "add rax, rdx"], [335, "cmp [rbp+var_118], rax"], [336, "jnz short loc_423E2F"], [337, "cmp [rbp+var_128], 2"], [338, "jnz loc_423EF7"], [339, "mov [rbp+var_2C], 0"], [340, "jmp loc_423EF7"], [341, "mov rdx, [rbp+var_78]"], [342, "mov rax, [rbp+var_70]"], [343, "add rax, rdx"], [344, "movzx edx, byte ptr [rax]"], [345, "mov rcx, [rbp+var_110]"], [346, "mov rax, [rbp+var_70]"], [347, "add rax, rcx"], [348, "movzx eax, byte ptr [rax]"], [349, "cmp dl, al"], [350, "jnb short loc_423E99"], [351, "mov rax, [rbp+var_50]"], [352, "mov edx, [rbp+var_14]"], [353, "mov [rax], edx"], [354, "mov rax, [rbp+var_70]"], [355, "mov [rbp+var_40], rax"], [356, "mov eax, [rbp+var_14]"], [357, "cmp eax, [rbp+var_BC]"], [358, "ja short loc_423E7B"], [359, "lea rax, [rbp+var_100]"], [360, "mov [rbp+var_50], rax"], [361, "jmp short loc_423EF8"], [362, "mov rax, [rbp+var_E8]"], [363, "add rax, 4"], [364, "mov [rbp+var_50], rax"], [365, "mov rax, [rbp+var_E8]"], [366, "mov eax, [rax+4]"], [367, "mov [rbp+var_14], eax"], [368, "jmp short loc_423ED9"], [369, "mov rax, [rbp+var_58]"], [370, "mov edx, [rbp+var_14]"], [371, "mov [rax], edx"], [372, "mov rax, [rbp+var_70]"], [373, "mov [rbp+var_48], rax"], [374, "mov eax, [rbp+var_14]"], [375, "cmp eax, [rbp+var_BC]"], [376, "ja short loc_423EC2"], [377, "lea rax, [rbp+var_100]"], [378, "mov [rbp+var_58], rax"], [379, "jmp short loc_423EF8"], [380, "mov rax, [rbp+var_E8]"], [381, "mov [rbp+var_58], rax"], [382, "mov rax, [rbp+var_E8]"], [383, "mov eax, [rax]"], [384, "mov [rbp+var_14], eax"], [385, "mov eax, [rbp+var_2C]"], [386, "lea edx, [rax-1]"], [387, "mov [rbp+var_2C], edx"], [388, "test eax, eax"], [389, "jz short loc_423EF8"], [390, "mov eax, [rbp+var_14]"], [391, "cmp eax, [rbp+var_A8]"], [392, "ja loc_423C57"], [393, "jmp short loc_423EF8"], [394, "nop"], [395, "mov rax, [rbp+var_58]"], [396, "mov dword ptr [rax], 0"], [397, "mov rax, [rbp+var_58]"], [398, "mov edx, [rax]"], [399, "mov rax, [rbp+var_50]"], [400, "mov [rax], edx"], [401, "cmp [rbp+var_128], 2"], [402, "jnz short loc_423F5F"], [403, "cmp [rbp+var_2C], 0"], [404, "jz short loc_423F5F"], [405, "mov r9d, [rbp+var_2C]"], [406, "mov r8, [rbp+var_68]"], [407, "mov rcx, [rbp+var_120]"], [408, "mov rdx, [rbp+var_118]"], [409, "mov rsi, [rbp+var_110]"], [410, "mov rax, [rbp+var_108]"], [411, "mov edi, [rbp+var_128]"], [412, "push rdi"], [413, "mov edi, [rbp+var_124]"], [414, "push rdi"], [415, "mov rdi, rax"], [416, "call sub_423461"], [417, "add rsp, 10h"], [418, "mov [rbp+var_68], rax"], [419, "mov eax, [rbp+var_5C]"], [420, "lea edx, [rax-8]"], [421, "mov rax, [rbp+var_108]"], [422, "mov [rax+24h], edx"], [423, "cmp [rbp+var_68], 2"], [424, "jbe short loc_423F93"], [425, "mov rax, [rbp+var_120]"], [426, "mov rax, [rax]"], [427, "mov edx, eax"], [428, "mov eax, [rbp+var_A4]"], [429, "sub eax, edx"], [430, "add eax, 2"], [431, "mov [rbp+var_EC], eax"], [432, "mov rax, [rbp+var_68]"], [433, "lea rsp, [rbp-10h]"], [434, "pop rbx"], [435, "pop r12"], [436, "pop rbp"], [437, "retn"]], "data_dep": [[11, 5], [12, 11], [13, 12], [14, 5], [15, 14], [16, 15], [17, 13], [18, 17], [19, 18], [20, 9], [21, 19], [22, 6], [23, 21], [24, 22], [26, 25], [27, 26], [28, 20], [29, 16], [30, 29], [30, 28], [31, 30], [32, 31], [33, 5], [34, 33], [35, 34], [36, 6], [37, 35], [37, 36], [38, 37], [39, 5], [40, 39], [41, 40], [42, 5], [43, 42], [44, 43], [45, 13], [46, 45], [47, 46], [48, 47], [49, 48], [51, 49], [52, 51], [52, 50], [53, 52], [54, 53], [55, 54], [56, 55], [57, 38], [57, 56], [58, 57], [59, 38], [60, 55], [60, 59], [63, 60], [63, 62], [64, 63], [65, 64], [65, 41], [66, 65], [66, 41], [67, 66], [68, 32], [69, 55], [69, 68], [70, 69], [71, 70], [72, 52], [73, 44], [74, 73], [74, 72], [75, 74], [76, 32], [77, 76], [77, 55], [78, 77], [79, 78], [80, 79], [81, 72], [82, 44], [83, 81], [83, 82], [84, 83], [85, 13], [86, 85], [88, 86], [89, 88], [89, 87], [90, 89], [91, 90], [92, 91], [93, 92], [96, 84], [96, 120], [97, 94], [97, 100], [98, 97], [98, 96], [99, 103], [99, 32], [100, 99], [101, 111], [101, 75], [102, 98], [102, 101], [103, 102], [104, 103], [105, 104], [105, 55], [106, 105], [107, 106], [108, 97], [109, 44], [110, 109], [110, 108], [111, 110], [112, 103], [113, 112], [113, 55], [114, 113], [115, 114], [116, 115], [117, 108], [118, 44], [119, 118], [119, 117], [120, 119], [121, 93], [121, 121], [122, 103], [122, 32], [123, 67], [123, 122], [124, 123], [125, 120], [125, 84], [126, 98], [126, 125], [127, 126], [128, 127], [129, 93], [129, 121], [130, 129], [131, 32], [131, 103], [132, 131], [132, 67], [133, 132], [134, 84], [134, 120], [135, 98], [135, 134], [136, 135], [137, 136], [138, 84], [138, 120], [139, 138], [140, 84], [140, 120], [141, 140], [141, 139], [142, 75], [142, 111], [143, 141], [143, 142], [144, 100], [144, 94], [145, 144], [147, 170], [147, 145], [148, 55], [148, 147], [149, 148], [150, 149], [151, 150], [152, 141], [152, 117], [152, 89], [152, 162], [153, 44], [154, 153], [154, 152], [155, 154], [156, 155], [157, 156], [157, 98], [157, 139], [157, 143], [158, 157], [159, 10], [160, 67], [161, 93], [161, 171], [161, 121], [162, 7], [163, 170], [163, 145], [164, 5], [165, 159], [166, 160], [167, 164], [169, 158], [170, 169], [171, 121], [171, 93], [171, 171], [172, 170], [172, 145], [173, 172], [176, 5], [177, 176], [177, 139], [177, 143], [177, 222], [177, 98], [178, 177], [179, 5], [180, 139], [180, 143], [180, 222], [180, 179], [180, 98], [181, 180], [182, 181], [183, 178], [184, 183], [184, 182], [185, 184], [186, 181], [187, 35], [188, 187], [188, 186], [189, 188], [190, 38], [191, 190], [191, 55], [192, 191], [193, 192], [194, 186], [195, 44], [196, 194], [196, 195], [197, 196], [198, 38], [199, 55], [199, 198], [200, 199], [201, 200], [202, 201], [203, 194], [204, 44], [205, 204], [205, 203], [206, 205], [207, 38], [208, 207], [209, 208], [211, 26], [212, 203], [213, 16], [214, 213], [214, 212], [215, 139], [215, 143], [215, 222], [215, 98], [215, 214], [216, 215], [217, 26], [218, 212], [219, 16], [220, 219], [220, 218], [221, 38], [222, 221], [222, 220], [224, 367], [224, 384], [224, 216], [225, 224], [225, 55], [226, 225], [227, 226], [228, 386], [229, 44], [230, 229], [230, 228], [231, 230], [232, 355], [232, 174], [233, 373], [233, 232], [233, 175], [234, 175], [234, 373], [234, 233], [235, 234], [236, 10], [237, 236], [238, 367], [238, 384], [238, 216], [239, 235], [240, 239], [240, 238], [241, 181], [242, 241], [242, 240], [243, 242], [244, 216], [244, 367], [244, 384], [245, 35], [246, 245], [246, 244], [247, 246], [248, 247], [249, 235], [250, 143], [250, 250], [250, 371], [250, 222], [250, 249], [250, 266], [250, 98], [250, 331], [250, 353], [250, 163], [250, 23], [250, 139], [251, 6], [252, 235], [253, 139], [253, 143], [253, 161], [253, 371], [253, 222], [253, 252], [253, 98], [253, 345], [253, 331], [253, 88], [253, 353], [254, 7], [255, 254], [256, 253], [258, 235], [258, 257], [260, 367], [260, 384], [260, 216], [261, 178], [262, 261], [262, 260], [263, 262], [264, 263], [265, 235], [266, 250], [266, 331], [266, 163], [266, 266], [266, 23], [266, 265], [266, 139], [266, 98], [266, 353], [266, 371], [266, 222], [266, 143], [267, 6], [268, 235], [269, 268], [269, 371], [269, 331], [269, 317], [269, 24], [269, 256], [269, 98], [269, 353], [269, 222], [269, 167], [269, 139], [269, 269], [269, 143], [270, 189], [271, 185], [272, 7], [273, 270], [274, 271], [275, 272], [277, 235], [277, 276], [278, 367], [278, 384], [278, 216], [279, 277], [280, 278], [280, 279], [281, 181], [282, 280], [282, 281], [283, 282], [284, 367], [284, 384], [284, 216], [285, 35], [286, 285], [286, 284], [287, 286], [288, 277], [288, 258], [289, 325], [289, 210], [289, 288], [290, 289], [291, 300], [291, 209], [292, 367], [292, 291], [292, 384], [292, 216], [293, 292], [294, 277], [294, 258], [294, 293], [295, 294], [296, 277], [296, 258], [297, 296], [298, 367], [298, 384], [298, 216], [299, 298], [299, 297], [300, 299], [301, 277], [301, 258], [302, 301], [303, 325], [303, 210], [304, 303], [305, 302], [306, 304], [306, 305], [307, 307], [308, 38], [309, 216], [309, 308], [309, 367], [309, 384], [310, 309], [311, 310], [313, 312], [314, 8], [315, 331], [315, 139], [315, 98], [315, 353], [315, 371], [315, 222], [315, 314], [315, 143], [316, 315], [317, 316], [319, 318], [320, 313], [321, 320], [321, 319], [322, 307], [322, 321], [323, 322], [324, 277], [324, 258], [325, 324], [326, 38], [327, 367], [327, 384], [327, 216], [327, 326], [328, 327], [329, 328], [330, 8], [331, 330], [331, 329], [332, 6], [333, 277], [333, 258], [334, 332], [334, 333], [335, 334], [335, 7], [336, 335], [337, 10], [338, 337], [341, 247], [341, 287], [341, 263], [342, 258], [342, 277], [343, 342], [343, 341], [344, 139], [344, 143], [344, 353], [344, 371], [344, 222], [344, 343], [344, 98], [344, 331], [345, 6], [346, 277], [346, 258], [347, 346], [347, 345], [348, 98], [348, 331], [348, 139], [348, 143], [348, 353], [348, 371], [348, 222], [348, 347], [349, 344], [349, 348], [350, 349], [351, 364], [351, 197], [352, 367], [352, 384], [352, 216], [353, 351], [353, 352], [354, 277], [354, 258], [355, 354], [356, 384], [356, 367], [356, 216], [357, 63], [357, 356], [358, 357], [359, 356], [360, 359], [362, 231], [363, 362], [364, 363], [365, 231], [366, 98], [366, 331], [366, 139], [366, 143], [366, 353], [366, 371], [366, 222], [366, 365], [367, 366], [369, 206], [369, 381], [370, 384], [370, 216], [370, 367], [371, 370], [371, 369], [372, 277], [372, 258], [373, 372], [374, 367], [374, 384], [374, 216], [375, 374], [375, 63], [376, 375], [377, 374], [378, 377], [380, 231], [381, 380], [382, 231], [383, 98], [383, 331], [383, 382], [383, 139], [383, 143], [383, 353], [383, 371], [383, 222], [384, 383], [385, 91], [385, 387], [386, 220], [386, 98], [386, 331], [386, 139], [386, 143], [386, 385], [386, 353], [386, 371], [386, 222], [386, 352], [386, 370], [387, 386], [388, 385], [389, 388], [390, 367], [390, 384], [390, 216], [391, 41], [391, 390], [392, 391], [395, 381], [395, 378], [395, 206], [396, 395], [397, 378], [397, 206], [397, 381], [398, 397], [398, 396], [399, 360], [399, 364], [399, 197], [400, 398], [400, 399], [401, 10], [402, 401], [403, 387], [403, 339], [404, 403], [405, 387], [405, 339], [406, 210], [406, 325], [407, 8], [408, 7], [409, 6], [410, 5], [411, 10], [412, 411], [413, 9], [414, 413], [415, 410], [417, 4], [418, 416], [419, 300], [419, 209], [420, 419], [420, 400], [420, 139], [420, 422], [420, 143], [420, 408], [420, 353], [420, 371], [420, 222], [420, 398], [420, 396], [420, 98], [420, 331], [421, 5], [422, 421], [422, 420], [423, 325], [423, 418], [423, 210], [424, 423], [425, 8], [426, 98], [426, 331], [426, 396], [426, 400], [426, 139], [426, 143], [426, 353], [426, 371], [426, 222], [426, 422], [426, 425], [427, 426], [428, 38], [429, 428], [429, 427], [430, 429], [431, 430], [432, 210], [432, 325], [432, 418], [433, 417], [433, 4], [434, 3], [435, 2], [436, 0], [437, 432]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n 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_423850", "query": "\n\n\nchar *__fastcall sub_423850(__int64 a1, unsigned int *a2, unsigned __int64 a3, _QWORD *a4, unsigned int a5, int a6)\n{\nunsigned int v6; // eax\nchar *v7; // rax\nint v8; // ebx\nint v9; // eax\nchar v15[4]; // [rsp+28h] [rbp-100h] BYREF\nunsigned int v16; // [rsp+2Ch] [rbp-FCh]\nint *v17; // [rsp+30h] [rbp-F8h]\nint v18; // [rsp+3Ch] [rbp-ECh]\nunsigned int *v19; // [rsp+40h] [rbp-E8h]\n__int64 v20; // [rsp+48h] [rbp-E0h]\nchar *v21; // [rsp+50h] [rbp-D8h]\nunsigned int v22; // [rsp+5Ch] [rbp-CCh]\n__int64 v23; // [rsp+60h] [rbp-C8h]\nunsigned int v24; // [rsp+68h] [rbp-C0h]\nunsigned int v25; // [rsp+6Ch] [rbp-BCh]\nunsigned int v26; // [rsp+70h] [rbp-B8h]\nint v27; // [rsp+74h] [rbp-B4h]\n__int64 v28; // [rsp+78h] [rbp-B0h]\nunsigned int v29; // [rsp+80h] [rbp-A8h]\nunsigned int v30; // [rsp+84h] [rbp-A4h]\n__int64 v31; // [rsp+88h] [rbp-A0h]\n__int64 v32; // [rsp+90h] [rbp-98h]\nint v33; // [rsp+9Ch] [rbp-8Ch]\n__int64 v34; // [rsp+A0h] [rbp-88h]\n__int64 v35; // [rsp+A8h] [rbp-80h]\n__int64 v36; // [rsp+B0h] [rbp-78h]\nchar *v37; // [rsp+B8h] [rbp-70h]\nchar *v38; // [rsp+C0h] [rbp-68h]\nunsigned int v39; // [rsp+CCh] [rbp-5Ch]\nchar *v40; // [rsp+D0h] [rbp-58h]\nchar *v41; // [rsp+D8h] [rbp-50h]\nchar *v42; // [rsp+E0h] [rbp-48h]\nchar *v43; // [rsp+E8h] [rbp-40h]\nunsigned int v44; // [rsp+F4h] [rbp-34h]\nunsigned int v45; // [rsp+F8h] [rbp-30h]\nint v46; // [rsp+FCh] [rbp-2Ch]\nunsigned int *v47; // [rsp+100h] [rbp-28h]\nunsigned int *v48; // [rsp+108h] [rbp-20h]\nunsigned int v49; // [rsp+114h] [rbp-14h]\n\nv35 = a1 + 176;\nv34 = *(_QWORD *)(a1 + 48);\nv33 = *(_DWORD *)(a1 + 184);\nv32 = sub_422E59(a2, v33, a5);\nv49 = *(_DWORD *)(4 * v32 + v34);\nv31 = *(_QWORD *)(a1 + 8);\nv30 = (_DWORD)a2 - v31;\nv29 = *(_DWORD *)(a1 + 28);\nv28 = *(_QWORD *)(a1 + 64);\nv27 = *(_DWORD *)(a1 + 180) - 1;\nv26 = (1 << v27) - 1;\nif ( v26 >= (int)a2 - (int)v31 )\nv6 = 0;\nelse\nv6 = v30 - v26;\nv25 = v6;\nif ( v29 >= v6 )\nv6 = v29;\nv24 = v6;\nv48 = (unsigned int *)(8LL * (v26 & v49) + v28);\nv47 = (unsigned int *)(4 * (2 * (v26 & v49) + 1LL) + v28);\nv46 = 1 << *(_DWORD *)(v35 + 12);\nv45 = v46;\nv44 = 0;\nwhile ( v49 > v24 && *v47 == 1 && v45 > 1 )\n{\n*v47 = v44;\nv44 = v49;\nv49 = *v48;\nv48 = (unsigned int *)(8LL * (v26 & v49) + v28);\nv47 = (unsigned int *)(4 * (2 * (v26 & v49) + 1LL) + v28);\n--v45;\n}\nif ( v49 > v24 && *v47 == 1 )\n{\n*v47 = 0;\n*v48 = *v47;\n}\nv49 = v44;\nwhile ( v49 )\n{\nv17 = (int *)(4 * (2 * (v26 & v49) + 1LL) + v28);\nv16 = *v17;\nsub_4230D7(a1, v49, a3, v45, v24, a6);\nv49 = v16;\n++v45;\n}\nv43 = 0LL;\nv42 = 0LL;\nv23 = *(_QWORD *)(a1 + 16);\nv22 = *(_DWORD *)(a1 + 24);\nv21 = (char *)(v22 + v23);\nv20 = v22 + v31;\nv41 = (char *)(8LL * (v26 & v30) + v28);\nv40 = (char *)(4 * (2 * (v26 & v30) + 1LL) + v28);\nv39 = v30 + 9;\nv38 = 0LL;\nv49 = *(_DWORD *)(4 * v32 + v34);\n*(_DWORD *)(v34 + 4 * v32) = v30;\nwhile ( 1 )\n{\nv9 = v46--;\nif ( !v9 || v49 <= v29 )\nbreak;\nv19 = (unsigned int *)(8LL * (v26 & v49) + v28);\nv7 = v43;\nif ( v42 <= v43 )\nv7 = v42;\nv37 = v7;\nif ( a6 == 1 && (unsigned __int64)&v37[v49] < v22 )\n{\nv36 = v49 + v23;\nv37 = &v37[(_QWORD)sub_422BC5((unsigned __int64)&v37[(_QWORD)a2], (__int64)&v37[v36], a3, v21, v20)];\nif ( (unsigned __int64)&v37[v49] >= v22 )\nv36 = v49 + v31;\n}\nelse\n{\nv36 = v49 + v31;\nv37 = &v37[(_QWORD)sub_422A43((unsigned __int64)&v37[(_QWORD)a2], (__int64)&v37[v36], a3)];\n}\nif ( v37 > v38 )\n{\nif ( (unsigned __int64)v37 > v39 - v49 )\nv39 = (_DWORD)v37 + v49;\nv8 = sub_4228CA(v30 - v49 + 1);\nif ( 4 * ((int)v37 - (int)v38) > (int)(v8 - sub_4228CA((unsigned int)*a4 + 1)) )\n{\nv38 = v37;\n*a4 = v30 - v49 + 2;\n}\nif ( (char *)a3 == &v37[(_QWORD)a2] )\n{\nif ( a6 == 2 )\nv46 = 0;\nbreak;\n}\n}\nif ( (unsigned __int8)v37[v36] >= (unsigned int)v37[(_QWORD)a2] )\n{\n*(_DWORD *)v40 = v49;\nv42 = v37;\nif ( v49 <= v25 )\n{\nv40 = v15;\nbreak;\n}\nv40 = (char *)v19;\nv49 = *v19;\n}\nelse\n{\n*(_DWORD *)v41 = v49;\nv43 = v37;\nif ( v49 <= v25 )\n{\nv41 = v15;\nbreak;\n}\nv41 = (char *)(v19 + 1);\nv49 = v19[1];\n}\n}\n*(_DWORD *)v40 = 0;\n*(_DWORD *)v41 = *(_DWORD *)v40;\nif ( a6 == 2 && v46 )\nv38 = sub_423461(a1, a2, a3, a4, v38, v46, a5);\n*(_DWORD *)(a1 + 36) = v39 - 8;\nif ( (unsigned __int64)v38 > 2 )\nv18 = v30 - *a4 + 2;\nreturn v38;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30,v31,v32,v33,v34,v35,v36,v37,v38,v39,v40,v41,v42,v43,v44,v45,v46,v47,v48,v49,sub_423850,sub_422E59,sub_4230D7,sub_422BC5,sub_422A43,sub_4228CA,sub_423461,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'iend', 'a4': 'offsetPtr', 'a1': 'ms', 'a2': 'ip_0', 'a5': 'mls', 'a6': 'dictMode', 'v15': 'dummy32', 'v16': 'nextCandidateIdx', 'v17': 'nextCandidateIdxPtr', 'v18': 'mIndex', 'v19': 'nextPtr', 'v20': 'prefixStart', 'v21': 'dictEnd', 'v22': 'dictLimit', 'v23': 'dictBase', 'v24': 'unsortLimit', 'v25': 'btLow', 'v26': 'btMask', 'v27': 'btLog', 'v28': 'bt', 'v29': 'windowLow', 'v30': 'current', 'v31': 'base', 'v32': 'h', 'v33': 'hashLog', 'v34': 'hashTable', 'v35': 'cParams', 'v36': 'match', 'v37': 'matchLength', 'v38': 'bestLength', 'v39': 'matchEndIdx', 'v40': 'largerPtr', 'v41': 'smallerPtr', 'v42': 'commonLengthLarger', 'v43': 'commonLengthSmaller', 'v44': 'previousCandidate', 'v45': 'nbCandidates', 'v46': 'nbCompares', 'v47': 'unsortedMark', 'v48': 'nextCandidate', 'v49': 'matchIndex', 'sub_423850': 'ZSTD_DUBT_findBestMatch', 'sub_422E59': 'ZSTD_hashPtr_1', 'sub_4230D7': 'ZSTD_insertDUBT1', 'sub_422BC5': 'ZSTD_count_2segments_1', 'sub_422A43': 'ZSTD_count_1', 'sub_4228CA': 'ZSTD_highbit32_0', 'sub_423461': 'ZSTD_DUBT_findBetterDictMatch'}"}
explain
5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0
multipath-tcp
iproute-mptcp
NA
static void explain(void) { fprintf(stderr, "Usage: ... codel [ limit PACKETS ] [ target TIME ]\n" " [ interval TIME ] [ ecn | noecn ]\n" " [ ce_threshold TIME ]\n"); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4505D7", "function_addr": 4523479, "binary_name": "5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov rax, cs:stderr"], [3, "mov rcx, rax"], [4, "mov edx, 71h "], [5, "mov esi, 1"], [6, "mov edi, offset aUsageCodelLimi"], [7, "call _fwrite"], [8, "nop"], [9, "pop rbp"], [10, "retn"]], "data_dep": [[3, 2], [9, 0], [10, 7]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0_5c2a369c2a43bfe06e48866e92fbdc8c356c46190477983799d2e15f105ed3e0.jsonl.gz", "strip_func_name": "sub_4505D7", "query": "\n\n\nsize_t sub_4505D7()\n{\nreturn fwrite(\n\"Usage: ... codel [ limit PACKETS ] [ target TIME ]\\n\"\n\"\\t\\t [ interval TIME ] [ ecn | noecn ]\\n\"\n\"\\t\\t [ ce_threshold TIME ]\\n\",\n1uLL,\n0x71uLL,\nstderr);\n}\n\n\n\nQ:[sub_4505D7,]\nAssistant: ", "hints": "[]", "response": "{'sub_4505D7': 'explain_43'}"}
BN_num_bits
6df0f62e3ac41390b2b280a4e68d934e13d10af667230d7998a353d0c4c5cc60
BPI-SINOVOIP
BPI-OpenWRT
NA
int BN_num_bits(const BIGNUM *a) { BN_ULONG l; int i; bn_check_top(a); if (a->top == 0) return(0); l=a->d[a->top-1]; assert(l != 0); i=(a->top-1)*BN_BITS2; return(i+BN_num_bits_word(l)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40C804", "function_addr": 4245508, "binary_name": "6df0f62e3ac41390b2b280a4e68d934e13d10af667230d7998a353d0c4c5cc60.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 18h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rax, [rbp+var_18]"], [5, "mov eax, [rax+8]"], [6, "test eax, eax"], [7, "jnz short loc_40C822"], [8, "mov eax, 0"], [9, "jmp short locret_40C865"], [10, "mov rax, [rbp+var_18]"], [11, "mov rdx, [rax]"], [12, "mov rax, [rbp+var_18]"], [13, "mov eax, [rax+8]"], [14, "cdqe"], [15, "shl rax, 3"], [16, "sub rax, 8"], [17, "add rax, rdx"], [18, "mov rax, [rax]"], [19, "mov [rbp+var_8], rax"], [20, "mov rax, [rbp+var_18]"], [21, "mov eax, [rax+8]"], [22, "sub eax, 1"], [23, "shl eax, 6"], [24, "mov [rbp+var_C], eax"], [25, "mov rax, [rbp+var_8]"], [26, "mov rdi, rax"], [27, "call sub_40C6B5"], [28, "mov edx, [rbp+var_C]"], [29, "add eax, edx"], [30, "leave"], [31, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [7, 6], [10, 3], [11, 10], [12, 3], [13, 12], [15, 13], [16, 15], [17, 11], [17, 16], [18, 17], [19, 18], [20, 3], [21, 20], [22, 21], [23, 22], [24, 23], [25, 19], [26, 25], [28, 24], [29, 28], [29, 27], [31, 8], [31, 29]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/6df0f62e3ac41390b2b280a4e68d934e13d10af667230d7998a353d0c4c5cc60_6df0f62e3ac41390b2b280a4e68d934e13d10af667230d7998a353d0c4c5cc60.jsonl.gz", "strip_func_name": "sub_40C804", "query": "\n\n\n__int64 __fastcall sub_40C804(__int64 a1)\n{\nint v2; // [rsp+Ch] [rbp-Ch]\n\nif ( !*(_DWORD *)(a1 + 8) )\nreturn 0LL;\nv2 = (*(_DWORD *)(a1 + 8) - 1) << 6;\nreturn v2 + (unsigned int)sub_40C6B5(*(_QWORD *)(*(_QWORD *)a1 + 8LL * *(int *)(a1 + 8) - 8));\n}\n\n\n\nQ:[a1,sub_40C804,sub_40C6B5,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'a', 'sub_40C804': 'BN_num_bits', 'sub_40C6B5': 'BN_num_bits_word'}"}
insert_xml_node
09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7
imatix
gsl
NA
MODULE insert_xml_node (THREAD *thread) { tcb = thread-> tcb; /* Point to thread's context */ insert_simple_node (GG_XML); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41A547", "function_addr": 4302151, "binary_name": "09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov rax, [rbp+var_8]"], [5, "mov rax, [rax+30h]"], [6, "mov cs:qword_49FB30, rax"], [7, "mov edi, 26h "], [8, "call sub_41845B"], [9, "nop"], [10, "leave"], [11, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [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/09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7_09e593e1a10a4f6cadf5c016cb4c8cfb0a3586515f0619eba999737feb58c9d7.jsonl.gz", "strip_func_name": "sub_41A547", "query": "\n\n\n__int64 __fastcall sub_41A547(__int64 a1)\n{\nqword_49FB30 = *(_QWORD *)(a1 + 48);\nreturn sub_41845B(38);\n}\n\n\n\nQ:[a1,sub_41A547,sub_41845B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'thread', 'sub_41A547': 'insert_xml_node', 'sub_41845B': 'insert_simple_node'}"}
textyedge
8ae2ab0464f0ac96a7fdeccbe9109d753af18ecfd065336c7a6978a11512a7eb
stardot
MatrixBrandy
NA
static int32 textyedge(void) { if (vdu2316byte & 4) return twintop; return twinbottom; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41469D", "function_addr": 4277917, "binary_name": "8ae2ab0464f0ac96a7fdeccbe9109d753af18ecfd065336c7a6978a11512a7eb.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "movzx eax, cs:byte_47CD24"], [3, "movzx eax, al"], [4, "and eax, 4"], [5, "test eax, eax"], [6, "jz short loc_4146BA"], [7, "mov eax, cs:dword_483144"], [8, "jmp short loc_4146C0"], [9, "mov eax, cs:dword_483148"], [10, "pop rbp"], [11, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [10, 0], [11, 7], [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/8ae2ab0464f0ac96a7fdeccbe9109d753af18ecfd065336c7a6978a11512a7eb_8ae2ab0464f0ac96a7fdeccbe9109d753af18ecfd065336c7a6978a11512a7eb.jsonl.gz", "strip_func_name": "sub_41469D", "query": "\n\n\n__int64 sub_41469D()\n{\n__int64 result; // rax\n\nif ( (byte_47CD24 & 4) != 0 )\nresult = (unsigned int)dword_483144;\nelse\nresult = (unsigned int)dword_483148;\nreturn result;\n}\n\n\n\nQ:[sub_41469D,]\nAssistant: ", "hints": "[]", "response": "{'sub_41469D': 'textyedge'}"}
errMax
1ac925d894a20d994a1cbc6c6fc0883208c23aa1c414bbc036efd491ff15476d
stevengj
cubature
NA
static double errMax(unsigned fdim, const esterr *ee) { double errmax = 0; unsigned k; for (k = 0; k < fdim; ++k) if (ee[k].err > errmax) errmax = ee[k].err; return errmax; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40236C", "function_addr": 4203372, "binary_name": "1ac925d894a20d994a1cbc6c6fc0883208c23aa1c414bbc036efd491ff15476d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_14], edi"], [3, "mov [rbp+var_20], rsi"], [4, "pxor xmm0, xmm0"], [5, "movsd [rbp+var_8], xmm0"], [6, "mov [rbp+var_C], 0"], [7, "jmp short loc_4023C5"], [8, "mov eax, [rbp+var_C]"], [9, "shl rax, 4"], [10, "mov rdx, rax"], [11, "mov rax, [rbp+var_20]"], [12, "add rax, rdx"], [13, "movsd xmm0, qword ptr [rax+8]"], [14, "comisd xmm0, [rbp+var_8]"], [15, "jbe short loc_4023C1"], [16, "mov eax, [rbp+var_C]"], [17, "shl rax, 4"], [18, "mov rdx, rax"], [19, "mov rax, [rbp+var_20]"], [20, "add rax, rdx"], [21, "movsd xmm0, qword ptr [rax+8]"], [22, "movsd [rbp+var_8], xmm0"], [23, "add [rbp+var_C], 1"], [24, "mov eax, [rbp+var_C]"], [25, "cmp eax, [rbp+var_14]"], [26, "jb short loc_402389"], [27, "movsd xmm0, [rbp+var_8]"], [28, "movq rax, xmm0"], [29, "movq xmm0, rax"], [30, "pop rbp"], [31, "retn"]], "data_dep": [[5, 4], [8, 6], [8, 23], [9, 8], [10, 9], [11, 3], [12, 10], [12, 11], [13, 12], [14, 13], [14, 22], [14, 5], [15, 12], [16, 6], [16, 23], [17, 16], [18, 17], [19, 3], [20, 19], [20, 18], [21, 20], [22, 21], [23, 6], [23, 23], [24, 23], [24, 6], [25, 24], [25, 2], [26, 25], [27, 22], [27, 5], [28, 27], [29, 28], [30, 0], [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/1ac925d894a20d994a1cbc6c6fc0883208c23aa1c414bbc036efd491ff15476d_1ac925d894a20d994a1cbc6c6fc0883208c23aa1c414bbc036efd491ff15476d.jsonl.gz", "strip_func_name": "sub_40236C", "query": "\n\n\ndouble __fastcall sub_40236C(unsigned int a1, __int64 a2)\n{\nunsigned int i; // [rsp+14h] [rbp-Ch]\ndouble v4; // [rsp+18h] [rbp-8h]\n\nv4 = 0.0;\nfor ( i = 0; i < a1; ++i )\n{\nif ( *(double *)(16LL * i + a2 + 8) > v4 )\nv4 = *(double *)(16LL * i + a2 + 8);\n}\nreturn v4;\n}\n\n\n\nQ:[a1,a2,v4,sub_40236C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'fdim', 'a2': 'ee', 'v4': 'errmax', 'sub_40236C': 'errMax'}"}
d68040_move16_al_pi
d6f1c4fccbb8fc2066c0c7749389636df7b33c67e152dc8852a86b3a79bd4c3d
google
honggfuzz
NA
static void d68040_move16_al_pi(m68k_info *info) { int data[] = { read_imm_32(info), info->ir & 7 }; int modes[] = { M68K_AM_ABSOLUTE_DATA_LONG, M68K_AM_REGI_ADDR_POST_INC }; LIMIT_CPU_TYPES(info, M68040_PLUS); build_move16(info, data, modes); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4A5D64", "function_addr": 4873572, "binary_name": "d6f1c4fccbb8fc2066c0c7749389636df7b33c67e152dc8852a86b3a79bd4c3d.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rax, [rbp+var_18]"], [5, "mov rdi, rax"], [6, "call sub_4A09DE"], [7, "mov [rbp+var_8], eax"], [8, "mov rax, [rbp+var_18]"], [9, "mov eax, [rax+24h]"], [10, "and eax, 7"], [11, "mov [rbp+var_4], eax"], [12, "mov [rbp+var_10], 11h"], [13, "mov [rbp+var_C], 4"], [14, "mov rax, [rbp+var_18]"], [15, "mov eax, [rax+28h]"], [16, "and eax, 10h"], [17, "test eax, eax"], [18, "jnz short loc_4A5DB6"], [19, "mov rax, [rbp+var_18]"], [20, "mov rdi, rax"], [21, "call sub_4A26DC"], [22, "jmp short locret_4A5DCD"], [23, "lea rdx, [rbp+var_10]"], [24, "lea rcx, [rbp+var_8]"], [25, "mov rax, [rbp+var_18]"], [26, "mov rsi, rcx"], [27, "mov rdi, rax"], [28, "call sub_4A21E7"], [29, "leave"], [30, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 3], [9, 8], [10, 9], [11, 10], [14, 3], [15, 14], [16, 15], [17, 16], [18, 17], [19, 3], [20, 19], [23, 12], [24, 7], [25, 3], [26, 24], [27, 25], [30, 21], [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/d6f1c4fccbb8fc2066c0c7749389636df7b33c67e152dc8852a86b3a79bd4c3d_d6f1c4fccbb8fc2066c0c7749389636df7b33c67e152dc8852a86b3a79bd4c3d.jsonl.gz", "strip_func_name": "sub_4A5D64", "query": "\n\n\n__int64 __fastcall sub_4A5D64(__int64 a1)\n{\n__int64 result; // rax\nint v2[2]; // [rsp+10h] [rbp-10h] BYREF\nint v3[2]; // [rsp+18h] [rbp-8h] BYREF\n\nv3[0] = sub_4A09DE(a1);\nv3[1] = *(_DWORD *)(a1 + 36) & 7;\nv2[0] = 17;\nv2[1] = 4;\nif ( (*(_DWORD *)(a1 + 40) & 0x10) != 0 )\nresult = sub_4A21E7(a1, (__int64)v3, (__int64)v2);\nelse\nresult = sub_4A26DC(a1);\nreturn result;\n}\n\n\n\nQ:[a1,v2,v3,sub_4A5D64,sub_4A09DE,sub_4A21E7,sub_4A26DC,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'info', 'v2': 'modes', 'v3': 'data', 'sub_4A5D64': 'd68040_move16_al_pi', 'sub_4A09DE': 'read_imm_32', 'sub_4A21E7': 'build_move16', 'sub_4A26DC': 'd68000_invalid'}"}
PostDec
cc514aea46329b2bbe7d1ede9a05315966bd71bcf8cc0ff6e5ffa267e88c9796
reidrac
dan64
NA
static void PostDec (ExprDesc* Expr) /* Handle the postdecrement operator */ { unsigned Flags; NextToken (); /* The expression to increment must be an lvalue */ if (!ED_IsLVal (Expr)) { Error ("Invalid lvalue"); return; } /* We cannot modify const values */ if (IsQualConst (Expr->Type)) { Error ("Decrement of read-only variable"); } /* Get the data type */ Flags = TypeOf (Expr->Type); /* Push the address if needed */ PushAddr (Expr); /* Fetch the value and save it (since it's the result of the expression) */ LoadExpr (CF_NONE, Expr); g_save (Flags | CF_FORCECHAR); /* If we have a pointer expression, increment by the size of the type */ if (IsTypePtr (Expr->Type)) { g_dec (Flags | CF_CONST | CF_FORCECHAR, CheckedSizeOf (Expr->Type + 1)); } else { g_dec (Flags | CF_CONST | CF_FORCECHAR, 1); } /* Store the result back */ Store (Expr, 0); /* Restore the original value in the primary register */ g_restore (Flags | CF_FORCECHAR); /* The result is always an expression, no reference */ ED_MakeRValExpr (Expr); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43E043", "function_addr": 4448323, "binary_name": "cc514aea46329b2bbe7d1ede9a05315966bd71bcf8cc0ff6e5ffa267e88c9796.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_41C0B9"], [5, "mov rax, [rbp+var_18]"], [6, "mov rdi, rax"], [7, "call sub_43BB84"], [8, "test eax, eax"], [9, "jnz short loc_43E078"], [10, "mov edi, offset aInvalidLvalue"], [11, "mov eax, 0"], [12, "call sub_42C55B"], [13, "jmp locret_43E154"], [14, "mov rax, [rbp+var_18]"], [15, "mov rax, [rax+8]"], [16, "mov rdi, rax"], [17, "call sub_43BA9E"], [18, "test eax, eax"], [19, "jz short loc_43E09B"], [20, "mov edi, offset aDecrementOfRea"], [21, "mov eax, 0"], [22, "call sub_42C55B"], [23, "mov rax, [rbp+var_18]"], [24, "mov rax, [rax+8]"], [25, "mov rdi, rax"], [26, "call sub_43894D"], [27, "mov [rbp+var_4], eax"], [28, "mov rax, [rbp+var_18]"], [29, "mov rdi, rax"], [30, "call sub_43C0B9"], [31, "mov rax, [rbp+var_18]"], [32, "mov rsi, rax"], [33, "mov edi, 0"], [34, "call sub_4243FB"], [35, "mov eax, [rbp+var_4]"], [36, "or ah, 2"], [37, "mov edi, eax"], [38, "call sub_412D98"], [39, "mov rax, [rbp+var_18]"], [40, "mov rax, [rax+8]"], [41, "mov rdi, rax"], [42, "call sub_43B8D8"], [43, "test eax, eax"], [44, "jz short loc_43E116"], [45, "mov rax, [rbp+var_18]"], [46, "mov rax, [rax+8]"], [47, "add rax, 10h"], [48, "mov rdi, rax"], [49, "call sub_4388D5"], [50, "mov edx, eax"], [51, "mov eax, [rbp+var_4]"], [52, "or eax, 220h"], [53, "mov rsi, rdx"], [54, "mov edi, eax"], [55, "call sub_414DC2"], [56, "jmp short loc_43E12A"], [57, "mov eax, [rbp+var_4]"], [58, "or eax, 220h"], [59, "mov esi, 1"], [60, "mov edi, eax"], [61, "call sub_414DC2"], [62, "mov rax, [rbp+var_18]"], [63, "mov esi, 0"], [64, "mov rdi, rax"], [65, "call sub_43D98B"], [66, "mov eax, [rbp+var_4]"], [67, "or ah, 2"], [68, "mov edi, eax"], [69, "call sub_412E1A"], [70, "mov rax, [rbp+var_18]"], [71, "mov rdi, rax"], [72, "call sub_42B189"], [73, "leave"], [74, "retn"]], "data_dep": [[5, 3], [6, 5], [8, 7], [9, 8], [14, 3], [15, 14], [16, 15], [18, 17], [19, 18], [23, 3], [24, 23], [25, 24], [27, 26], [28, 3], [29, 28], [31, 3], [32, 31], [35, 27], [36, 35], [37, 36], [39, 3], [40, 39], [41, 40], [43, 42], [44, 43], [45, 3], [46, 45], [47, 46], [48, 47], [50, 49], [51, 27], [52, 51], [53, 50], [54, 52], [57, 27], [58, 57], [60, 58], [62, 3], [64, 62], [66, 27], [67, 66], [68, 67], [70, 3], [71, 70], [74, 12], [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/cc514aea46329b2bbe7d1ede9a05315966bd71bcf8cc0ff6e5ffa267e88c9796_cc514aea46329b2bbe7d1ede9a05315966bd71bcf8cc0ff6e5ffa267e88c9796.jsonl.gz", "strip_func_name": "sub_43E043", "query": "\n\n\n__int64 __fastcall sub_43E043(_QWORD *a1, __int64 a2, __int64 a3)\n{\n__int64 v3; // rdx\n__int64 v4; // rcx\n__int64 v5; // r8\n__int64 v6; // r9\n__int64 v8; // rdx\n__int64 v9; // rcx\n__int64 v10; // r8\n__int64 v11; // r9\n__int16 v12; // ax\n__int64 v13; // rdx\n__int64 v14; // rcx\n__int64 v15; // r8\n__int64 v16; // r9\n__int64 v17; // rdx\n__int64 v18; // rcx\n__int64 v19; // r8\n__int64 v20; // r9\nunsigned int v21; // eax\n__int64 v22; // rcx\n__int64 v23; // r8\n__int64 v24; // r9\n__int16 v25; // ax\n__int64 v26; // rdx\n__int64 v27; // rcx\n__int64 v28; // r8\n__int64 v29; // r9\nint v30; // [rsp+1Ch] [rbp-4h]\n\nsub_41C0B9((__int64)a1, a2, a3);\nif ( !sub_43BB84((__int64)a1) )\nreturn sub_42C55B(\"Invalid lvalue\", a2, v3, v4, v5, v6);\nif ( sub_43BA9E((_QWORD *)a1[1]) )\nsub_42C55B(\"Decrement of read-only variable\", a2, v8, v9, v10, v11);\nv30 = sub_43894D(a1[1]);\nsub_43C0B9((__int64)a1);\nsub_4243FB(0, (unsigned __int64)a1);\nLOBYTE(v12) = v30;\nHIBYTE(v12) = BYTE1(v30) | 2;\nsub_412D98(v12, (__int64)a1, v13, v14, v15, v16);\nif ( sub_43B8D8((_QWORD *)a1[1]) )\n{\nv21 = sub_4388D5((__int64 *)(a1[1] + 16LL), (__int64)a1);\nsub_414DC2(v30 | 0x220, v21, v21, v22, v23, v24);\n}\nelse\n{\nsub_414DC2(v30 | 0x220, 1uLL, v17, v18, v19, v20);\n}\nsub_43D98B(a1, 0LL);\nLOBYTE(v25) = v30;\nHIBYTE(v25) = BYTE1(v30) | 2;\nsub_412E1A(v25, 0LL, v26, v27, v28, v29);\nreturn sub_42B189((__int64)a1);\n}\n\n\n\nQ:[a1,v30,sub_43E043,sub_41C0B9,sub_43BB84,sub_42C55B,sub_43BA9E,sub_43894D,sub_43C0B9,sub_4243FB,sub_412D98,sub_43B8D8,sub_4388D5,sub_414DC2,sub_43D98B,sub_412E1A,sub_42B189,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'Expr', 'v30': 'Flags', 'sub_43E043': 'PostDec', 'sub_41C0B9': 'NextToken', 'sub_43BB84': 'ED_IsLVal_4', 'sub_42C55B': 'Error', 'sub_43BA9E': 'IsQualConst_2', 'sub_43894D': 'TypeOf', 'sub_43C0B9': 'PushAddr', 'sub_4243FB': 'LoadExpr', 'sub_412D98': 'g_save', 'sub_43B8D8': 'IsTypePtr_2', 'sub_4388D5': 'CheckedSizeOf', 'sub_414DC2': 'g_dec', 'sub_43D98B': 'Store', 'sub_412E1A': 'g_restore', 'sub_42B189': 'ED_MakeRValExpr'}"}
_op_mod
c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7
open-simh
simh
NA
static t_svalue _op_mod (t_svalue divisor, t_svalue dividend) { if (divisor != 0) return dividend % divisor; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_440BC7", "function_addr": 4459463, "binary_name": "c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7.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, "cmp [rbp+var_8], 0"], [5, "jz short loc_440BE9"], [6, "mov rax, [rbp+var_10]"], [7, "cqo"], [8, "idiv [rbp+var_8]"], [9, "mov rax, rdx"], [10, "jmp short loc_440BEE"], [11, "mov eax, 0"], [12, "pop rbp"], [13, "retn"]], "data_dep": [[4, 2], [5, 4], [6, 3], [8, 2], [12, 0], [13, 9], [13, 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/c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7_c0bdda158aca46d0badc1243ee55b1fe1912f6e65bb27050c715097b539c99f7.jsonl.gz", "strip_func_name": "sub_440BC7", "query": "\n\n\n__int64 __fastcall sub_440BC7(__int64 a1, __int64 a2)\n{\n__int64 result; // rax\n\nif ( a1 )\nresult = a2 % a1;\nelse\nresult = 0LL;\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_440BC7,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'divisor', 'a2': 'dividend', 'sub_440BC7': '_op_mod'}"}
fmsynthop_delete
9224249fb00fcb1441a62a65be326c655615d3a8caf5fcdfdd9fd3bcc657c3d7
apache
nuttx-apps
NA
void fmsynthop_delete(FAR fmsynth_op_t *op) { if (op != NULL && op->own_allocate == 1) { if (op->eg) { fmsyntheg_delete(op->eg); } free(op); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401910", "function_addr": 4200720, "binary_name": "9224249fb00fcb1441a62a65be326c655615d3a8caf5fcdfdd9fd3bcc657c3d7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+ptr], rdi"], [4, "cmp [rbp+ptr], 0"], [5, "jz short loc_40194A"], [6, "mov rax, [rbp+ptr]"], [7, "mov rax, [rax]"], [8, "test rax, rax"], [9, "jz short loc_40193E"], [10, "mov rax, [rbp+ptr]"], [11, "mov rax, [rax]"], [12, "mov rdi, rax"], [13, "call _free"], [14, "mov rax, [rbp+ptr]"], [15, "mov rdi, rax"], [16, "call _free"], [17, "nop"], [18, "leave"], [19, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 6], [8, 7], [9, 8], [10, 3], [11, 10], [12, 11], [14, 3], [15, 14], [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/9224249fb00fcb1441a62a65be326c655615d3a8caf5fcdfdd9fd3bcc657c3d7_9224249fb00fcb1441a62a65be326c655615d3a8caf5fcdfdd9fd3bcc657c3d7.jsonl.gz", "strip_func_name": "sub_401910", "query": "\n\n\nvoid __fastcall sub_401910(void **a1)\n{\nif ( a1 )\n{\nif ( *a1 )\nfree(*a1);\nfree(a1);\n}\n}\n\n\n\nQ:[a1,sub_401910,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'op', 'sub_401910': 'fmsynthop_delete'}"}
und_build_packet_param
8637b53fba300d2bbda36edc905b4ce0ac17bbe93b75784d9e0ff8ef770869f2
aliyun
haas-mini-program
NA
int und_build_packet_param(const char *content, char *param, int param_len) { int len = 0; UND_PTR_SANITY_CHECK(content, UND_PARAM_ERR); UND_PTR_SANITY_CHECK(param, UND_PARAM_ERR); UND_PARAM_RANGE_SANITY_CHECK(param_len, UND_REPORT_BUF_LEN_MAX, 1, UND_PARAM_ERR); len = aos_snprintf(param, param_len, UND_REPORT_PARAM_FMT, content); return len; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_488817", "function_addr": 4753431, "binary_name": "8637b53fba300d2bbda36edc905b4ce0ac17bbe93b75784d9e0ff8ef770869f2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_24], edx"], [6, "mov [rbp+var_4], 0"], [7, "cmp [rbp+var_18], 0"], [8, "jnz short loc_48883F"], [9, "mov eax, 0FFFFFFFDh"], [10, "jmp short locret_488889"], [11, "cmp [rbp+var_20], 0"], [12, "jnz short loc_48884D"], [13, "mov eax, 0FFFFFFFDh"], [14, "jmp short locret_488889"], [15, "cmp [rbp+var_24], 600h"], [16, "jg short loc_48885C"], [17, "cmp [rbp+var_24], 0"], [18, "jg short loc_488863"], [19, "mov eax, 0FFFFFFFDh"], [20, "jmp short locret_488889"], [21, "mov rdx, [rbp+var_18]"], [22, "mov esi, [rbp+var_24]"], [23, "mov rax, [rbp+var_20]"], [24, "mov rcx, rdx"], [25, "mov edx, offset aPSModelFormatS"], [26, "mov rdi, rax"], [27, "mov eax, 0"], [28, "call sub_48C81F"], [29, "mov [rbp+var_4], eax"], [30, "mov eax, [rbp+var_4]"], [31, "leave"], [32, "retn"]], "data_dep": [[7, 3], [8, 7], [11, 4], [12, 11], [15, 5], [16, 15], [17, 5], [18, 17], [21, 3], [22, 5], [23, 4], [24, 21], [26, 23], [29, 28], [30, 29], [32, 9], [32, 30], [32, 13], [32, 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/8637b53fba300d2bbda36edc905b4ce0ac17bbe93b75784d9e0ff8ef770869f2_8637b53fba300d2bbda36edc905b4ce0ac17bbe93b75784d9e0ff8ef770869f2.jsonl.gz", "strip_func_name": "sub_488817", "query": "\n\n\n__int64 __fastcall sub_488817(__int64 a1, __int64 a2, int a3, __int64 a4, int a5, int a6)\n{\nif ( !a1 )\nreturn 4294967293LL;\nif ( !a2 )\nreturn 4294967293LL;\nif ( a3 <= 1536 && a3 > 0 )\nreturn (unsigned int)sub_48C81F(\na2,\na3,\n(unsigned int)\"{\\\"p\\\":[%s],\\\"model\\\":\\\"format=simple|quantity=batch|time=history\\\"}\",\na1,\na5,\na6);\nreturn 4294967293LL;\n}\n\n\n\nQ:[a3,a1,a2,sub_488817,sub_48C81F,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'param_len', 'a1': 'content', 'a2': 'param', 'sub_488817': 'und_build_packet_param', 'sub_48C81F': 'amp_snprintf'}"}
hci_halting_timeout_handler
1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586
bluekitchen
btstack
NA
static void hci_halting_timeout_handler(btstack_timer_source_t * ds){ UNUSED(ds); hci_stack->substate = HCI_HALTING_CLOSE; hci_halting_run(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_417A87", "function_addr": 4291207, "binary_name": "1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586.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, cs:qword_488B70"], [5, "mov dword ptr [rax+78Ch], 46h "], [6, "call sub_417474"], [7, "nop"], [8, "leave"], [9, "retn"]], "data_dep": [[5, 4], [9, 6]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586_1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586.jsonl.gz", "strip_func_name": "sub_417A87", "query": "\n\n\n__int64 __fastcall sub_417A87(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, int a6)\n{\n*((_DWORD *)qword_488B70 + 483) = 70;\nreturn sub_417474(a1, a2, a3, a4, a5, a6);\n}\n\n\n\nQ:[a1,sub_417A87,sub_417474,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ds_0', 'sub_417A87': 'hci_halting_timeout_handler', 'sub_417474': 'hci_halting_run'}"}
dispatch_index_request
47dbb0334d900656507d737fe374672f3140f5fc6d4279824cf09bfea156759f
dm-vdo
vdo
NA
static int dispatch_index_request(struct uds_index *index, struct uds_request *request) { int result; struct index_zone *zone = index->zones[request->zone_number]; if (!request->requeued) { result = simulate_index_zone_barrier_message(zone, request); if (result != UDS_SUCCESS) { return result; } } switch (request->type) { case UDS_POST: case UDS_UPDATE: case UDS_QUERY: case UDS_QUERY_NO_UPDATE: result = search_index_zone(zone, request); break; case UDS_DELETE: result = remove_from_index_zone(zone, request); break; default: result = uds_log_warning_strerror(UDS_INVALID_ARGUMENT, "invalid request type: %d", request->type); break; } return result; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_42706E", "function_addr": 4354158, "binary_name": "47dbb0334d900656507d737fe374672f3140f5fc6d4279824cf09bfea156759f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov rax, [rbp+var_18]"], [6, "mov rdx, [rax+30h]"], [7, "mov rax, [rbp+var_20]"], [8, "mov eax, [rax+4Ch]"], [9, "mov eax, eax"], [10, "shl rax, 3"], [11, "add rax, rdx"], [12, "mov rax, [rax]"], [13, "mov [rbp+var_10], rax"], [14, "mov rax, [rbp+var_20]"], [15, "movzx eax, byte ptr [rax+79h]"], [16, "xor eax, 1"], [17, "test al, al"], [18, "jz short loc_4270D0"], [19, "mov rdx, [rbp+var_20]"], [20, "mov rax, [rbp+var_10]"], [21, "mov rsi, rdx"], [22, "mov rdi, rax"], [23, "call sub_4261D1"], [24, "mov [rbp+var_4], eax"], [25, "cmp [rbp+var_4], 0"], [26, "jz short loc_4270D0"], [27, "mov eax, [rbp+var_4]"], [28, "jmp locret_427150"], [29, "mov rax, [rbp+var_20]"], [30, "mov eax, [rax+40h]"], [31, "cmp eax, 4"], [32, "ja short loc_42711D"], [33, "cmp eax, 3"], [34, "jnb short loc_4270ED"], [35, "cmp eax, 1"], [36, "jbe short loc_4270ED"], [37, "cmp eax, 2"], [38, "jz short loc_427105"], [39, "jmp short loc_42711D"], [40, "mov rdx, [rbp+var_20]"], [41, "mov rax, [rbp+var_10]"], [42, "mov rsi, rdx"], [43, "mov rdi, rax"], [44, "call sub_426AEF"], [45, "mov [rbp+var_4], eax"], [46, "jmp short loc_42714D"], [47, "mov rdx, [rbp+var_20]"], [48, "mov rax, [rbp+var_10]"], [49, "mov rsi, rdx"], [50, "mov rdi, rax"], [51, "call sub_426EAC"], [52, "mov [rbp+var_4], eax"], [53, "jmp short loc_42714D"], [54, "mov rax, [rbp+var_20]"], [55, "mov eax, [rax+40h]"], [56, "mov r8d, eax"], [57, "lea rcx, aInvalidRequest"], [58, "lea rdx, off_438F7B"], [59, "mov esi, 401h"], [60, "mov edi, 4"], [61, "mov eax, 0"], [62, "call sub_414754"], [63, "mov [rbp+var_4], eax"], [64, "nop"], [65, "mov eax, [rbp+var_4]"], [66, "leave"], [67, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 4], [8, 7], [9, 8], [10, 9], [11, 10], [11, 6], [12, 11], [13, 12], [14, 4], [15, 14], [16, 15], [17, 16], [18, 17], [19, 4], [20, 13], [21, 19], [22, 20], [24, 23], [25, 24], [26, 25], [27, 24], [29, 4], [30, 29], [31, 30], [32, 31], [33, 30], [34, 33], [35, 30], [36, 35], [37, 30], [38, 37], [40, 4], [41, 13], [42, 40], [43, 41], [45, 44], [47, 4], [48, 13], [49, 47], [50, 48], [52, 51], [54, 4], [55, 54], [56, 55], [58, 19], [58, 6], [63, 62], [65, 52], [65, 45], [65, 63], [67, 65], [67, 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/47dbb0334d900656507d737fe374672f3140f5fc6d4279824cf09bfea156759f_47dbb0334d900656507d737fe374672f3140f5fc6d4279824cf09bfea156759f.jsonl.gz", "strip_func_name": "sub_42706E", "query": "\n\n\n__int64 __fastcall sub_42706E(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\nunsigned int v7; // eax\n__int64 *v8; // [rsp+10h] [rbp-10h]\nunsigned int v9; // [rsp+1Ch] [rbp-4h]\n\nv8 = *(__int64 **)(*(_QWORD *)(a1 + 48) + 8LL * *(unsigned int *)(a2 + 76));\nif ( *(_BYTE *)(a2 + 121) != 1 )\n{\nv9 = sub_4261D1(v8, a2);\nif ( v9 )\nreturn v9;\n}\nv7 = *(_DWORD *)(a2 + 64);\nif ( v7 > 4 )\nreturn (unsigned int)sub_414754(\n4,\n0x401u,\n(int)&off_438F7B,\n\"invalid request type: %d\",\n*(unsigned int *)(a2 + 64),\na6,\na2,\na1);\nif ( v7 >= 3 || v7 <= 1 )\nreturn (unsigned int)sub_426AEF(v8, a2);\nreturn (unsigned int)sub_426EAC(v8, a2);\n}\n\n\n\nQ:[a1,a2,v8,v9,sub_42706E,sub_4261D1,sub_426AEF,sub_426EAC,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'index', 'a2': 'request', 'v8': 'zone', 'v9': 'result', 'sub_42706E': 'dispatch_index_request', 'sub_4261D1': 'simulate_index_zone_barrier_message', 'sub_426AEF': 'search_index_zone', 'sub_426EAC': 'remove_from_index_zone'}"}
bit_array_nibble_to_hex
e7afec5c9b27cc04cc2f8e7c75d85281fc6bded14b9d9ff3b030b2fd9615e7e2
noporpoise
BitArray
NA
char bit_array_nibble_to_hex(uint8_t b, char uppercase) { if(b <= 9) { return '0' + b; } else { return (uppercase ? 'A' : 'a') + (b - 0xa); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40456A", "function_addr": 4212074, "binary_name": "e7afec5c9b27cc04cc2f8e7c75d85281fc6bded14b9d9ff3b030b2fd9615e7e2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov edx, edi"], [3, "mov eax, esi"], [4, "mov [rbp+var_4], dl"], [5, "mov [rbp+var_8], al"], [6, "cmp [rbp+var_4], 9"], [7, "ja short loc_404587"], [8, "movzx eax, [rbp+var_4]"], [9, "add eax, 30h "], [10, "jmp short loc_4045A2"], [11, "cmp [rbp+var_8], 0"], [12, "jz short loc_404594"], [13, "mov edx, 41h "], [14, "jmp short loc_404599"], [15, "mov edx, 61h "], [16, "movzx eax, [rbp+var_4]"], [17, "add eax, edx"], [18, "sub eax, 0Ah"], [19, "pop rbp"], [20, "retn"]], "data_dep": [[4, 2], [5, 3], [6, 4], [7, 6], [8, 4], [9, 8], [11, 5], [12, 11], [16, 4], [17, 16], [17, 13], [17, 15], [18, 17], [19, 0], [20, 9], [20, 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/e7afec5c9b27cc04cc2f8e7c75d85281fc6bded14b9d9ff3b030b2fd9615e7e2_e7afec5c9b27cc04cc2f8e7c75d85281fc6bded14b9d9ff3b030b2fd9615e7e2.jsonl.gz", "strip_func_name": "sub_40456A", "query": "\n\n\n__int64 __fastcall sub_40456A(unsigned __int8 a1, char a2)\n{\nint v3; // edx\n\nif ( a1 <= 9u )\nreturn (unsigned int)a1 + 48;\nif ( a2 )\nv3 = 65;\nelse\nv3 = 97;\nreturn v3 + (unsigned int)a1 - 10;\n}\n\n\n\nQ:[a1,a2,sub_40456A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'b', 'a2': 'uppercase', 'sub_40456A': 'bit_array_nibble_to_hex'}"}
center_mode_action
e6951f37e53aa26b8cc1158f7a801b19b5050181eb2932e812d0435a1aa23f66
plasmoduck
suckless
NA
void center_mode_action(char * ctx_name, char * opt_name, char * param, int nb_values, char ** values, int nb_opt_data, void ** opt_data, int nb_ctx_data, void ** ctx_data) { win_t * win = opt_data[0]; win->center = 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40ECC8", "function_addr": 4254920, "binary_name": "e6951f37e53aa26b8cc1158f7a801b19b5050181eb2932e812d0435a1aa23f66.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_18], rdi"], [3, "mov [rbp+var_20], rsi"], [4, "mov [rbp+var_28], rdx"], [5, "mov [rbp+var_2C], ecx"], [6, "mov [rbp+var_38], r8"], [7, "mov [rbp+var_30], r9d"], [8, "mov rax, [rbp+arg_0]"], [9, "mov rax, [rax]"], [10, "mov [rbp+var_8], rax"], [11, "mov rax, [rbp+var_8]"], [12, "mov byte ptr [rax+75h], 1"], [13, "nop"], [14, "pop rbp"], [15, "retn"]], "data_dep": [[9, 8], [10, 9], [11, 10], [12, 11], [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/e6951f37e53aa26b8cc1158f7a801b19b5050181eb2932e812d0435a1aa23f66_e6951f37e53aa26b8cc1158f7a801b19b5050181eb2932e812d0435a1aa23f66.jsonl.gz", "strip_func_name": "sub_40ECC8", "query": "\n\n\n__int64 __fastcall sub_40ECC8(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 *a7)\n{\n__int64 result; // rax\n\nresult = *a7;\n*(_BYTE *)(*a7 + 117) = 1;\nreturn result;\n}\n\n\n\nQ:[a1,a2,a3,a4,a5,a6,a7,sub_40ECC8,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'ctx_name', 'a2': 'opt_name', 'a3': 'param', 'a4': 'nb_values', 'a5': 'values', 'a6': 'nb_opt_data', 'a7': 'opt_data', 'sub_40ECC8': 'center_mode_action'}"}
vss_operate
782a7d818dd384a05e25e9fab3e8a52c1d6658fb5d91753ca08e86baa9e76506
carter-yagemann
ARCUS
NA
static int vss_operate(int operation) { char match[] = "/dev/"; FILE *mounts; struct mntent *ent; char errdir[1024] = {0}; unsigned int cmd; int error = 0, root_seen = 0, save_errno = 0; switch (operation) { case VSS_OP_FREEZE: cmd = FIFREEZE; break; case VSS_OP_THAW: cmd = FITHAW; break; default: return -1; } mounts = setmntent("/proc/mounts", "r"); if (mounts == NULL) return -1; while ((ent = getmntent(mounts))) { if (strncmp(ent->mnt_fsname, match, strlen(match))) continue; if (hasmntopt(ent, MNTOPT_RO) != NULL) continue; if (strcmp(ent->mnt_type, "vfat") == 0) continue; if (strcmp(ent->mnt_dir, "/") == 0) { root_seen = 1; continue; } error |= vss_do_freeze(ent->mnt_dir, cmd); if (error && operation == VSS_OP_FREEZE) goto err; } endmntent(mounts); if (root_seen) { error |= vss_do_freeze("/", cmd); if (error && operation == VSS_OP_FREEZE) goto err; } goto out; err: save_errno = errno; if (ent) { strncpy(errdir, ent->mnt_dir, sizeof(errdir)-1); endmntent(mounts); } vss_operate(VSS_OP_THAW); /* Call syslog after we thaw all filesystems */ if (ent) syslog(LOG_ERR, "FREEZE of %s failed; error:%d %s", errdir, save_errno, strerror(save_errno)); else syslog(LOG_ERR, "FREEZE of / failed; error:%d %s", save_errno, strerror(save_errno)); out: return error; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40132B", "function_addr": 4199211, "binary_name": "782a7d818dd384a05e25e9fab3e8a52c1d6658fb5d91753ca08e86baa9e76506.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 440h"], [3, "mov [rbp+var_434], edi"], [4, "mov dword ptr [rbp+s], 7665642Fh"], [5, "mov [rbp+var_22], 2Fh "], [6, "mov qword ptr [rbp+dest], 0"], [7, "mov [rbp+var_428], 0"], [8, "lea rdx, [rbp+var_420]"], [9, "mov eax, 0"], [10, "mov ecx, 7Eh "], [11, "mov rdi, rdx"], [12, "rep stosq"], [13, "mov [rbp+var_8], 0"], [14, "mov [rbp+var_C], 0"], [15, "mov [rbp+errnum], 0"], [16, "cmp [rbp+var_434], 5"], [17, "jz short loc_40139F"], [18, "cmp [rbp+var_434], 6"], [19, "jz short loc_4013A8"], [20, "jmp short loc_4013B1"], [21, "mov [rbp+var_4], 0C0045877h"], [22, "jmp short loc_4013BB"], [23, "mov [rbp+var_4], 0C0045878h"], [24, "jmp short loc_4013BB"], [25, "mov eax, 0FFFFFFFFh"], [26, "jmp locret_401598"], [27, "mov esi, offset mode"], [28, "mov edi, offset file"], [29, "call _setmntent"], [30, "mov [rbp+stream], rax"], [31, "cmp [rbp+stream], 0"], [32, "jnz loc_40148A"], [33, "mov eax, 0FFFFFFFFh"], [34, "jmp locret_401598"], [35, "lea rax, [rbp+s]"], [36, "mov rdi, rax"], [37, "call _strlen"], [38, "mov rdx, rax"], [39, "mov rax, [rbp+mnt]"], [40, "mov rax, [rax]"], [41, "lea rcx, [rbp+s]"], [42, "mov rsi, rcx"], [43, "mov rdi, rax"], [44, "call _strncmp"], [45, "test eax, eax"], [46, "jz short loc_40140E"], [47, "jmp short loc_40148A"], [48, "mov rax, [rbp+mnt]"], [49, "mov esi, offset opt"], [50, "mov rdi, rax"], [51, "call _hasmntopt"], [52, "test rax, rax"], [53, "jz short loc_401426"], [54, "jmp short loc_40148A"], [55, "mov rax, [rbp+mnt]"], [56, "mov rax, [rax+10h]"], [57, "mov esi, offset s2"], [58, "mov rdi, rax"], [59, "call _strcmp"], [60, "test eax, eax"], [61, "jnz short loc_401441"], [62, "jmp short loc_40148A"], [63, "mov rax, [rbp+mnt]"], [64, "mov rax, [rax+8]"], [65, "mov esi, offset asc_40201F"], [66, "mov rdi, rax"], [67, "call _strcmp"], [68, "test eax, eax"], [69, "jnz short loc_401463"], [70, "mov [rbp+var_C], 1"], [71, "jmp short loc_40148A"], [72, "mov rax, [rbp+mnt]"], [73, "mov rax, [rax+8]"], [74, "mov edx, [rbp+var_4]"], [75, "mov esi, edx"], [76, "mov rdi, rax"], [77, "call sub_401282"], [78, "or [rbp+var_8], eax"], [79, "cmp [rbp+var_8], 0"], [80, "jz short loc_40148A"], [81, "cmp [rbp+var_434], 5"], [82, "jz short loc_4014E6"], [83, "mov rax, [rbp+stream]"], [84, "mov rdi, rax"], [85, "call _getmntent"], [86, "mov [rbp+mnt], rax"], [87, "cmp [rbp+mnt], 0"], [88, "jnz loc_4013E3"], [89, "mov rax, [rbp+stream]"], [90, "mov rdi, rax"], [91, "call _endmntent"], [92, "cmp [rbp+var_C], 0"], [93, "jz loc_401594"], [94, "mov eax, [rbp+var_4]"], [95, "mov esi, eax"], [96, "mov edi, offset asc_40201F"], [97, "call sub_401282"], [98, "or [rbp+var_8], eax"], [99, "cmp [rbp+var_8], 0"], [100, "jz loc_401594"], [101, "cmp [rbp+var_434], 5"], [102, "jnz loc_401594"], [103, "jmp short loc_4014E7"], [104, "nop"], [105, "call ___errno_location"], [106, "mov eax, [rax]"], [107, "mov [rbp+errnum], eax"], [108, "cmp [rbp+mnt], 0"], [109, "jz short loc_401523"], [110, "mov rax, [rbp+mnt]"], [111, "mov rcx, [rax+8]"], [112, "lea rax, [rbp+dest]"], [113, "mov edx, 3FFh"], [114, "mov rsi, rcx"], [115, "mov rdi, rax"], [116, "call _strncpy"], [117, "mov rax, [rbp+stream]"], [118, "mov rdi, rax"], [119, "call _endmntent"], [120, "mov edi, 6"], [121, "call sub_40132B"], [122, "cmp [rbp+mnt], 0"], [123, "jz short loc_401569"], [124, "mov eax, [rbp+errnum]"], [125, "mov edi, eax"], [126, "call _strerror"], [127, "mov rcx, rax"], [128, "mov edx, [rbp+errnum]"], [129, "lea rax, [rbp+dest]"], [130, "mov r8, rcx"], [131, "mov ecx, edx"], [132, "mov rdx, rax"], [133, "mov esi, offset fmt"], [134, "mov edi, 3"], [135, "mov eax, 0"], [136, "call _syslog"], [137, "jmp short loc_401595"], [138, "mov eax, [rbp+errnum]"], [139, "mov edi, eax"], [140, "call _strerror"], [141, "mov rdx, rax"], [142, "mov eax, [rbp+errnum]"], [143, "mov rcx, rdx"], [144, "mov edx, eax"], [145, "mov esi, offset aFreezeOfFailed"], [146, "mov edi, 3"], [147, "mov eax, 0"], [148, "call _syslog"], [149, "jmp short loc_401595"], [150, "nop"], [151, "mov eax, [rbp+var_8]"], [152, "leave"], [153, "retn"]], "data_dep": [[11, 8], [16, 3], [17, 16], [18, 3], [19, 18], [30, 29], [31, 30], [32, 31], [35, 85], [35, 4], [36, 35], [38, 37], [39, 86], [40, 39], [41, 10], [41, 41], [41, 4], [42, 41], [43, 40], [45, 44], [46, 45], [48, 86], [50, 48], [52, 51], [53, 52], [55, 86], [56, 55], [58, 56], [60, 59], [61, 60], [63, 86], [64, 63], [66, 64], [68, 67], [69, 68], [72, 86], [73, 72], [74, 21], [74, 23], [75, 74], [76, 73], [78, 13], [78, 77], [78, 78], [79, 78], [80, 79], [81, 3], [82, 81], [83, 30], [84, 83], [86, 85], [87, 86], [88, 87], [89, 30], [90, 89], [92, 14], [92, 70], [93, 92], [94, 21], [94, 23], [95, 94], [98, 78], [98, 13], [98, 97], [99, 98], [100, 99], [101, 3], [102, 101], [106, 105], [107, 106], [108, 86], [109, 108], [110, 86], [111, 110], [112, 6], [112, 110], [114, 111], [115, 112], [117, 30], [118, 117], [122, 86], [123, 122], [124, 107], [125, 124], [127, 126], [128, 107], [129, 6], [129, 126], [130, 127], [131, 128], [132, 129], [138, 107], [139, 138], [141, 140], [142, 107], [143, 141], [144, 142], [151, 13], [151, 78], [151, 98], [153, 25], [153, 33], [153, 151]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/782a7d818dd384a05e25e9fab3e8a52c1d6658fb5d91753ca08e86baa9e76506_782a7d818dd384a05e25e9fab3e8a52c1d6658fb5d91753ca08e86baa9e76506.jsonl.gz", "strip_func_name": "sub_40132B", "query": "\n\n\n__int64 __fastcall sub_40132B(int a1)\n{\nsize_t v2; // rax\n_BOOL4 v3; // eax\n_BOOL4 v4; // eax\nchar *v5; // rax\nchar *v6; // rax\nchar dest[8]; // [rsp+10h] [rbp-430h] BYREF\n__int64 v8; // [rsp+18h] [rbp-428h]\nchar v9[1008]; // [rsp+20h] [rbp-420h] BYREF\nchar s[6]; // [rsp+41Ah] [rbp-26h] BYREF\nstruct mntent *mnt; // [rsp+420h] [rbp-20h]\nFILE *stream; // [rsp+428h] [rbp-18h]\nint errnum; // [rsp+430h] [rbp-10h]\nint v14; // [rsp+434h] [rbp-Ch]\nunsigned int v15; // [rsp+438h] [rbp-8h]\nunsigned int v16; // [rsp+43Ch] [rbp-4h]\n\nstrcpy(s, \"/dev/\");\n*(_QWORD *)dest = 0LL;\nv8 = 0LL;\nmemset(v9, 0, sizeof(v9));\nv15 = 0;\nv14 = 0;\nerrnum = 0;\nif ( a1 == 5 )\n{\nv16 = -1073457033;\n}\nelse\n{\nif ( a1 != 6 )\nreturn 0xFFFFFFFFLL;\nv16 = -1073457032;\n}\nstream = setmntent(\"/proc/mounts\", \"r\");\nif ( !stream )\nreturn 0xFFFFFFFFLL;\nwhile ( 1 )\n{\nmnt = getmntent(stream);\nif ( !mnt )\nbreak;\nv2 = strlen(s);\nif ( !strncmp(mnt->mnt_fsname, s, v2) && !hasmntopt(mnt, \"ro\") && strcmp(mnt->mnt_type, \"vfat\") )\n{\nif ( !strcmp(mnt->mnt_dir, \"/\") )\n{\nv14 = 1;\n}\nelse\n{\nv3 = sub_401282(mnt->mnt_dir, v16);\nv15 |= v3;\nif ( v15 && a1 == 5 )\ngoto LABEL_19;\n}\n}\n}\nendmntent(stream);\nif ( !v14 )\nreturn v15;\nv4 = sub_401282(\"/\", v16);\nv15 |= v4;\nif ( !v15 || a1 != 5 )\nreturn v15;\nLABEL_19:\nerrnum = *__errno_location();\nif ( mnt )\n{\nstrncpy(dest, mnt->mnt_dir, 0x3FFuLL);\nendmntent(stream);\n}\nsub_40132B(6LL);\nif ( mnt )\n{\nv5 = strerror(errnum);\nsyslog(3, \"FREEZE of %s failed; error:%d %s\", dest, (unsigned int)errnum, v5);\n}\nelse\n{\nv6 = strerror(errnum);\nsyslog(3, \"FREEZE of / failed; error:%d %s\", (unsigned int)errnum, v6);\n}\nreturn v15;\n}\n\n\n\nQ:[a1,dest,s,mnt,stream,errnum,v14,v15,v16,sub_40132B,sub_401282,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'operation', 'dest': 'errdir', 's': 'match', 'mnt': 'ent', 'stream': 'mounts', 'errnum': 'save_errno', 'v14': 'root_seen', 'v15': 'error', 'v16': 'cmd', 'sub_40132B': 'vss_operate', 'sub_401282': 'vss_do_freeze'}"}
le_device_db_dump
1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586
bluekitchen
btstack
NA
void le_device_db_dump(void){ log_info("LE Device DB dump, devices: %d", le_device_db_count()); uint32_t i; for (i=0;i<NVM_NUM_DEVICE_DB_ENTRIES;i++){ if (!entry_map[i]) continue; // fetch entry le_device_db_entry_t entry; le_device_db_tlv_fetch(i, &entry); log_info("%u: %u %s", (unsigned int) i, entry.addr_type, bd_addr_to_str(entry.addr)); log_info_key("ltk", entry.ltk); log_info_key("irk", entry.irk); #ifdef ENABLE_LE_SIGNED_WRITE log_info_key("local csrk", entry.local_csrk); log_info_key("remote csrk", entry.remote_csrk); #endif } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40B083", "function_addr": 4239491, "binary_name": "1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "call sub_40AA7E"], [4, "mov r8d, eax"], [5, "mov ecx, 1C9h"], [6, "mov edx, offset aLeDeviceDbTlvC"], [7, "mov esi, offset aSULeDeviceDbDu"], [8, "mov edi, 1"], [9, "mov eax, 0"], [10, "call sub_41DE87"], [11, "mov [rbp+var_4], 0"], [12, "jmp short loc_40B138"], [13, "mov eax, [rbp+var_4]"], [14, "movzx eax, ds:byte_488150[rax]"], [15, "test al, al"], [16, "jz short loc_40B133"], [17, "mov eax, [rbp+var_4]"], [18, "lea rdx, [rbp+var_40]"], [19, "mov rsi, rdx"], [20, "mov edi, eax"], [21, "call sub_40A7A5"], [22, "lea rax, [rbp+var_40]"], [23, "add rax, 8"], [24, "mov rdi, rax"], [25, "call sub_4067D9"], [26, "mov ecx, [rbp+var_3C]"], [27, "mov edx, [rbp+var_4]"], [28, "sub rsp, 8"], [29, "push rax"], [30, "mov r9d, ecx"], [31, "mov r8d, edx"], [32, "mov ecx, 1D1h"], [33, "mov edx, offset aLeDeviceDbTlvC"], [34, "mov esi, offset aSUUUS"], [35, "mov edi, 1"], [36, "mov eax, 0"], [37, "call sub_41DE87"], [38, "add rsp, 10h"], [39, "lea rax, [rbp+var_40]"], [40, "add rax, 0Eh"], [41, "mov rsi, rax"], [42, "mov edi, offset aIrk"], [43, "call sub_406573"], [44, "jmp short loc_40B134"], [45, "nop"], [46, "add [rbp+var_4], 1"], [47, "cmp [rbp+var_4], 0Fh"], [48, "jbe loc_40B0BA"], [49, "nop"], [50, "nop"], [51, "leave"], [52, "retn"]], "data_dep": [[4, 3], [13, 11], [13, 46], [15, 14], [16, 15], [17, 46], [17, 11], [18, 6], [18, 33], [19, 18], [20, 17], [22, 21], [23, 22], [24, 23], [27, 46], [27, 11], [28, 2], [28, 38], [29, 25], [30, 26], [31, 27], [38, 28], [39, 37], [40, 39], [41, 40], [46, 11], [46, 46], [47, 46], [47, 11], [48, 47], [52, 43], [52, 15], [52, 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/1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586_1ad2950b740aefe99d7642592eec74f4658f7325067c041bb6e985f6d25ec586.jsonl.gz", "strip_func_name": "sub_40B083", "query": "\n\n\n__int64 sub_40B083()\n{\nint v0; // eax\nint v1; // er9\n__int64 result; // rax\nchar v3[4]; // [rsp+0h] [rbp-40h] BYREF\nint v4; // [rsp+4h] [rbp-3Ch]\n__int64 v5; // [rsp+8h] [rbp-38h] BYREF\nunsigned int i; // [rsp+3Ch] [rbp-4h]\n\nv0 = sub_40AA7E();\nresult = sub_41DE87(\n1,\n(unsigned int)\"%s.%u: LE Device DB dump, devices: %d\",\n(unsigned int)\"le_device_db_tlv.c\",\n457,\nv0,\nv1);\nfor ( i = 0; i <= 0xF; ++i )\n{\nresult = (unsigned __int8)byte_488150[i];\nif ( (_BYTE)result )\n{\nsub_40A7A5(i, (__int64)v3);\nsub_4067D9((__int64)&v5);\nsub_41DE87(1, (unsigned int)\"%s.%u: %u: %u %s\", (unsigned int)\"le_device_db_tlv.c\", 465, i, v4);\nresult = sub_406573((int)\"irk\", (__int64)&v5 + 6);\n}\n}\nreturn result;\n}\n\n\n\nQ:[v3,sub_40B083,sub_40AA7E,sub_41DE87,sub_40A7A5,sub_4067D9,sub_406573,]\nAssistant: ", "hints": "[]", "response": "{'v3': 'entry', 'sub_40B083': 'le_device_db_dump', 'sub_40AA7E': 'le_device_db_count', 'sub_41DE87': 'hci_dump_log', 'sub_40A7A5': 'le_device_db_tlv_fetch', 'sub_4067D9': 'bd_addr_to_str', 'sub_406573': 'log_info_key'}"}
UpdateLineInfo
1c9782cb95ac345a77465ba88b70eb8da93f650d1c8877cf5bb119d4d1bf0021
mupfdev
SNESoIP
NA
void UpdateLineInfo (struct IFile* F, unsigned LineNum, const StrBuf* Line) /* Update the line info - called if a new line is read */ { /* If a current line info exists, release it */ if (CurLineInfo) { ReleaseLineInfo (CurLineInfo); } /* If we have intermixed assembly switched off, use an empty line instead ** of the supplied one to save some memory. */ if (!AddSource) { Line = &EmptyStrBuf; } /* Create a new line info */ CurLineInfo = NewLineInfo (F, LineNum, Line); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_43A981", "function_addr": 4434305, "binary_name": "1c9782cb95ac345a77465ba88b70eb8da93f650d1c8877cf5bb119d4d1bf0021.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, cs:qword_471AC8"], [7, "test rax, rax"], [8, "jz short loc_43A9AF"], [9, "mov rax, cs:qword_471AC8"], [10, "mov rdi, rax"], [11, "call sub_43A90C"], [12, "movzx eax, cs:byte_471A30"], [13, "test al, al"], [14, "jnz short loc_43A9C2"], [15, "mov [rbp+var_18], offset qword_45D100"], [16, "mov rdx, [rbp+var_18]"], [17, "mov ecx, [rbp+var_C]"], [18, "mov rax, [rbp+var_8]"], [19, "mov esi, ecx"], [20, "mov rdi, rax"], [21, "call sub_43A7C8"], [22, "mov cs:qword_471AC8, rax"], [23, "nop"], [24, "leave"], [25, "retn"]], "data_dep": [[7, 6], [8, 7], [10, 9], [13, 12], [14, 13], [16, 15], [16, 5], [17, 4], [18, 3], [19, 17], [20, 18], [22, 21], [25, 21]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1c9782cb95ac345a77465ba88b70eb8da93f650d1c8877cf5bb119d4d1bf0021_1c9782cb95ac345a77465ba88b70eb8da93f650d1c8877cf5bb119d4d1bf0021.jsonl.gz", "strip_func_name": "sub_43A981", "query": "\n\n\n__int64 __fastcall sub_43A981(__int64 a1, int a2, __int64 *a3)\n{\n__int64 result; // rax\n\nif ( qword_471AC8 )\nsub_43A90C((_DWORD *)qword_471AC8);\nif ( !byte_471A30 )\na3 = &qword_45D100;\nresult = sub_43A7C8(a1, a2, (__int64)a3);\nqword_471AC8 = result;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_43A981,sub_43A90C,sub_43A7C8,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'Line', 'a1': 'F', 'a2': 'LineNum', 'sub_43A981': 'UpdateLineInfo', 'sub_43A90C': 'ReleaseLineInfo', 'sub_43A7C8': 'NewLineInfo'}"}
mpack_node_type
552648330d8e56cb3c091c2c1c2e19c4189791830acc232658290a0e8dbf3e96
ludocode
mpack
NA
mpack_type_t mpack_node_type(mpack_node_t node) { if (mpack_node_error(node) != mpack_ok) return mpack_type_nil; return node.data->type; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40770F", "function_addr": 4224783, "binary_name": "552648330d8e56cb3c091c2c1c2e19c4189791830acc232658290a0e8dbf3e96.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov rax, rdi"], [4, "mov rcx, rsi"], [5, "mov rdx, rcx"], [6, "mov [rbp+var_10], rax"], [7, "mov [rbp+var_8], rdx"], [8, "mov rdx, [rbp+var_10]"], [9, "mov rax, [rbp+var_8]"], [10, "mov rdi, rdx"], [11, "mov rsi, rax"], [12, "call sub_409CDC"], [13, "test eax, eax"], [14, "jz short loc_407746"], [15, "mov eax, 1"], [16, "jmp short locret_40774C"], [17, "mov rax, [rbp+var_10]"], [18, "mov eax, [rax]"], [19, "leave"], [20, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 5], [8, 6], [9, 7], [10, 8], [11, 9], [13, 12], [14, 13], [17, 6], [18, 17], [20, 18], [20, 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/552648330d8e56cb3c091c2c1c2e19c4189791830acc232658290a0e8dbf3e96_552648330d8e56cb3c091c2c1c2e19c4189791830acc232658290a0e8dbf3e96.jsonl.gz", "strip_func_name": "sub_40770F", "query": "\n\n\n__int64 __fastcall sub_40770F(unsigned int *a1, __int64 a2)\n{\n__int64 result; // rax\n\nif ( (unsigned int)sub_409CDC(a1, a2) )\nresult = 1LL;\nelse\nresult = *a1;\nreturn result;\n}\n\n\n\nQ:[a1,sub_40770F,sub_409CDC,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'node', 'sub_40770F': 'mpack_node_type', 'sub_409CDC': 'mpack_node_error'}"}
Cmd_Eyeposition
26fcc7733e4182cd7dd55c3d72406c180f70d9ab8f1f03c3852f8b9cfe1416e4
sezero
uhexen2
NA
static void Cmd_Eyeposition (void) { // rotate points into frame of reference so model points down the positive x // axis GetToken (false); model.eyeposition[1] = atof (token); GetToken (false); model.eyeposition[0] = -atof (token); GetToken (false); model.eyeposition[2] = atof (token); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4098D5", "function_addr": 4233429, "binary_name": "26fcc7733e4182cd7dd55c3d72406c180f70d9ab8f1f03c3852f8b9cfe1416e4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov edi, 0"], [3, "call sub_403043"], [4, "mov edi, offset byte_410980"], [5, "call _atof"], [6, "cvtsd2ss xmm0, xmm0"], [7, "movss cs:dword_1413448, xmm0"], [8, "mov edi, 0"], [9, "call sub_403043"], [10, "mov edi, offset byte_410980"], [11, "call _atof"], [12, "cvtsd2ss xmm0, xmm0"], [13, "movss xmm1, cs:dword_40C0A0"], [14, "xorps xmm0, xmm1"], [15, "movss cs:dword_1413444, xmm0"], [16, "mov edi, 0"], [17, "call sub_403043"], [18, "mov edi, offset byte_410980"], [19, "call _atof"], [20, "cvtsd2ss xmm0, xmm0"], [21, "movss cs:dword_141344C, xmm0"], [22, "nop"], [23, "pop rbp"], [24, "retn"]], "data_dep": [[7, 6], [12, 6], [14, 13], [14, 12], [15, 14], [20, 14], [21, 20], [23, 0], [24, 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/26fcc7733e4182cd7dd55c3d72406c180f70d9ab8f1f03c3852f8b9cfe1416e4_26fcc7733e4182cd7dd55c3d72406c180f70d9ab8f1f03c3852f8b9cfe1416e4.jsonl.gz", "strip_func_name": "sub_4098D5", "query": "\n\n\nvoid __fastcall sub_4098D5(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\nint v6; // xmm0_4\n__int64 v7; // rdx\n__int64 v8; // rcx\n__int64 v9; // r8\n__int64 v10; // r9\nfloat v11; // xmm0_4\n__int64 v12; // rdx\n__int64 v13; // rcx\n__int64 v14; // r8\n__int64 v15; // r9\nint v16; // xmm0_4\n\nsub_403043(0, a2, a3, a4, a5, a6);\n*(float *)&v6 = atof(&byte_410980);\ndword_1413448 = v6;\nsub_403043(0, a2, v7, v8, v9, v10);\nv11 = atof(&byte_410980);\n*(float *)&dword_1413444 = -v11;\nsub_403043(0, a2, v12, v13, v14, v15);\n*(float *)&v16 = atof(&byte_410980);\ndword_141344C = v16;\n}\n\n\n\nQ:[sub_4098D5,sub_403043,]\nAssistant: ", "hints": "[]", "response": "{'sub_4098D5': 'Cmd_Eyeposition', 'sub_403043': 'GetToken'}"}
ConvertHeaderBytes
5315d423f79afb83f749d4d734d1dde80b0f439f410fcfb4b4bf9fe5a60ff93d
apple-oss-distributions
mDNSResponder
NA
void ConvertHeaderBytes(ipc_msg_hdr *hdr) { hdr->version = htonl(hdr->version); hdr->datalen = htonl(hdr->datalen); hdr->ipc_flags = htonl(hdr->ipc_flags); hdr->op = htonl(hdr->op ); hdr->reg_index = htonl(hdr->reg_index); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_409680", "function_addr": 4232832, "binary_name": "5315d423f79afb83f749d4d734d1dde80b0f439f410fcfb4b4bf9fe5a60ff93d.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 eax, [rax]"], [6, "mov edi, eax"], [7, "call _htonl"], [8, "mov rdx, [rbp+var_8]"], [9, "mov [rdx], eax"], [10, "mov rax, [rbp+var_8]"], [11, "mov eax, [rax+4]"], [12, "mov edi, eax"], [13, "call _htonl"], [14, "mov rdx, [rbp+var_8]"], [15, "mov [rdx+4], eax"], [16, "mov rax, [rbp+var_8]"], [17, "mov eax, [rax+8]"], [18, "mov edi, eax"], [19, "call _htonl"], [20, "mov rdx, [rbp+var_8]"], [21, "mov [rdx+8], eax"], [22, "mov rax, [rbp+var_8]"], [23, "mov eax, [rax+0Ch]"], [24, "mov edi, eax"], [25, "call _htonl"], [26, "mov rdx, [rbp+var_8]"], [27, "mov [rdx+0Ch], eax"], [28, "mov rax, [rbp+var_8]"], [29, "mov eax, [rax+18h]"], [30, "mov edi, eax"], [31, "call _htonl"], [32, "mov rdx, [rbp+var_8]"], [33, "mov [rdx+18h], eax"], [34, "nop"], [35, "leave"], [36, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [8, 3], [9, 8], [9, 7], [10, 3], [11, 10], [11, 9], [12, 11], [14, 3], [15, 14], [15, 13], [16, 3], [17, 15], [17, 16], [18, 17], [20, 3], [21, 19], [21, 20], [22, 3], [23, 22], [23, 21], [24, 23], [26, 3], [27, 25], [27, 26], [28, 3], [29, 28], [29, 27], [30, 29], [32, 3], [33, 32], [33, 31], [36, 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/5315d423f79afb83f749d4d734d1dde80b0f439f410fcfb4b4bf9fe5a60ff93d_5315d423f79afb83f749d4d734d1dde80b0f439f410fcfb4b4bf9fe5a60ff93d.jsonl.gz", "strip_func_name": "sub_409680", "query": "\n\n\nuint32_t __fastcall sub_409680(uint32_t *a1)\n{\nuint32_t result; // eax\n\n*a1 = htonl(*a1);\na1[1] = htonl(a1[1]);\na1[2] = htonl(a1[2]);\na1[3] = htonl(a1[3]);\nresult = htonl(a1[6]);\na1[6] = result;\nreturn result;\n}\n\n\n\nQ:[a1,sub_409680,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'hdr', 'sub_409680': 'ConvertHeaderBytes'}"}
pj_grp_lock_dump
a919fc39a5af9b1355a81d3146876c0fc5147fd6c16c81f57145538a5f7e2e46
asterisk
pjproject-archive
NA
PJ_DEF(void) pj_grp_lock_dump(pj_grp_lock_t *grp_lock) { #if PJ_GRP_LOCK_DEBUG grp_lock_ref *ref; char info_buf[1000]; pj_str_t info; info.ptr = info_buf; info.slen = 0; grp_lock_add_ref(grp_lock); pj_enter_critical_section(); ref = grp_lock->ref_list.next; while (ref != &grp_lock->ref_list && info.slen < sizeof(info_buf)) { char *start = info.ptr + info.slen; int max_len = sizeof(info_buf) - info.slen; int len; len = pj_ansi_snprintf(start, max_len, "\t%s:%d\n", ref->file, ref->line); if (len < 1 || len >= max_len) { len = strlen(ref->file); if (len > max_len - 1) len = max_len - 1; memcpy(start, ref->file, len); start[len++] = '\n'; } info.slen += len; ref = ref->next; } if (ref != &grp_lock->ref_list) { int i; for (i=0; i<4; ++i) info_buf[sizeof(info_buf)-i-1] = '.'; } info.ptr[info.slen-1] = '\0'; pj_leave_critical_section(); PJ_LOG(4,(THIS_FILE, "Group lock %p, ref_cnt=%d. Reference holders:\n%s", grp_lock, pj_grp_lock_get_ref(grp_lock)-1, info.ptr)); grp_lock_dec_ref(grp_lock); #else PJ_LOG(4,(THIS_FILE, "Group lock %p, ref_cnt=%d.", grp_lock, pj_grp_lock_get_ref(grp_lock))); #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_436D68", "function_addr": 4418920, "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, "call sub_437069"], [5, "cmp eax, 3"], [6, "jle short loc_436DA9"], [7, "mov rax, [rbp+var_8]"], [8, "mov rdi, rax"], [9, "call sub_436BCF"], [10, "mov edx, eax"], [11, "mov rax, [rbp+var_8]"], [12, "mov ecx, edx"], [13, "mov rdx, rax"], [14, "mov esi, offset aGroupLockPRefC"], [15, "mov edi, offset aLockC"], [16, "mov eax, 0"], [17, "call sub_4379DD"], [18, "nop"], [19, "leave"], [20, "retn"]], "data_dep": [[5, 4], [6, 5], [7, 3], [8, 7], [10, 9], [11, 3], [12, 10], [13, 11], [20, 4], [20, 17]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/a919fc39a5af9b1355a81d3146876c0fc5147fd6c16c81f57145538a5f7e2e46_a919fc39a5af9b1355a81d3146876c0fc5147fd6c16c81f57145538a5f7e2e46.jsonl.gz", "strip_func_name": "sub_436D68", "query": "\n\n\n__int64 __fastcall sub_436D68(__int64 a1)\n{\n__int64 result; // rax\nint v2; // eax\nint v3; // er8\nint v4; // er9\n\nresult = sub_437069();\nif ( (int)result > 3 )\n{\nv2 = sub_436BCF(a1);\nresult = sub_4379DD((unsigned int)\"lock.c\", (unsigned int)\"Group lock %p, ref_cnt=%d.\", a1, v2, v3, v4);\n}\nreturn result;\n}\n\n\n\nQ:[a1,sub_436D68,sub_437069,sub_436BCF,sub_4379DD,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'grp_lock', 'sub_436D68': 'pj_grp_lock_dump', 'sub_437069': 'pj_log_get_level', 'sub_436BCF': 'pj_grp_lock_get_ref', 'sub_4379DD': 'pj_log_4'}"}
fifo_push_bg_row
276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de
LIJI32
SameBoy
NA
static void fifo_push_bg_row(GB_fifo_t *fifo, uint8_t lower, uint8_t upper, uint8_t palette, bool bg_priority, bool flip_x) { assert(fifo->size == 0); fifo->size = 8; if (!flip_x) { unrolled for (unsigned i = 0; i < 8; i++) { fifo->fifo[i] = (GB_fifo_item_t) { (lower >> 7) | ((upper >> 7) << 1), palette, 0, bg_priority, }; lower <<= 1; upper <<= 1; } } else { unrolled for (unsigned i = 0; i < 8; i++) { fifo->fifo[i] = (GB_fifo_item_t) { (lower & 1) | ((upper & 1) << 1), palette, 0, bg_priority, }; lower >>= 1; upper >>= 1; } } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4168FE", "function_addr": 4286718, "binary_name": "276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de.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 edi, r9d"], [6, "mov ecx, esi"], [7, "mov [rbp+var_1C], cl"], [8, "mov [rbp+var_20], dl"], [9, "mov [rbp+var_24], al"], [10, "mov eax, r8d"], [11, "mov [rbp+var_28], al"], [12, "mov eax, edi"], [13, "mov [rbp+var_2C], al"], [14, "mov rax, [rbp+var_18]"], [15, "movzx eax, byte ptr [rax+21h]"], [16, "test al, al"], [17, "jz short loc_41694A"], [18, "mov ecx, offset aFifoPushBgRow"], [19, "mov edx, 21h "], [20, "mov esi, offset aCoreDisplayC"], [21, "mov edi, offset aFifoSize0"], [22, "call ___assert_fail"], [23, "mov rax, [rbp+var_18]"], [24, "mov byte ptr [rax+21h], 8"], [25, "movzx eax, [rbp+var_2C]"], [26, "xor eax, 1"], [27, "test al, al"], [28, "jz short loc_4169CA"], [29, "mov [rbp+var_4], 0"], [30, "jmp short loc_4169BD"], [31, "movzx eax, [rbp+var_1C]"], [32, "shr al, 7"], [33, "mov edx, eax"], [34, "movzx eax, [rbp+var_20]"], [35, "shr al, 7"], [36, "movzx eax, al"], [37, "add eax, eax"], [38, "or eax, edx"], [39, "mov ecx, eax"], [40, "mov rax, [rbp+var_18]"], [41, "mov edx, [rbp+var_4]"], [42, "mov [rax+rdx*4], cl"], [43, "mov rax, [rbp+var_18]"], [44, "mov edx, [rbp+var_4]"], [45, "movzx ecx, [rbp+var_24]"], [46, "mov [rax+rdx*4+1], cl"], [47, "mov rax, [rbp+var_18]"], [48, "mov edx, [rbp+var_4]"], [49, "mov byte ptr [rax+rdx*4+2], 0"], [50, "mov rax, [rbp+var_18]"], [51, "mov edx, [rbp+var_4]"], [52, "movzx ecx, [rbp+var_28]"], [53, "mov [rax+rdx*4+3], cl"], [54, "shl [rbp+var_1C], 1"], [55, "shl [rbp+var_20], 1"], [56, "add [rbp+var_4], 1"], [57, "cmp [rbp+var_4], 7"], [58, "setbe al"], [59, "test al, al"], [60, "jnz short loc_416966"], [61, "jmp short loc_416A32"], [62, "mov [rbp+var_8], 0"], [63, "jmp short loc_416A27"], [64, "movzx eax, [rbp+var_1C]"], [65, "and eax, 1"], [66, "mov edx, eax"], [67, "movzx eax, [rbp+var_20]"], [68, "add eax, eax"], [69, "and eax, 2"], [70, "or eax, edx"], [71, "mov ecx, eax"], [72, "mov rax, [rbp+var_18]"], [73, "mov edx, [rbp+var_8]"], [74, "mov [rax+rdx*4], cl"], [75, "mov rax, [rbp+var_18]"], [76, "mov edx, [rbp+var_8]"], [77, "movzx ecx, [rbp+var_24]"], [78, "mov [rax+rdx*4+1], cl"], [79, "mov rax, [rbp+var_18]"], [80, "mov edx, [rbp+var_8]"], [81, "mov byte ptr [rax+rdx*4+2], 0"], [82, "mov rax, [rbp+var_18]"], [83, "mov edx, [rbp+var_8]"], [84, "movzx ecx, [rbp+var_28]"], [85, "mov [rax+rdx*4+3], cl"], [86, "shr [rbp+var_1C], 1"], [87, "shr [rbp+var_20], 1"], [88, "add [rbp+var_8], 1"], [89, "cmp [rbp+var_8], 7"], [90, "setbe al"], [91, "test al, al"], [92, "jnz short loc_4169D3"], [93, "nop"], [94, "leave"], [95, "retn"]], "data_dep": [[7, 6], [9, 4], [11, 10], [12, 5], [13, 12], [14, 3], [15, 14], [16, 15], [17, 16], [23, 3], [24, 23], [25, 13], [26, 25], [27, 26], [28, 27], [31, 7], [31, 54], [32, 31], [33, 32], [34, 55], [34, 8], [35, 34], [36, 35], [37, 36], [38, 33], [38, 37], [39, 38], [40, 3], [41, 29], [41, 56], [42, 39], [42, 40], [43, 3], [44, 29], [44, 56], [45, 9], [46, 43], [46, 45], [47, 3], [48, 29], [48, 56], [49, 47], [50, 3], [51, 29], [51, 56], [52, 11], [53, 50], [53, 52], [54, 7], [54, 54], [55, 8], [55, 55], [56, 29], [56, 56], [57, 29], [57, 56], [58, 27], [58, 57], [58, 50], [59, 58], [60, 59], [64, 7], [64, 86], [65, 64], [66, 65], [67, 8], [67, 87], [68, 67], [69, 68], [70, 66], [70, 69], [71, 70], [72, 3], [73, 62], [73, 88], [74, 72], [74, 71], [75, 3], [76, 88], [76, 62], [77, 9], [78, 77], [78, 75], [79, 3], [80, 88], [80, 62], [81, 79], [82, 3], [83, 62], [83, 88], [84, 11], [85, 82], [85, 84], [86, 7], [86, 86], [87, 8], [87, 87], [88, 88], [88, 62], [89, 88], [89, 62], [90, 89], [90, 82], [90, 27], [91, 90], [92, 91], [95, 59], [95, 91]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de_276536b89cc3e58f9e6dd34cde9d9d4ba21328c5a859320d5e06460e1ec2c7de.jsonl.gz", "strip_func_name": "sub_4168FE", "query": "\n\n\nbool __fastcall sub_4168FE(__int64 a1, unsigned __int8 a2, unsigned __int8 a3, char a4, char a5, char a6)\n{\nbool result; // al\nunsigned int j; // [rsp+28h] [rbp-8h]\nunsigned int i; // [rsp+2Ch] [rbp-4h]\n\nif ( *(_BYTE *)(a1 + 33) )\n__assert_fail(\"fifo->size == 0\", \"Core/display.c\", 0x21u, \"fifo_push_bg_row\");\n*(_BYTE *)(a1 + 33) = 8;\nif ( a6 != 1 )\n{\nfor ( i = 0; ; ++i )\n{\nresult = i <= 7;\nif ( i > 7 )\nbreak;\n*(_BYTE *)(a1 + 4LL * i) = (a2 >> 7) | (2 * (a3 >> 7));\n*(_BYTE *)(a1 + 4LL * i + 1) = a4;\n*(_BYTE *)(a1 + 4LL * i + 2) = 0;\n*(_BYTE *)(a1 + 4LL * i + 3) = a5;\na2 *= 2;\na3 *= 2;\n}\n}\nelse\n{\nfor ( j = 0; ; ++j )\n{\nresult = j <= 7;\nif ( j > 7 )\nbreak;\n*(_BYTE *)(a1 + 4LL * j) = a2 & 1 | (2 * a3) & 2;\n*(_BYTE *)(a1 + 4LL * j + 1) = a4;\n*(_BYTE *)(a1 + 4LL * j + 2) = 0;\n*(_BYTE *)(a1 + 4LL * j + 3) = a5;\na2 >>= 1;\na3 >>= 1;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,j,sub_4168FE,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'upper', 'a4': 'palette', 'a1': 'fifo', 'a2': 'lower', 'a5': 'bg_priority', 'a6': 'flip_x', 'j': 'i_0', 'sub_4168FE': 'fifo_push_bg_row'}"}
DecodeACC64DSPRegisterClass
0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8
michalsc
Emu68
NA
static DecodeStatus DecodeACC64DSPRegisterClass(MCInst *Inst, unsigned RegNo, uint64_t Address, const MCRegisterInfo *Decoder) { unsigned Reg; if (RegNo >= 4) return MCDisassembler_Fail; Reg = getReg(Decoder, Mips_ACC64DSPRegClassID, RegNo); MCOperand_CreateReg0(Inst, Reg); return MCDisassembler_Success; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4B5981", "function_addr": 4938113, "binary_name": "0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8.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, "cmp [rbp+var_1C], 3"], [8, "jbe short loc_4B59A5"], [9, "mov eax, 0"], [10, "jmp short locret_4B59D2"], [11, "mov edx, [rbp+var_1C]"], [12, "mov rax, [rbp+var_30]"], [13, "mov esi, 2Ch "], [14, "mov rdi, rax"], [15, "call sub_4B3C25"], [16, "mov [rbp+var_4], eax"], [17, "mov edx, [rbp+var_4]"], [18, "mov rax, [rbp+var_18]"], [19, "mov esi, edx"], [20, "mov rdi, rax"], [21, "call sub_437E96"], [22, "mov eax, 3"], [23, "leave"], [24, "retn"]], "data_dep": [[7, 4], [8, 7], [11, 4], [12, 6], [14, 12], [16, 15], [17, 16], [18, 3], [19, 17], [20, 18], [24, 9], [24, 22]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8_0ed415916a87ea50b57855dc7656ad162af56e16e4123e6135eccc15202117d8.jsonl.gz", "strip_func_name": "sub_4B5981", "query": "\n\n\n__int64 __fastcall sub_4B5981(__int64 a1, unsigned int a2, __int64 a3, __int64 a4)\n{\nint v5; // [rsp+2Ch] [rbp-4h]\n\nif ( a2 > 3 )\nreturn 0LL;\nv5 = sub_4B3C25(a4, 0x2Cu, a2);\nsub_437E96(a1, v5);\nreturn 3LL;\n}\n\n\n\nQ:[a4,a1,a2,a3,sub_4B5981,sub_4B3C25,sub_437E96,]\nAssistant: ", "hints": "[]", "response": "{'a4': 'Decoder', 'a1': 'Inst', 'a2': 'RegNo', 'a3': 'Address', 'sub_4B5981': 'DecodeACC64DSPRegisterClass', 'sub_4B3C25': 'getReg', 'sub_437E96': 'MCOperand_CreateReg0'}"}
htlock_wait_ticket
afbb4085404098c426373a603292431bd98601d53205f4fee5060e6b5a2b434a
LPD-EPFL
ASCYLIB
NA
static inline void htlock_wait_ticket(htlock_local_t* lock, const uint32_t ticket) { #if defined(OPTERON_OPTIMIZE) uint32_t wait = TICKET_BASE_WAIT; uint32_t distance_prev = 1; while (1) { PREFETCHW(lock); int32_t lock_cur = lock->cur; if (lock_cur == ticket) { break; } uint32_t distance = sub_abs(lock->cur, ticket); if (distance > 1) { if (distance != distance_prev) { distance_prev = distance; wait = TICKET_BASE_WAIT; } nop_rep(distance * wait); wait = (wait + TICKET_BASE_WAIT) & TICKET_MAX_WAIT; } else { nop_rep(TICKET_WAIT_NEXT); } } #else while (lock->cur != ticket) { uint32_t distance = sub_abs(lock->cur, ticket); if (distance > 1) { nop_rep(distance * TICKET_BASE_WAIT); } else { PAUSE; } } #endif /* OPTERON_OPTIMIZE */ }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401D3B", "function_addr": 4201787, "binary_name": "afbb4085404098c426373a603292431bd98601d53205f4fee5060e6b5a2b434a.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, "jmp short loc_401D7C"], [6, "mov rax, [rbp+var_18]"], [7, "mov eax, [rax+4]"], [8, "mov edx, eax"], [9, "mov eax, [rbp+var_1C]"], [10, "mov esi, eax"], [11, "mov edi, edx"], [12, "call sub_401D19"], [13, "mov [rbp+var_4], eax"], [14, "cmp [rbp+var_4], 1"], [15, "jbe short loc_401D79"], [16, "mov eax, [rbp+var_4]"], [17, "shl eax, 9"], [18, "mov edi, eax"], [19, "call sub_40158E"], [20, "jmp short loc_401D7C"], [21, "pause"], [22, "nop"], [23, "mov rax, [rbp+var_18]"], [24, "mov edx, [rax+4]"], [25, "mov eax, [rbp+var_1C]"], [26, "cmp edx, eax"], [27, "jnz short loc_401D4C"], [28, "nop"], [29, "nop"], [30, "leave"], [31, "retn"]], "data_dep": [[6, 3], [7, 6], [8, 7], [9, 4], [10, 9], [11, 8], [13, 12], [14, 13], [15, 14], [16, 13], [17, 16], [18, 17], [23, 3], [24, 23], [25, 4], [26, 24], [26, 25], [27, 26], [31, 25]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/afbb4085404098c426373a603292431bd98601d53205f4fee5060e6b5a2b434a_afbb4085404098c426373a603292431bd98601d53205f4fee5060e6b5a2b434a.jsonl.gz", "strip_func_name": "sub_401D3B", "query": "\n\n\n__int64 __fastcall sub_401D3B(__int64 a1, unsigned int a2)\n{\n__int64 result; // rax\nunsigned int v3; // [rsp+1Ch] [rbp-4h]\n\nwhile ( 1 )\n{\nresult = a2;\nif ( *(_DWORD *)(a1 + 4) == a2 )\nbreak;\nv3 = sub_401D19(*(_DWORD *)(a1 + 4), a2);\nif ( v3 <= 1 )\n_mm_pause();\nelse\nsub_40158E(v3 << 9);\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,sub_401D3B,sub_401D19,sub_40158E,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'lock', 'a2': 'ticket', 'v3': 'distance', 'sub_401D3B': 'htlock_wait_ticket', 'sub_401D19': '_sub_abs', 'sub_40158E': 'nop_rep'}"}
test_subscribe_options_messageArrived
cb0b70fcac8f2551fc8f6070bb8195eef129dee0b5380abcd9d8d4d8fd996940
gl-inet
gli-pub
NA
int test_subscribe_options_messageArrived(void* context, char* topicName, int topicLen, MQTTClient_message* message) { int subsidcount = 0, i = 0, subsid = -1; MyLog(LOGA_DEBUG, "Callback: message received on topic %s is %.*s.", topicName, message->payloadlen, (char*)(message->payload)); assert("Message structure version should be 1", message->struct_version == 1, "message->struct_version was %d", message->struct_version); if (message->struct_version == 1) { const int props_count = 0; MyLog(LOGA_INFO, "Message properties:"); logProperties(&message->properties); } test_subscribe_options_globals.messages_arrived++; if (test_subscribe_options_globals.messages_arrived == 1) { subsidcount = MQTTProperties_propertyCount(&message->properties, MQTTPROPERTY_CODE_SUBSCRIPTION_IDENTIFIER); assert("Subsidcount is i", subsidcount == 1, "subsidcount is not correct %d\n", subsidcount); subsid = MQTTProperties_getNumericValueAt(&message->properties, MQTTPROPERTY_CODE_SUBSCRIPTION_IDENTIFIER, 0); assert("Subsid is 2", subsid == 2, "subsid is not correct %d\n", subsid); } MQTTClient_free(topicName); MQTTClient_freeMessage(&message); return 1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_407B39", "function_addr": 4225849, "binary_name": "cb0b70fcac8f2551fc8f6070bb8195eef129dee0b5380abcd9d8d4d8fd996940.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_24], edx"], [6, "mov [rbp+var_30], rcx"], [7, "mov [rbp+var_4], 0"], [8, "mov [rbp+var_8], 0"], [9, "mov [rbp+var_C], 0FFFFFFFFh"], [10, "mov rax, [rbp+var_30]"], [11, "mov rcx, [rax+10h]"], [12, "mov rax, [rbp+var_30]"], [13, "mov edx, [rax+8]"], [14, "mov rax, [rbp+var_20]"], [15, "mov r8, rcx"], [16, "mov ecx, edx"], [17, "mov rdx, rax"], [18, "mov esi, offset aCallbackMessag"], [19, "mov edi, 0"], [20, "mov eax, 0"], [21, "call sub_402D58"], [22, "mov rax, [rbp+var_30]"], [23, "mov edx, [rax+4]"], [24, "mov rax, [rbp+var_30]"], [25, "mov eax, [rax+4]"], [26, "cmp eax, 1"], [27, "setz al"], [28, "movzx eax, al"], [29, "mov r9d, edx"], [30, "mov r8d, offset aMessageStructV"], [31, "mov ecx, eax"], [32, "mov edx, offset aMessageStructu"], [33, "mov esi, 5E1h"], [34, "mov edi, offset aSrcTestTest10C"], [35, "mov eax, 0"], [36, "call sub_403081"], [37, "mov rax, [rbp+var_30]"], [38, "mov eax, [rax+4]"], [39, "cmp eax, 1"], [40, "jnz short loc_407C06"], [41, "mov [rbp+var_10], 0"], [42, "mov esi, offset aMessagePropert"], [43, "mov edi, 1"], [44, "mov eax, 0"], [45, "call sub_402D58"], [46, "mov rax, [rbp+var_30]"], [47, "add rax, 28h "], [48, "mov rdi, rax"], [49, "call sub_4031F1"], [50, "mov eax, cs:dword_40D308"], [51, "add eax, 1"], [52, "mov cs:dword_40D308, eax"], [53, "mov eax, cs:dword_40D308"], [54, "cmp eax, 1"], [55, "jnz loc_407CBB"], [56, "mov rax, [rbp+var_30]"], [57, "add rax, 28h "], [58, "mov esi, 0Bh"], [59, "mov rdi, rax"], [60, "call _MQTTProperties_propertyCount"], [61, "mov [rbp+var_4], eax"], [62, "cmp [rbp+var_4], 1"], [63, "setz al"], [64, "movzx eax, al"], [65, "mov edx, [rbp+var_4]"], [66, "mov r9d, edx"], [67, "mov r8d, offset aSubsidcountIsN"], [68, "mov ecx, eax"], [69, "mov edx, offset aSubsidcountIsI"], [70, "mov esi, 5EFh"], [71, "mov edi, offset aSrcTestTest10C"], [72, "mov eax, 0"], [73, "call sub_403081"], [74, "mov rax, [rbp+var_30]"], [75, "add rax, 28h "], [76, "mov edx, 0"], [77, "mov esi, 0Bh"], [78, "mov rdi, rax"], [79, "call _MQTTProperties_getNumericValueAt"], [80, "mov [rbp+var_C], eax"], [81, "cmp [rbp+var_C], 2"], [82, "setz al"], [83, "movzx eax, al"], [84, "mov edx, [rbp+var_C]"], [85, "mov r9d, edx"], [86, "mov r8d, offset aSubsidIsNotCor"], [87, "mov ecx, eax"], [88, "mov edx, offset aSubsidIs2"], [89, "mov esi, 5F2h"], [90, "mov edi, offset aSrcTestTest10C"], [91, "mov eax, 0"], [92, "call sub_403081"], [93, "mov rax, [rbp+var_20]"], [94, "mov rdi, rax"], [95, "call _MQTTClient_free"], [96, "lea rax, [rbp+var_30]"], [97, "mov rdi, rax"], [98, "call _MQTTClient_freeMessage"], [99, "mov eax, 1"], [100, "leave"], [101, "retn"]], "data_dep": [[10, 6], [11, 10], [12, 6], [13, 12], [14, 4], [15, 11], [16, 13], [17, 14], [22, 6], [23, 22], [24, 6], [25, 24], [26, 25], [27, 25], [27, 26], [28, 27], [29, 23], [31, 28], [37, 6], [38, 37], [39, 38], [40, 39], [46, 6], [47, 46], [48, 47], [51, 50], [52, 51], [53, 52], [54, 53], [55, 54], [56, 6], [57, 56], [59, 57], [61, 60], [62, 61], [63, 62], [63, 60], [64, 63], [65, 61], [66, 65], [68, 64], [74, 6], [75, 74], [78, 75], [80, 79], [81, 80], [82, 81], [82, 79], [83, 82], [84, 80], [85, 84], [87, 83], [93, 4], [94, 93], [96, 95], [96, 6], [97, 96], [101, 99]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/cb0b70fcac8f2551fc8f6070bb8195eef129dee0b5380abcd9d8d4d8fd996940_cb0b70fcac8f2551fc8f6070bb8195eef129dee0b5380abcd9d8d4d8fd996940.jsonl.gz", "strip_func_name": "sub_407B39", "query": "\n\n\n__int64 __fastcall sub_407B39(__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\nunsigned int v12; // [rsp+24h] [rbp-Ch]\nunsigned int v13; // [rsp+2Ch] [rbp-4h]\n\nsub_402D58(\n0,\n\"Callback: message received on topic %s is %.*s.\",\na2,\n*(unsigned int *)(a4 + 8),\n*(_QWORD *)(a4 + 16),\na6);\nsub_403081(\n\"src/../test/test10.c\",\n0x5E1u,\n\"Message structure version should be 1\",\n*(_DWORD *)(a4 + 4) == 1,\n\"message->struct_version was %d\",\n*(unsigned int *)(a4 + 4));\nif ( *(_DWORD *)(a4 + 4) == 1 )\n{\nsub_402D58(1, \"Message properties:\", v6, v7, v8, v9);\nsub_4031F1((unsigned int *)(a4 + 40));\n}\nif ( ++dword_40D308 == 1 )\n{\nv13 = MQTTProperties_propertyCount();\nsub_403081(\"src/../test/test10.c\", 0x5EFu, \"Subsidcount is i\", v13 == 1, \"subsidcount is not correct %d\\n\", v13);\nv12 = MQTTProperties_getNumericValueAt();\nsub_403081(\"src/../test/test10.c\", 0x5F2u, \"Subsid is 2\", v12 == 2, \"subsid is not correct %d\\n\", v12);\n}\nMQTTClient_free();\nMQTTClient_freeMessage();\nreturn 1LL;\n}\n\n\n\nQ:[a4,a2,a1,a3,v6,v7,v12,v13,sub_407B39,sub_402D58,sub_403081,sub_4031F1,]\nAssistant: ", "hints": "[]", "response": "{'a4': 'message', 'a2': 'topicName', 'a1': 'context', 'a3': 'topicLen', 'v6': 'topicLen', 'v7': 'message', 'v12': 'subsid', 'v13': 'subsidcount', 'sub_407B39': 'test_subscribe_options_messageArrived', 'sub_402D58': 'MyLog', 'sub_403081': 'myassert', 'sub_4031F1': 'logProperties'}"}
parse_file
d744990428ab298b4ba9306c2f626efed569a0ac8681f7d4ca973880f5d19a66
Embedfire
ebf_6ull_linux
NA
static void parse_file(const char *name) { opt_file = name; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403E8C", "function_addr": 4210316, "binary_name": "d744990428ab298b4ba9306c2f626efed569a0ac8681f7d4ca973880f5d19a66.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov rax, [rbp+var_8]"], [4, "mov cs:dir, rax"], [5, "nop"], [6, "pop rbp"], [7, "retn"]], "data_dep": [[3, 2], [4, 3], [6, 0], [7, 3]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/d744990428ab298b4ba9306c2f626efed569a0ac8681f7d4ca973880f5d19a66_d744990428ab298b4ba9306c2f626efed569a0ac8681f7d4ca973880f5d19a66.jsonl.gz", "strip_func_name": "sub_403E8C", "query": "\n\n\nchar *__fastcall sub_403E8C(char *a1)\n{\nchar *result; // rax\n\nresult = a1;\ndir = a1;\nreturn result;\n}\n\n\n\nQ:[a1,sub_403E8C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'name', 'sub_403E8C': 'parse_file'}"}
ZSTD_freeCCtxContent
8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05
soedinglab
MMseqs2
NA
static void ZSTD_freeCCtxContent(ZSTD_CCtx* cctx) { assert(cctx != NULL); assert(cctx->staticSize == 0); ZSTD_free(cctx->workSpace, cctx->customMem); cctx->workSpace = NULL; ZSTD_freeCDict(cctx->cdictLocal); cctx->cdictLocal = NULL; #ifdef ZSTD_MULTITHREAD ZSTDMT_freeCCtx(cctx->mtctx); cctx->mtctx = NULL; #endif }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_409ABB", "function_addr": 4233915, "binary_name": "8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05.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 rdx, [rax+108h]"], [6, "sub rsp, 8"], [7, "mov rax, [rbp+var_8]"], [8, "push qword ptr [rax+1A0h]"], [9, "push qword ptr [rax+198h]"], [10, "push qword ptr [rax+190h]"], [11, "mov rdi, rdx"], [12, "call sub_4087FD"], [13, "add rsp, 20h"], [14, "mov rax, [rbp+var_8]"], [15, "mov qword ptr [rax+108h], 0"], [16, "mov rax, [rbp+var_8]"], [17, "mov rax, [rax+3A0h]"], [18, "mov rdi, rax"], [19, "call sub_412980"], [20, "mov rax, [rbp+var_8]"], [21, "mov qword ptr [rax+3A0h], 0"], [22, "nop"], [23, "leave"], [24, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 2], [7, 3], [8, 7], [9, 7], [10, 7], [11, 5], [13, 6], [14, 3], [15, 14], [16, 3], [17, 16], [17, 15], [18, 17], [20, 3], [21, 20], [24, 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/8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05_8344e4f2e71647113a4027b2f26417ee1a42cf3c0de632f9252e1b29c5147f05.jsonl.gz", "strip_func_name": "sub_409ABB", "query": "\n\n\n__int64 __fastcall sub_409ABB(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 result; // rax\n\nsub_4087FD(\n*(void **)(a1 + 264),\na2,\n*(_QWORD *)(a1 + 264),\na4,\na5,\na6,\n*(_QWORD *)(a1 + 400),\n*(void (__fastcall **)(__int64, void *))(a1 + 408),\n*(_QWORD *)(a1 + 416));\n*(_QWORD *)(a1 + 264) = 0LL;\nsub_412980(*(_QWORD *)(a1 + 928));\nresult = a1;\n*(_QWORD *)(a1 + 928) = 0LL;\nreturn result;\n}\n\n\n\nQ:[a1,sub_409ABB,sub_4087FD,sub_412980,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'cctx', 'sub_409ABB': 'ZSTD_freeCCtxContent', 'sub_4087FD': 'ZSTD_free', 'sub_412980': 'ZSTD_freeCDict'}"}
lv_chart_set_zoom_y
53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783
sukesh-ak
ESP32-TUX
NA
void lv_chart_set_zoom_y(lv_obj_t * obj, uint16_t zoom_y) { LV_ASSERT_OBJ(obj, MY_CLASS); lv_chart_t * chart = (lv_chart_t *)obj; if(chart->zoom_y == zoom_y) return; chart->zoom_y = zoom_y; lv_obj_refresh_self_size(obj); /*Be the chart doesn't remain scrolled out*/ lv_obj_readjust_scroll(obj, LV_ANIM_OFF); lv_obj_invalidate(obj); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_45DF99", "function_addr": 4579225, "binary_name": "53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov eax, esi"], [5, "mov [rbp+var_1C], ax"], [6, "mov rax, [rbp+var_18]"], [7, "mov [rbp+var_8], rax"], [8, "mov rax, [rbp+var_8]"], [9, "movzx eax, word ptr [rax+0B2h]"], [10, "cmp [rbp+var_1C], ax"], [11, "jz short loc_45DFFE"], [12, "mov rax, [rbp+var_8]"], [13, "movzx edx, [rbp+var_1C]"], [14, "mov [rax+0B2h], dx"], [15, "mov rax, [rbp+var_18]"], [16, "mov rdi, rax"], [17, "call sub_41F992"], [18, "mov rax, [rbp+var_18]"], [19, "mov esi, 0"], [20, "mov rdi, rax"], [21, "call sub_4236C6"], [22, "mov rax, [rbp+var_18]"], [23, "mov rdi, rax"], [24, "call sub_4205DF"], [25, "jmp short locret_45DFFF"], [26, "nop"], [27, "leave"], [28, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 6], [8, 7], [9, 8], [10, 9], [10, 5], [11, 10], [12, 7], [13, 5], [14, 13], [14, 12], [15, 3], [16, 15], [18, 3], [20, 18], [22, 3], [23, 22], [28, 9], [28, 24]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783_53faff7486da2db257c0486a573e49eb3e70656a42b3e2ad40ce428af0925783.jsonl.gz", "strip_func_name": "sub_45DF99", "query": "\n\n\n__int64 __fastcall sub_45DF99(__int64 a1, __int16 a2)\n{\n__int64 result; // rax\n\nresult = *(unsigned __int16 *)(a1 + 178);\nif ( a2 != (_WORD)result )\n{\n*(_WORD *)(a1 + 178) = a2;\nsub_41F992(a1);\nsub_4236C6(a1, 0);\nresult = sub_4205DF(a1);\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_45DF99,sub_41F992,sub_4236C6,sub_4205DF,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'obj', 'a2': 'zoom_y', 'sub_45DF99': 'lv_chart_set_zoom_y', 'sub_41F992': 'lv_obj_refresh_self_size', 'sub_4236C6': 'lv_obj_readjust_scroll', 'sub_4205DF': 'lv_obj_invalidate'}"}
mbedtls_aes_crypt_cfb8
ff5699798398ae88f37e03e58544b6b9131de65c851c8a96bc8e095fd0cb9939
FreeRTOS
iot-reference-stm32u5
NA
int mbedtls_aes_crypt_cfb8( mbedtls_aes_context *ctx, int mode, size_t length, unsigned char iv[16], const unsigned char *input, unsigned char *output ) { unsigned char c; unsigned char ov[17]; AES_VALIDATE_RET( ctx != NULL ); AES_VALIDATE_RET( mode == MBEDTLS_AES_ENCRYPT || mode == MBEDTLS_AES_DECRYPT ); AES_VALIDATE_RET( iv != NULL ); AES_VALIDATE_RET( input != NULL ); AES_VALIDATE_RET( output != NULL ); while( length-- ) { memcpy( ov, iv, 16 ); mbedtls_aes_crypt_ecb( ctx, MBEDTLS_AES_ENCRYPT, iv, iv ); if( mode == MBEDTLS_AES_DECRYPT ) ov[16] = *input; c = *output++ = (unsigned char)( iv[0] ^ *input++ ); if( mode == MBEDTLS_AES_ENCRYPT ) ov[16] = c; memcpy( iv, ov + 1, 16 ); } return( 0 ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_443753", "function_addr": 4470611, "binary_name": "ff5699798398ae88f37e03e58544b6b9131de65c851c8a96bc8e095fd0cb9939.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+var_28], rdi"], [4, "mov [rbp+var_2C], esi"], [5, "mov [rbp+var_38], rdx"], [6, "mov [rbp+var_40], rcx"], [7, "mov [rbp+var_48], r8"], [8, "mov [rbp+var_50], r9"], [9, "jmp loc_443808"], [10, "mov rax, [rbp+var_40]"], [11, "mov rdx, [rax+8]"], [12, "mov rax, [rax]"], [13, "mov [rbp+var_20], rax"], [14, "mov [rbp+var_18], rdx"], [15, "mov rcx, [rbp+var_40]"], [16, "mov rdx, [rbp+var_40]"], [17, "mov rax, [rbp+var_28]"], [18, "mov esi, 1"], [19, "mov rdi, rax"], [20, "call sub_442E09"], [21, "cmp [rbp+var_2C], 0"], [22, "jnz short loc_4437B3"], [23, "mov rax, [rbp+var_48]"], [24, "movzx eax, byte ptr [rax]"], [25, "mov [rbp+var_10], al"], [26, "mov rax, [rbp+var_40]"], [27, "movzx esi, byte ptr [rax]"], [28, "mov rax, [rbp+var_48]"], [29, "lea rdx, [rax+1]"], [30, "mov [rbp+var_48], rdx"], [31, "movzx ecx, byte ptr [rax]"], [32, "mov rax, [rbp+var_50]"], [33, "lea rdx, [rax+1]"], [34, "mov [rbp+var_50], rdx"], [35, "xor esi, ecx"], [36, "mov edx, esi"], [37, "mov [rax], dl"], [38, "movzx eax, byte ptr [rax]"], [39, "mov [rbp+var_1], al"], [40, "cmp [rbp+var_2C], 1"], [41, "jnz short loc_4437EE"], [42, "movzx eax, [rbp+var_1]"], [43, "mov [rbp+var_10], al"], [44, "lea rax, [rbp+var_20]"], [45, "add rax, 1"], [46, "mov rdx, [rax+8]"], [47, "mov rax, [rax]"], [48, "mov rcx, [rbp+var_40]"], [49, "mov [rcx], rax"], [50, "mov [rcx+8], rdx"], [51, "mov rax, [rbp+var_38]"], [52, "lea rdx, [rax-1]"], [53, "mov [rbp+var_38], rdx"], [54, "test rax, rax"], [55, "jnz loc_443777"], [56, "mov eax, 0"], [57, "leave"], [58, "retn"]], "data_dep": [[10, 6], [11, 37], [11, 50], [11, 49], [11, 10], [12, 49], [12, 10], [12, 37], [12, 50], [13, 12], [14, 11], [15, 6], [16, 6], [17, 3], [19, 17], [21, 4], [22, 21], [23, 30], [23, 7], [24, 37], [24, 23], [24, 50], [24, 49], [25, 24], [26, 6], [27, 50], [27, 49], [27, 26], [27, 37], [28, 30], [28, 7], [29, 50], [29, 49], [29, 28], [29, 37], [29, 16], [30, 29], [31, 49], [31, 28], [31, 37], [31, 50], [32, 34], [32, 8], [33, 29], [33, 49], [33, 37], [33, 32], [33, 50], [34, 33], [35, 27], [35, 31], [36, 35], [37, 32], [37, 36], [38, 32], [38, 37], [39, 38], [40, 4], [41, 40], [42, 39], [43, 42], [44, 38], [44, 13], [44, 42], [45, 44], [46, 50], [46, 45], [46, 49], [46, 37], [47, 50], [47, 45], [47, 49], [47, 37], [48, 6], [49, 48], [49, 47], [50, 46], [50, 48], [51, 53], [51, 5], [52, 49], [52, 51], [52, 37], [52, 46], [52, 50], [53, 52], [54, 51], [55, 54], [58, 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/ff5699798398ae88f37e03e58544b6b9131de65c851c8a96bc8e095fd0cb9939_ff5699798398ae88f37e03e58544b6b9131de65c851c8a96bc8e095fd0cb9939.jsonl.gz", "strip_func_name": "sub_443753", "query": "\n\n\n__int64 __fastcall sub_443753(__int64 a1, int a2, __int64 a3, __int64 a4, char *a5, _BYTE *a6)\n{\nchar *v6; // rax\nchar v7; // cl\n_BYTE *v8; // rax\n_BYTE v15[17]; // [rsp+30h] [rbp-20h]\n\nwhile ( a3-- )\n{\n*(_QWORD *)v15 = *(_QWORD *)a4;\n*(_QWORD *)&v15[8] = *(_QWORD *)(a4 + 8);\nsub_442E09(a1, 1u, (unsigned __int16 *)a4, (unsigned int *)a4);\nif ( !a2 )\nv15[16] = *a5;\nv6 = a5++;\nv7 = *v6;\nv8 = a6++;\n*v8 = v7 ^ *(_BYTE *)a4;\nif ( a2 == 1 )\nv15[16] = *v8;\n*(_OWORD *)a4 = *(_OWORD *)&v15[1];\n}\nreturn 0LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,v15,sub_443753,sub_442E09,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'length', 'a4': 'iv', 'a1': 'ctx', 'a2': 'mode', 'a5': 'input', 'a6': 'output', 'v15': 'ov', 'sub_443753': 'mbedtls_aes_crypt_cfb8', 'sub_442E09': 'mbedtls_aes_crypt_ecb'}"}
ce_write
fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc
msysgit
msysgit
NA
static int ce_write(git_SHA_CTX *context, int fd, void *data, unsigned int len) { while (len) { unsigned int buffered = write_buffer_len; unsigned int partial = WRITE_BUFFER_SIZE - buffered; if (partial > len) partial = len; memcpy(write_buffer + buffered, data, partial); buffered += partial; if (buffered == WRITE_BUFFER_SIZE) { write_buffer_len = buffered; if (ce_write_flush(context, fd)) return -1; buffered = 0; } write_buffer_len = buffered; len -= partial; data = (char *) data + partial; } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_45B62E", "function_addr": 4568622, "binary_name": "fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc.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+src], rdx"], [6, "mov [rbp+var_20], ecx"], [7, "jmp loc_45B6DB"], [8, "mov rax, cs:qword_524260"], [9, "mov dword ptr [rbp+n+4], eax"], [10, "mov eax, 2000h"], [11, "sub eax, dword ptr [rbp+n+4]"], [12, "mov dword ptr [rbp+n], eax"], [13, "mov eax, dword ptr [rbp+n]"], [14, "cmp eax, [rbp+var_20]"], [15, "jbe short loc_45B66C"], [16, "mov eax, [rbp+var_20]"], [17, "mov dword ptr [rbp+n], eax"], [18, "mov edx, dword ptr [rbp+n]"], [19, "mov eax, dword ptr [rbp+n+4]"], [20, "lea rcx, unk_522260[rax]"], [21, "mov rax, [rbp+src]"], [22, "mov rsi, rax"], [23, "mov rdi, rcx"], [24, "call _memcpy"], [25, "mov eax, dword ptr [rbp+n]"], [26, "add dword ptr [rbp+n+4], eax"], [27, "cmp dword ptr [rbp+n+4], 2000h"], [28, "jnz short loc_45B6C4"], [29, "mov eax, dword ptr [rbp+n+4]"], [30, "mov cs:qword_524260, rax"], [31, "mov edx, [rbp+var_1C]"], [32, "mov rax, [rbp+var_18]"], [33, "mov esi, edx"], [34, "mov rdi, rax"], [35, "call sub_45B5C8"], [36, "test eax, eax"], [37, "jz short loc_45B6BD"], [38, "mov eax, 0FFFFFFFFh"], [39, "jmp short locret_45B6EA"], [40, "mov dword ptr [rbp+n+4], 0"], [41, "mov eax, dword ptr [rbp+n+4]"], [42, "mov cs:qword_524260, rax"], [43, "mov eax, dword ptr [rbp+n]"], [44, "sub [rbp+var_20], eax"], [45, "mov eax, dword ptr [rbp+n]"], [46, "add [rbp+src], rax"], [47, "cmp [rbp+var_20], 0"], [48, "jnz loc_45B649"], [49, "mov eax, 0"], [50, "leave"], [51, "retn"]], "data_dep": [[8, 42], [9, 8], [11, 10], [11, 9], [12, 11], [13, 12], [14, 13], [14, 6], [14, 44], [15, 14], [16, 44], [16, 6], [17, 16], [18, 17], [18, 12], [19, 9], [20, 20], [21, 46], [21, 5], [22, 21], [23, 20], [25, 12], [25, 17], [26, 9], [26, 25], [27, 26], [28, 27], [29, 26], [30, 29], [31, 4], [32, 3], [33, 31], [34, 32], [36, 35], [37, 36], [41, 40], [41, 26], [42, 41], [43, 12], [43, 17], [44, 44], [44, 43], [44, 6], [45, 12], [45, 17], [46, 45], [46, 5], [46, 46], [47, 6], [47, 44], [48, 47], [51, 38], [51, 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/fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc_fe061f006c9207a403c62f4326f1088f1778f9ddddd6b2b4a2e47dc4d592c0fc.jsonl.gz", "strip_func_name": "sub_45B62E", "query": "\n\n\n__int64 __fastcall sub_45B62E(__int64 a1, int a2, char *a3, unsigned int a4)\n{\nunsigned int n; // [rsp+28h] [rbp-8h]\nint n_4; // [rsp+2Ch] [rbp-4h]\nunsigned int n_4a; // [rsp+2Ch] [rbp-4h]\n\nwhile ( a4 )\n{\nn_4 = qword_524260;\nn = 0x2000 - qword_524260;\nif ( 0x2000 - (int)qword_524260 > a4 )\nn = a4;\nmemcpy(&byte_522260[(unsigned int)qword_524260], a3, n);\nn_4a = n + n_4;\nif ( n_4a == 0x2000 )\n{\nqword_524260 = 0x2000LL;\nif ( (unsigned int)sub_45B5C8(a1, a2) )\nreturn 0xFFFFFFFFLL;\nn_4a = 0;\n}\nqword_524260 = n_4a;\na4 -= n;\na3 += n;\n}\nreturn 0LL;\n}\n\n\n\nQ:[a3,a4,a1,a2,n,n_4,sub_45B62E,sub_45B5C8,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'data', 'a4': 'len', 'a1': 'context', 'a2': 'fd', 'n': 'partial', 'n_4': 'buffereda', 'sub_45B62E': 'ce_write', 'sub_45B5C8': 'ce_write_flush'}"}
s2e_updateMuxtime
3e34965c13508885b6b154f2c30077490ddbf23ac2d63f3c173f3ad61b227c59
lorabasics
basicstation
NA
ustime_t s2e_updateMuxtime(s2ctx_t* s2ctx, double muxstime, ustime_t now) { if( now == 0 ) now = rt_getTime(); s2ctx->muxtime = muxstime; s2ctx->reftime = now; return now; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_416847", "function_addr": 4286535, "binary_name": "3e34965c13508885b6b154f2c30077490ddbf23ac2d63f3c173f3ad61b227c59.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "movsd [rbp+var_10], xmm0"], [5, "mov [rbp+var_18], rsi"], [6, "cmp [rbp+var_18], 0"], [7, "jnz short loc_416871"], [8, "mov eax, 0"], [9, "call sub_40FF1B"], [10, "mov [rbp+var_18], rax"], [11, "mov rax, [rbp+var_8]"], [12, "movsd xmm0, [rbp+var_10]"], [13, "movsd qword ptr [rax+9930h], xmm0"], [14, "mov rax, [rbp+var_8]"], [15, "mov rdx, [rbp+var_18]"], [16, "mov [rax+9938h], rdx"], [17, "mov rax, [rbp+var_18]"], [18, "leave"], [19, "retn"]], "data_dep": [[6, 5], [7, 6], [10, 9], [11, 3], [12, 4], [13, 12], [13, 11], [14, 3], [15, 5], [15, 10], [16, 15], [16, 14], [17, 10], [17, 5], [19, 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/3e34965c13508885b6b154f2c30077490ddbf23ac2d63f3c173f3ad61b227c59_3e34965c13508885b6b154f2c30077490ddbf23ac2d63f3c173f3ad61b227c59.jsonl.gz", "strip_func_name": "sub_416847", "query": "\n\n\n__time_t __fastcall sub_416847(__int64 a1, __time_t a2, double a3)\n{\n__time_t v4; // [rsp+8h] [rbp-18h]\n\nv4 = a2;\nif ( !a2 )\nv4 = sub_40FF1B();\n*(double *)(a1 + 39216) = a3;\n*(_QWORD *)(a1 + 39224) = v4;\nreturn v4;\n}\n\n\n\nQ:[a1,a2,a3,v4,sub_416847,sub_40FF1B,]\nAssistant: ", "hints": "[]", "response": "{'a1': 's2ctx', 'a2': 'now', 'a3': 'muxstime', 'v4': 'nowa', 'sub_416847': 's2e_updateMuxtime', 'sub_40FF1B': 'rt_getTime'}"}
jas_stream_flushbuf
f4745e82b1d0cff651d46375754e6291357312b85b3ec537e20de9075c6972a9
hagish
love-native-android
NA
int jas_stream_flushbuf(jas_stream_t *stream, int c) { int len; int n; /* The stream should not be in an error or EOF state. */ if ((stream->flags_ & (JAS_STREAM_ERRMASK)) != 0) { return EOF; } /* The stream must be open for writing. */ if ((stream->openmode_ & (JAS_STREAM_WRITE | JAS_STREAM_APPEND)) == 0) { return EOF; } /* The buffer should not currently be in use for reading. */ assert(!(stream->bufmode_ & JAS_STREAM_RDBUF)); /* Note: Do not use the quantity stream->cnt to determine the number of characters in the buffer! Depending on how this function was called, the stream->cnt value may be "off-by-one". */ len = stream->ptr_ - stream->bufstart_; if (len > 0) { n = (*stream->ops_->write_)(stream->obj_, (char *) stream->bufstart_, len); if (n != len) { stream->flags_ |= JAS_STREAM_ERR; return EOF; } } stream->cnt_ = stream->bufsize_; stream->ptr_ = stream->bufstart_; stream->bufmode_ |= JAS_STREAM_WRBUF; if (c != EOF) { assert(stream->cnt_ > 0); return jas_stream_putc2(stream, c); } return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A258", "function_addr": 4235864, "binary_name": "f4745e82b1d0cff651d46375754e6291357312b85b3ec537e20de9075c6972a9.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 eax, [rax+8]"], [7, "and eax, 7"], [8, "test eax, eax"], [9, "jz short loc_40A27F"], [10, "mov eax, 0FFFFFFFFh"], [11, "jmp locret_40A40A"], [12, "mov rax, [rbp+var_18]"], [13, "mov eax, [rax]"], [14, "and eax, 6"], [15, "test eax, eax"], [16, "jnz short loc_40A296"], [17, "mov eax, 0FFFFFFFFh"], [18, "jmp locret_40A40A"], [19, "mov rax, [rbp+var_18]"], [20, "mov eax, [rax+4]"], [21, "and eax, 10h"], [22, "test eax, eax"], [23, "jz short loc_40A2BD"], [24, "mov ecx, offset aJasStreamFlush"], [25, "mov edx, 32Ch"], [26, "mov esi, offset aJasStreamC"], [27, "mov edi, offset aStreamBufmodeJ_1"], [28, "call ___assert_fail"], [29, "mov rax, [rbp+var_18]"], [30, "mov rdx, [rax+28h]"], [31, "mov rax, [rbp+var_18]"], [32, "mov rcx, [rax+18h]"], [33, "mov rax, rdx"], [34, "sub rax, rcx"], [35, "mov [rbp+var_4], eax"], [36, "cmp [rbp+var_4], 0"], [37, "jle short loc_40A32C"], [38, "mov rax, [rbp+var_18]"], [39, "mov rax, [rax+48h]"], [40, "mov r8, [rax+8]"], [41, "mov rax, [rbp+var_18]"], [42, "mov rcx, [rax+18h]"], [43, "mov rax, [rbp+var_18]"], [44, "mov rax, [rax+50h]"], [45, "mov edx, [rbp+var_4]"], [46, "mov rsi, rcx"], [47, "mov rdi, rax"], [48, "call r8"], [49, "mov [rbp+var_8], eax"], [50, "mov eax, [rbp+var_8]"], [51, "cmp eax, [rbp+var_4]"], [52, "jz short loc_40A32C"], [53, "mov rax, [rbp+var_18]"], [54, "mov eax, [rax+8]"], [55, "or eax, 2"], [56, "mov edx, eax"], [57, "mov rax, [rbp+var_18]"], [58, "mov [rax+8], edx"], [59, "mov eax, 0FFFFFFFFh"], [60, "jmp locret_40A40A"], [61, "mov rax, [rbp+var_18]"], [62, "mov edx, [rax+20h]"], [63, "mov rax, [rbp+var_18]"], [64, "mov [rax+30h], edx"], [65, "mov rax, [rbp+var_18]"], [66, "mov rdx, [rax+18h]"], [67, "mov rax, [rbp+var_18]"], [68, "mov [rax+28h], rdx"], [69, "mov rax, [rbp+var_18]"], [70, "mov eax, [rax+4]"], [71, "or eax, 20h"], [72, "mov edx, eax"], [73, "mov rax, [rbp+var_18]"], [74, "mov [rax+4], edx"], [75, "cmp [rbp+var_1C], 0FFFFFFFFh"], [76, "jz loc_40A405"], [77, "mov rax, [rbp+var_18]"], [78, "mov eax, [rax+30h]"], [79, "test eax, eax"], [80, "jg short loc_40A38B"], [81, "mov ecx, offset aJasStreamFlush"], [82, "mov edx, 340h"], [83, "mov esi, offset aJasStreamC"], [84, "mov edi, offset aStreamCnt0"], [85, "call ___assert_fail"], [86, "mov rax, [rbp+var_18]"], [87, "mov eax, [rax+4]"], [88, "or eax, 20h"], [89, "mov edx, eax"], [90, "mov rax, [rbp+var_18]"], [91, "mov [rax+4], edx"], [92, "mov rax, [rbp+var_18]"], [93, "mov eax, [rax+30h]"], [94, "lea edx, [rax-1]"], [95, "mov rax, [rbp+var_18]"], [96, "mov [rax+30h], edx"], [97, "mov rax, [rbp+var_18]"], [98, "mov eax, [rax+30h]"], [99, "test eax, eax"], [100, "jns short loc_40A3D0"], [101, "mov eax, [rbp+var_1C]"], [102, "movzx edx, al"], [103, "mov rax, [rbp+var_18]"], [104, "mov esi, edx"], [105, "mov rdi, rax"], [106, "call sub_40A258"], [107, "jmp short locret_40A40A"], [108, "mov rax, [rbp+var_18]"], [109, "mov rax, [rax+58h]"], [110, "lea rdx, [rax+1]"], [111, "mov rax, [rbp+var_18]"], [112, "mov [rax+58h], rdx"], [113, "mov rax, [rbp+var_18]"], [114, "mov rax, [rax+28h]"], [115, "lea rcx, [rax+1]"], [116, "mov rdx, [rbp+var_18]"], [117, "mov [rdx+28h], rcx"], [118, "mov edx, [rbp+var_1C]"], [119, "mov [rax], dl"], [120, "movzx eax, byte ptr [rax]"], [121, "movzx eax, al"], [122, "jmp short locret_40A40A"], [123, "mov eax, 0"], [124, "leave"], [125, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 7], [9, 8], [12, 3], [13, 12], [14, 13], [15, 14], [16, 15], [19, 3], [20, 19], [21, 20], [22, 21], [23, 22], [29, 3], [30, 29], [31, 3], [32, 31], [33, 30], [34, 32], [34, 33], [35, 34], [36, 35], [37, 36], [38, 3], [39, 38], [40, 39], [41, 3], [42, 41], [43, 3], [44, 43], [45, 35], [46, 42], [47, 44], [48, 40], [49, 48], [50, 49], [51, 50], [51, 35], [52, 51], [53, 3], [54, 53], [55, 54], [56, 55], [57, 3], [58, 56], [58, 57], [61, 3], [62, 61], [63, 3], [64, 62], [64, 63], [65, 3], [66, 64], [66, 65], [67, 3], [68, 66], [68, 67], [69, 3], [70, 68], [70, 69], [71, 70], [72, 71], [73, 3], [74, 73], [74, 72], [75, 4], [76, 75], [77, 3], [78, 68], [78, 77], [78, 74], [78, 64], [79, 78], [80, 79], [86, 3], [87, 64], [87, 91], [87, 68], [87, 86], [87, 74], [87, 96], [88, 87], [89, 88], [90, 3], [91, 89], [91, 90], [92, 3], [93, 92], [93, 64], [93, 91], [94, 89], [94, 91], [94, 93], [95, 3], [96, 95], [96, 94], [97, 3], [98, 96], [98, 97], [99, 98], [100, 99], [101, 4], [102, 101], [103, 3], [104, 102], [105, 103], [108, 3], [109, 108], [109, 117], [109, 74], [109, 96], [109, 119], [109, 64], [109, 91], [109, 112], [109, 68], [110, 68], [110, 109], [110, 74], [110, 117], [110, 119], [110, 94], [110, 112], [110, 96], [110, 64], [110, 91], [111, 3], [112, 111], [112, 110], [113, 3], [114, 113], [114, 112], [114, 68], [115, 32], [115, 112], [115, 114], [115, 42], [116, 3], [117, 116], [117, 115], [118, 4], [119, 114], [119, 118], [120, 119], [120, 114], [121, 120], [125, 121], [125, 59], [125, 123], [125, 106], [125, 17], [125, 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/f4745e82b1d0cff651d46375754e6291357312b85b3ec537e20de9075c6972a9_f4745e82b1d0cff651d46375754e6291357312b85b3ec537e20de9075c6972a9.jsonl.gz", "strip_func_name": "sub_40A258", "query": "\n\n\n__int64 __fastcall sub_40A258(__int64 a1, int a2)\n{\n__int64 result; // rax\n_BYTE *v3; // rax\nint v4; // [rsp+1Ch] [rbp-4h]\n\nif ( (*(_DWORD *)(a1 + 8) & 7) != 0 )\nreturn 0xFFFFFFFFLL;\nif ( (*(_DWORD *)a1 & 6) == 0 )\nreturn 0xFFFFFFFFLL;\nif ( (*(_DWORD *)(a1 + 4) & 0x10) != 0 )\n__assert_fail(\"!(stream->bufmode_ & JAS_STREAM_RDBUF)\", \"jas_stream.c\", 0x32Cu, \"jas_stream_flushbuf\");\nv4 = *(_DWORD *)(a1 + 40) - *(_QWORD *)(a1 + 24);\nif ( v4 <= 0\n|| (*(unsigned int (__fastcall **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)(a1 + 72) + 8LL))(\n*(_QWORD *)(a1 + 80),\n*(_QWORD *)(a1 + 24),\n(unsigned int)v4) == v4 )\n{\n*(_DWORD *)(a1 + 48) = *(_DWORD *)(a1 + 32);\n*(_QWORD *)(a1 + 40) = *(_QWORD *)(a1 + 24);\n*(_DWORD *)(a1 + 4) |= 0x20u;\nif ( a2 == -1 )\n{\nresult = 0LL;\n}\nelse\n{\nif ( *(int *)(a1 + 48) <= 0 )\n__assert_fail(\"stream->cnt_ > 0\", \"jas_stream.c\", 0x340u, \"jas_stream_flushbuf\");\n*(_DWORD *)(a1 + 4) |= 0x20u;\nif ( (int)--*(_DWORD *)(a1 + 48) >= 0 )\n{\n++*(_QWORD *)(a1 + 88);\nv3 = *(_BYTE **)(a1 + 40);\n*(_QWORD *)(a1 + 40) = v3 + 1;\n*v3 = a2;\nresult = (unsigned __int8)*v3;\n}\nelse\n{\nresult = sub_40A258(a1, (unsigned __int8)a2);\n}\n}\n}\nelse\n{\n*(_DWORD *)(a1 + 8) |= 2u;\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,v4,sub_40A258,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'stream', 'a2': 'c', 'v3': 'result', 'v4': 'len', 'sub_40A258': 'jas_stream_flushbuf'}"}
correlation
e5947eea74c6f56514e595b811de108ed7c6d93746b5f47c6c4d65f2ce4e71aa
cavazos-lab
PolyBench-ACC
NA
void correlation(int m, int n, DATA_TYPE POLYBENCH_2D(data, M, N, m, n), DATA_TYPE POLYBENCH_1D(mean, M, m), DATA_TYPE POLYBENCH_1D(stddev, M, m), DATA_TYPE POLYBENCH_2D(symmat, M, N, m, n)) { int i, j, j1, j2; // Determine mean of column vectors of input data matrix for (j = 0; j < _PB_M; j++) { mean[j] = 0.0; for (i = 0; i < _PB_N; i++) { mean[j] += data[i][j]; } mean[j] /= (DATA_TYPE)FLOAT_N; } // Determine standard deviations of column vectors of data matrix. for (j = 0; j < _PB_M; j++) { stddev[j] = 0.0; for (i = 0; i < _PB_N; i++) { stddev[j] += (data[i][j] - mean[j]) * (data[i][j] - mean[j]); } stddev[j] /= FLOAT_N; stddev[j] = sqrt_of_array_cell(stddev, j); stddev[j] = stddev[j] <= EPS ? 1.0 : stddev[j]; } // Center and reduce the column vectors. for (i = 0; i < _PB_N; i++) { for (j = 0; j < _PB_M; j++) { data[i][j] -= mean[j]; data[i][j] /= (sqrt(FLOAT_N)*stddev[j]) ; } } // Calculate the m * m correlation matrix. for (j1 = 0; j1 < _PB_M-1; j1++) { symmat[j1][j1] = 1.0; for (j2 = j1+1; j2 < _PB_M; j2++) { symmat[j1][j2] = 0.0; for (i = 0; i < _PB_N; i++) { symmat[j1][j2] += (data[i][j1] * data[i][j2]); } symmat[j2][j1] = symmat[j1][j2]; } } symmat[M-1][M-1] = 1.0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_402403", "function_addr": 4203523, "binary_name": "e5947eea74c6f56514e595b811de108ed7c6d93746b5f47c6c4d65f2ce4e71aa.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [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 [rbp+var_30], r8"], [8, "mov [rbp+var_38], r9"], [9, "mov [rbp+var_8], 0"], [10, "jmp loc_4024EF"], [11, "mov eax, [rbp+var_8]"], [12, "cdqe"], [13, "lea rdx, ds:0[rax*4]"], [14, "mov rax, [rbp+var_28]"], [15, "add rax, rdx"], [16, "pxor xmm0, xmm0"], [17, "movss dword ptr [rax], xmm0"], [18, "mov [rbp+var_4], 0"], [19, "jmp short loc_4024A7"], [20, "mov eax, [rbp+var_8]"], [21, "cdqe"], [22, "lea rdx, ds:0[rax*4]"], [23, "mov rax, [rbp+var_28]"], [24, "add rax, rdx"], [25, "movss xmm1, dword ptr [rax]"], [26, "mov eax, [rbp+var_4]"], [27, "cdqe"], [28, "shl rax, 0Dh"], [29, "mov rdx, rax"], [30, "mov rax, [rbp+var_20]"], [31, "add rdx, rax"], [32, "mov eax, [rbp+var_8]"], [33, "cdqe"], [34, "movss xmm0, dword ptr [rdx+rax*4]"], [35, "mov eax, [rbp+var_8]"], [36, "cdqe"], [37, "lea rdx, ds:0[rax*4]"], [38, "mov rax, [rbp+var_28]"], [39, "add rax, rdx"], [40, "addss xmm0, xmm1"], [41, "movss dword ptr [rax], xmm0"], [42, "add [rbp+var_4], 1"], [43, "mov eax, [rbp+var_4]"], [44, "cmp eax, [rbp+var_18]"], [45, "jl short loc_402452"], [46, "mov eax, [rbp+var_8]"], [47, "cdqe"], [48, "lea rdx, ds:0[rax*4]"], [49, "mov rax, [rbp+var_28]"], [50, "add rax, rdx"], [51, "movss xmm0, dword ptr [rax]"], [52, "mov eax, [rbp+var_8]"], [53, "cdqe"], [54, "lea rdx, ds:0[rax*4]"], [55, "mov rax, [rbp+var_28]"], [56, "add rax, rdx"], [57, "movss xmm1, cs:dword_4034E4"], [58, "divss xmm0, xmm1"], [59, "movss dword ptr [rax], xmm0"], [60, "add [rbp+var_8], 1"], [61, "mov eax, [rbp+var_8]"], [62, "cmp eax, [rbp+var_14]"], [63, "jl loc_40242D"], [64, "mov [rbp+var_8], 0"], [65, "jmp loc_4026E7"], [66, "mov eax, [rbp+var_8]"], [67, "cdqe"], [68, "lea rdx, ds:0[rax*4]"], [69, "mov rax, [rbp+var_30]"], [70, "add rax, rdx"], [71, "pxor xmm0, xmm0"], [72, "movss dword ptr [rax], xmm0"], [73, "mov [rbp+var_4], 0"], [74, "jmp loc_4025E0"], [75, "mov eax, [rbp+var_8]"], [76, "cdqe"], [77, "lea rdx, ds:0[rax*4]"], [78, "mov rax, [rbp+var_30]"], [79, "add rax, rdx"], [80, "movss xmm1, dword ptr [rax]"], [81, "mov eax, [rbp+var_4]"], [82, "cdqe"], [83, "shl rax, 0Dh"], [84, "mov rdx, rax"], [85, "mov rax, [rbp+var_20]"], [86, "add rdx, rax"], [87, "mov eax, [rbp+var_8]"], [88, "cdqe"], [89, "movss xmm0, dword ptr [rdx+rax*4]"], [90, "mov eax, [rbp+var_8]"], [91, "cdqe"], [92, "lea rdx, ds:0[rax*4]"], [93, "mov rax, [rbp+var_28]"], [94, "add rax, rdx"], [95, "movss xmm3, dword ptr [rax]"], [96, "movaps xmm2, xmm0"], [97, "subss xmm2, xmm3"], [98, "mov eax, [rbp+var_4]"], [99, "cdqe"], [100, "shl rax, 0Dh"], [101, "mov rdx, rax"], [102, "mov rax, [rbp+var_20]"], [103, "add rdx, rax"], [104, "mov eax, [rbp+var_8]"], [105, "cdqe"], [106, "movss xmm0, dword ptr [rdx+rax*4]"], [107, "mov eax, [rbp+var_8]"], [108, "cdqe"], [109, "lea rdx, ds:0[rax*4]"], [110, "mov rax, [rbp+var_28]"], [111, "add rax, rdx"], [112, "movss xmm3, dword ptr [rax]"], [113, "subss xmm0, xmm3"], [114, "mulss xmm0, xmm2"], [115, "mov eax, [rbp+var_8]"], [116, "cdqe"], [117, "lea rdx, ds:0[rax*4]"], [118, "mov rax, [rbp+var_30]"], [119, "add rax, rdx"], [120, "addss xmm0, xmm1"], [121, "movss dword ptr [rax], xmm0"], [122, "add [rbp+var_4], 1"], [123, "mov eax, [rbp+var_4]"], [124, "cmp eax, [rbp+var_18]"], [125, "jl loc_40252F"], [126, "mov eax, [rbp+var_8]"], [127, "cdqe"], [128, "lea rdx, ds:0[rax*4]"], [129, "mov rax, [rbp+var_30]"], [130, "add rax, rdx"], [131, "movss xmm0, dword ptr [rax]"], [132, "cvtss2sd xmm0, xmm0"], [133, "movsd xmm1, cs:qword_4034F0"], [134, "divsd xmm0, xmm1"], [135, "mov eax, [rbp+var_8]"], [136, "cdqe"], [137, "lea rdx, ds:0[rax*4]"], [138, "mov rax, [rbp+var_30]"], [139, "add rax, rdx"], [140, "cvtsd2ss xmm0, xmm0"], [141, "movss dword ptr [rax], xmm0"], [142, "mov eax, [rbp+var_8]"], [143, "cdqe"], [144, "lea rdx, ds:0[rax*4]"], [145, "mov rax, [rbp+var_30]"], [146, "add rax, rdx"], [147, "movss xmm0, dword ptr [rax]"], [148, "pxor xmm4, xmm4"], [149, "cvtss2sd xmm4, xmm0"], [150, "movq rax, xmm4"], [151, "movq xmm0, rax"], [152, "call _sqrt"], [153, "mov eax, [rbp+var_8]"], [154, "cdqe"], [155, "lea rdx, ds:0[rax*4]"], [156, "mov rax, [rbp+var_30]"], [157, "add rax, rdx"], [158, "cvtsd2ss xmm0, xmm0"], [159, "movss dword ptr [rax], xmm0"], [160, "mov eax, [rbp+var_8]"], [161, "cdqe"], [162, "lea rdx, ds:0[rax*4]"], [163, "mov rax, [rbp+var_30]"], [164, "add rax, rdx"], [165, "movss xmm0, dword ptr [rax]"], [166, "pxor xmm1, xmm1"], [167, "cvtss2sd xmm1, xmm0"], [168, "movsd xmm0, cs:qword_4034F8"], [169, "comisd xmm0, xmm1"], [170, "jb short loc_4026B3"], [171, "movss xmm0, cs:dword_4034EC"], [172, "jmp short loc_4026CB"], [173, "mov eax, [rbp+var_8]"], [174, "cdqe"], [175, "lea rdx, ds:0[rax*4]"], [176, "mov rax, [rbp+var_30]"], [177, "add rax, rdx"], [178, "movss xmm0, dword ptr [rax]"], [179, "mov eax, [rbp+var_8]"], [180, "cdqe"], [181, "lea rdx, ds:0[rax*4]"], [182, "mov rax, [rbp+var_30]"], [183, "add rax, rdx"], [184, "movss dword ptr [rax], xmm0"], [185, "add [rbp+var_8], 1"], [186, "mov eax, [rbp+var_8]"], [187, "cmp eax, [rbp+var_14]"], [188, "jl loc_402507"], [189, "mov [rbp+var_4], 0"], [190, "jmp loc_4027E7"], [191, "mov [rbp+var_8], 0"], [192, "jmp loc_4027D7"], [193, "mov eax, [rbp+var_4]"], [194, "cdqe"], [195, "shl rax, 0Dh"], [196, "mov rdx, rax"], [197, "mov rax, [rbp+var_20]"], [198, "add rdx, rax"], [199, "mov eax, [rbp+var_8]"], [200, "cdqe"], [201, "movss xmm0, dword ptr [rdx+rax*4]"], [202, "mov eax, [rbp+var_8]"], [203, "cdqe"], [204, "lea rdx, ds:0[rax*4]"], [205, "mov rax, [rbp+var_28]"], [206, "add rax, rdx"], [207, "movss xmm1, dword ptr [rax]"], [208, "mov eax, [rbp+var_4]"], [209, "cdqe"], [210, "shl rax, 0Dh"], [211, "mov rdx, rax"], [212, "mov rax, [rbp+var_20]"], [213, "add rdx, rax"], [214, "subss xmm0, xmm1"], [215, "mov eax, [rbp+var_8]"], [216, "cdqe"], [217, "movss dword ptr [rdx+rax*4], xmm0"], [218, "mov eax, [rbp+var_8]"], [219, "cdqe"], [220, "lea rdx, ds:0[rax*4]"], [221, "mov rax, [rbp+var_30]"], [222, "add rax, rdx"], [223, "movss xmm0, dword ptr [rax]"], [224, "pxor xmm1, xmm1"], [225, "cvtss2sd xmm1, xmm0"], [226, "movsd xmm0, cs:qword_403500"], [227, "mulsd xmm1, xmm0"], [228, "mov eax, [rbp+var_4]"], [229, "cdqe"], [230, "shl rax, 0Dh"], [231, "mov rdx, rax"], [232, "mov rax, [rbp+var_20]"], [233, "add rdx, rax"], [234, "mov eax, [rbp+var_8]"], [235, "cdqe"], [236, "movss xmm0, dword ptr [rdx+rax*4]"], [237, "cvtss2sd xmm0, xmm0"], [238, "divsd xmm0, xmm1"], [239, "mov eax, [rbp+var_4]"], [240, "cdqe"], [241, "shl rax, 0Dh"], [242, "mov rdx, rax"], [243, "mov rax, [rbp+var_20]"], [244, "add rdx, rax"], [245, "cvtsd2ss xmm0, xmm0"], [246, "mov eax, [rbp+var_8]"], [247, "cdqe"], [248, "movss dword ptr [rdx+rax*4], xmm0"], [249, "add [rbp+var_8], 1"], [250, "mov eax, [rbp+var_8]"], [251, "cmp eax, [rbp+var_14]"], [252, "jl loc_40270B"], [253, "add [rbp+var_4], 1"], [254, "mov eax, [rbp+var_4]"], [255, "cmp eax, [rbp+var_18]"], [256, "jl loc_4026FF"], [257, "mov [rbp+var_C], 0"], [258, "jmp loc_40293A"], [259, "mov eax, [rbp+var_C]"], [260, "cdqe"], [261, "shl rax, 0Dh"], [262, "mov rdx, rax"], [263, "mov rax, [rbp+var_38]"], [264, "add rdx, rax"], [265, "mov eax, [rbp+var_C]"], [266, "cdqe"], [267, "movss xmm0, cs:dword_4034EC"], [268, "movss dword ptr [rdx+rax*4], xmm0"], [269, "mov eax, [rbp+var_C]"], [270, "add eax, 1"], [271, "mov [rbp+var_10], eax"], [272, "jmp loc_40292A"], [273, "mov eax, [rbp+var_C]"], [274, "cdqe"], [275, "shl rax, 0Dh"], [276, "mov rdx, rax"], [277, "mov rax, [rbp+var_38]"], [278, "add rdx, rax"], [279, "mov eax, [rbp+var_10]"], [280, "cdqe"], [281, "pxor xmm0, xmm0"], [282, "movss dword ptr [rdx+rax*4], xmm0"], [283, "mov [rbp+var_4], 0"], [284, "jmp loc_4028DF"], [285, "mov eax, [rbp+var_C]"], [286, "cdqe"], [287, "shl rax, 0Dh"], [288, "mov rdx, rax"], [289, "mov rax, [rbp+var_38]"], [290, "add rdx, rax"], [291, "mov eax, [rbp+var_10]"], [292, "cdqe"], [293, "movss xmm1, dword ptr [rdx+rax*4]"], [294, "mov eax, [rbp+var_4]"], [295, "cdqe"], [296, "shl rax, 0Dh"], [297, "mov rdx, rax"], [298, "mov rax, [rbp+var_20]"], [299, "add rdx, rax"], [300, "mov eax, [rbp+var_C]"], [301, "cdqe"], [302, "movss xmm2, dword ptr [rdx+rax*4]"], [303, "mov eax, [rbp+var_4]"], [304, "cdqe"], [305, "shl rax, 0Dh"], [306, "mov rdx, rax"], [307, "mov rax, [rbp+var_20]"], [308, "add rdx, rax"], [309, "mov eax, [rbp+var_10]"], [310, "cdqe"], [311, "movss xmm0, dword ptr [rdx+rax*4]"], [312, "mulss xmm0, xmm2"], [313, "mov eax, [rbp+var_C]"], [314, "cdqe"], [315, "shl rax, 0Dh"], [316, "mov rdx, rax"], [317, "mov rax, [rbp+var_38]"], [318, "add rdx, rax"], [319, "addss xmm0, xmm1"], [320, "mov eax, [rbp+var_10]"], [321, "cdqe"], [322, "movss dword ptr [rdx+rax*4], xmm0"], [323, "add [rbp+var_4], 1"], [324, "mov eax, [rbp+var_4]"], [325, "cmp eax, [rbp+var_18]"], [326, "jl loc_40285F"], [327, "mov eax, [rbp+var_C]"], [328, "cdqe"], [329, "shl rax, 0Dh"], [330, "mov rdx, rax"], [331, "mov rax, [rbp+var_38]"], [332, "lea rcx, [rdx+rax]"], [333, "mov eax, [rbp+var_10]"], [334, "cdqe"], [335, "shl rax, 0Dh"], [336, "mov rdx, rax"], [337, "mov rax, [rbp+var_38]"], [338, "add rdx, rax"], [339, "mov eax, [rbp+var_10]"], [340, "cdqe"], [341, "movss xmm0, dword ptr [rcx+rax*4]"], [342, "mov eax, [rbp+var_C]"], [343, "cdqe"], [344, "movss dword ptr [rdx+rax*4], xmm0"], [345, "add [rbp+var_10], 1"], [346, "mov eax, [rbp+var_10]"], [347, "cmp eax, [rbp+var_14]"], [348, "jl loc_402832"], [349, "add [rbp+var_C], 1"], [350, "mov eax, [rbp+var_14]"], [351, "sub eax, 1"], [352, "cmp [rbp+var_C], eax"], [353, "jl loc_4027FF"], [354, "mov rax, [rbp+var_38]"], [355, "add rax, 0FFE000h"], [356, "movss xmm0, cs:dword_4034EC"], [357, "movss dword ptr [rax+1FFCh], xmm0"], [358, "nop"], [359, "leave"], [360, "retn"]], "data_dep": [[11, 9], [11, 60], [13, 54], [14, 6], [15, 14], [15, 13], [17, 15], [17, 16], [20, 9], [20, 60], [22, 37], [22, 13], [23, 6], [24, 22], [24, 23], [25, 24], [25, 41], [25, 59], [25, 17], [26, 42], [26, 18], [28, 26], [29, 28], [30, 5], [31, 29], [31, 30], [32, 60], [32, 9], [34, 32], [34, 41], [34, 59], [34, 17], [35, 60], [35, 9], [37, 31], [38, 6], [39, 38], [39, 37], [40, 25], [40, 34], [41, 40], [41, 39], [42, 42], [42, 18], [43, 42], [43, 18], [44, 4], [44, 43], [45, 44], [46, 60], [46, 9], [48, 37], [48, 13], [49, 6], [50, 48], [50, 49], [51, 50], [51, 59], [51, 17], [51, 41], [52, 9], [52, 60], [54, 48], [55, 6], [56, 55], [56, 54], [58, 57], [58, 51], [59, 58], [59, 56], [60, 9], [60, 60], [61, 9], [61, 60], [62, 3], [62, 61], [63, 62], [66, 64], [66, 185], [68, 54], [68, 181], [69, 7], [70, 68], [70, 69], [72, 71], [72, 70], [75, 64], [75, 185], [77, 117], [77, 68], [78, 7], [79, 78], [79, 77], [80, 79], [80, 159], [80, 41], [80, 121], [80, 59], [80, 72], [80, 184], [80, 17], [80, 141], [81, 73], [81, 122], [83, 81], [84, 83], [85, 5], [86, 85], [86, 84], [87, 64], [87, 185], [89, 59], [89, 72], [89, 184], [89, 17], [89, 141], [89, 159], [89, 121], [89, 87], [89, 41], [90, 64], [90, 185], [92, 86], [93, 6], [94, 93], [94, 92], [95, 59], [95, 72], [95, 184], [95, 17], [95, 141], [95, 121], [95, 94], [95, 159], [95, 41], [96, 89], [97, 95], [97, 96], [98, 73], [98, 122], [100, 98], [101, 100], [102, 5], [103, 102], [103, 101], [104, 64], [104, 185], [106, 59], [106, 72], [106, 184], [106, 17], [106, 141], [106, 104], [106, 159], [106, 41], [106, 121], [107, 64], [107, 185], [109, 103], [110, 6], [111, 110], [111, 109], [112, 159], [112, 41], [112, 121], [112, 111], [112, 59], [112, 72], [112, 184], [112, 17], [112, 141], [113, 112], [113, 106], [114, 97], [114, 113], [115, 64], [115, 185], [117, 109], [118, 7], [119, 118], [119, 117], [120, 114], [120, 80], [121, 119], [121, 120], [122, 73], [122, 122], [123, 73], [123, 122], [124, 123], [124, 4], [125, 124], [126, 64], [126, 185], [128, 68], [128, 117], [129, 7], [130, 128], [130, 129], [131, 41], [131, 130], [131, 17], [131, 59], [131, 72], [131, 184], [131, 141], [131, 159], [131, 121], [132, 131], [134, 133], [134, 132], [135, 185], [135, 64], [137, 128], [138, 7], [139, 138], [139, 137], [140, 134], [141, 140], [141, 139], [142, 64], [142, 185], [144, 137], [145, 7], [146, 145], [146, 144], [147, 146], [147, 141], [149, 147], [149, 148], [150, 149], [151, 150], [153, 64], [153, 185], [155, 144], [156, 7], [157, 156], [157, 155], [158, 151], [159, 158], [159, 157], [160, 64], [160, 185], [162, 155], [163, 7], [164, 163], [164, 162], [165, 164], [165, 159], [167, 166], [167, 165], [169, 167], [169, 168], [170, 164], [173, 64], [173, 185], [175, 162], [176, 7], [177, 176], [177, 175], [178, 141], [178, 159], [178, 121], [178, 177], [178, 41], [178, 17], [178, 59], [178, 72], [178, 184], [179, 64], [179, 185], [181, 162], [181, 175], [182, 7], [183, 182], [183, 181], [184, 183], [184, 178], [184, 171], [185, 64], [185, 185], [186, 64], [186, 185], [187, 186], [187, 3], [188, 187], [193, 253], [193, 189], [195, 193], [196, 195], [197, 5], [198, 197], [198, 196], [199, 191], [199, 249], [201, 17], [201, 199], [201, 217], [201, 59], [201, 72], [201, 184], [201, 141], [201, 159], [201, 248], [201, 121], [201, 41], [202, 191], [202, 249], [204, 198], [205, 6], [206, 205], [206, 204], [207, 41], [207, 59], [207, 17], [207, 217], [207, 72], [207, 184], [207, 206], [207, 141], [207, 159], [207, 248], [207, 121], [208, 253], [208, 189], [210, 208], [211, 210], [212, 5], [213, 212], [213, 211], [214, 207], [214, 201], [215, 249], [215, 191], [217, 215], [217, 214], [218, 191], [218, 249], [220, 213], [221, 7], [222, 221], [222, 220], [223, 59], [223, 222], [223, 217], [223, 184], [225, 224], [225, 223], [227, 226], [227, 225], [228, 253], [228, 189], [230, 228], [231, 230], [232, 5], [233, 232], [233, 231], [234, 249], [234, 191], [236, 217], [236, 234], [237, 236], [238, 237], [238, 227], [239, 253], [239, 189], [241, 239], [242, 241], [243, 5], [244, 243], [244, 242], [245, 238], [246, 191], [246, 249], [248, 245], [248, 246], [249, 191], [249, 249], [250, 249], [250, 191], [251, 3], [251, 250], [252, 251], [253, 189], [253, 253], [254, 189], [254, 253], [255, 4], [255, 254], [256, 255], [259, 349], [259, 257], [261, 259], [262, 261], [263, 8], [264, 263], [264, 262], [265, 257], [265, 349], [268, 265], [268, 267], [269, 257], [269, 349], [270, 269], [271, 270], [273, 257], [273, 349], [275, 273], [276, 275], [277, 8], [278, 277], [278, 276], [279, 271], [279, 345], [282, 279], [282, 281], [285, 257], [285, 349], [287, 285], [288, 287], [289, 8], [290, 289], [290, 288], [291, 345], [291, 271], [293, 248], [293, 72], [293, 322], [293, 141], [293, 159], [293, 121], [293, 344], [293, 217], [293, 41], [293, 59], [293, 184], [293, 17], [293, 282], [293, 291], [293, 268], [294, 283], [294, 323], [296, 294], [297, 296], [298, 5], [299, 298], [299, 297], [300, 349], [300, 257], [302, 217], [302, 41], [302, 59], [302, 72], [302, 184], [302, 17], [302, 282], [302, 300], [302, 268], [302, 141], [302, 248], [302, 322], [302, 159], [302, 121], [302, 344], [303, 283], [303, 323], [305, 303], [306, 305], [307, 5], [308, 306], [308, 307], [309, 345], [309, 271], [311, 121], [311, 344], [311, 217], [311, 41], [311, 59], [311, 184], [311, 17], [311, 282], [311, 309], [311, 268], [311, 141], [311, 248], [311, 72], [311, 322], [311, 159], [312, 302], [312, 311], [313, 257], [313, 349], [315, 313], [316, 315], [317, 8], [318, 317], [318, 316], [319, 312], [319, 293], [320, 345], [320, 271], [322, 320], [322, 319], [323, 283], [323, 323], [324, 283], [324, 323], [325, 4], [325, 324], [326, 325], [327, 349], [327, 257], [329, 327], [330, 329], [331, 8], [332, 217], [332, 41], [332, 59], [332, 72], [332, 184], [332, 17], [332, 282], [332, 268], [332, 141], [332, 248], [332, 332], [332, 322], [332, 331], [332, 159], [332, 121], [332, 344], [333, 271], [333, 345], [335, 333], [336, 335], [337, 8], [338, 337], [338, 336], [339, 345], [339, 271], [341, 121], [341, 344], [341, 339], [341, 217], [341, 41], [341, 59], [341, 184], [341, 17], [341, 282], [341, 268], [341, 141], [341, 248], [341, 72], [341, 322], [341, 159], [342, 257], [342, 349], [344, 342], [344, 341], [345, 345], [345, 271], [346, 345], [346, 271], [347, 346], [347, 3], [348, 347], [349, 257], [349, 349], [350, 3], [351, 350], [352, 349], [352, 257], [352, 351], [353, 352], [354, 8], [355, 354], [357, 356], [357, 355], [360, 355]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/e5947eea74c6f56514e595b811de108ed7c6d93746b5f47c6c4d65f2ce4e71aa_e5947eea74c6f56514e595b811de108ed7c6d93746b5f47c6c4d65f2ce4e71aa.jsonl.gz", "strip_func_name": "sub_402403", "query": "\n\n\n__int64 __fastcall sub_402403(int a1, int a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\nfloat v6; // xmm0_4\nfloat v7; // xmm0_4\nint v8; // xmm0_4\nfloat v9; // xmm0_4\n__int64 result; // rax\nint jj; // [rsp+30h] [rbp-10h]\nint ii; // [rsp+34h] [rbp-Ch]\nint i; // [rsp+38h] [rbp-8h]\nint k; // [rsp+38h] [rbp-8h]\nint n; // [rsp+38h] [rbp-8h]\nint j; // [rsp+3Ch] [rbp-4h]\nint l; // [rsp+3Ch] [rbp-4h]\nint m; // [rsp+3Ch] [rbp-4h]\nint kk; // [rsp+3Ch] [rbp-4h]\n\nfor ( i = 0; i < a1; ++i )\n{\n*(_DWORD *)(4LL * i + a4) = 0;\nfor ( j = 0; j < a2; ++j )\n*(float *)(4LL * i + a4) = *(float *)(a3 + ((__int64)j << 13) + 4LL * i) + *(float *)(4LL * i + a4);\n*(float *)(4LL * i + a4) = *(float *)(4LL * i + a4) / 3214212.0;\n}\nfor ( k = 0; k < a1; ++k )\n{\n*(_DWORD *)(4LL * k + a5) = 0;\nfor ( l = 0; l < a2; ++l )\n*(float *)(4LL * k + a5) = (float)((float)(*(float *)(a3 + ((__int64)l << 13) + 4LL * k) - *(float *)(4LL * k + a4))\n* (float)(*(float *)(a3 + ((__int64)l << 13) + 4LL * k) - *(float *)(4LL * k + a4)))\n+ *(float *)(4LL * k + a5);\nv6 = *(float *)(4LL * k + a5) / 3214212.01;\n*(float *)(4LL * k + a5) = v6;\nv7 = sqrt(*(float *)(4LL * k + a5));\n*(float *)(4LL * k + a5) = v7;\nif ( *(float *)(4LL * k + a5) > 0.005 )\nv8 = *(_DWORD *)(4LL * k + a5);\nelse\nv8 = 1065353216;\n*(_DWORD *)(4LL * k + a5) = v8;\n}\nfor ( m = 0; m < a2; ++m )\n{\nfor ( n = 0; n < a1; ++n )\n{\n*(float *)(a3 + ((__int64)m << 13) + 4LL * n) = *(float *)(a3 + ((__int64)m << 13) + 4LL * n)\n- *(float *)(4LL * n + a4);\nv9 = *(float *)(a3 + ((__int64)m << 13) + 4LL * n) / (*(float *)(4LL * n + a5) * 1792.822358740542);\n*(float *)(a3 + ((__int64)m << 13) + 4LL * n) = v9;\n}\n}\nfor ( ii = 0; ii < a1 - 1; ++ii )\n{\n*(_DWORD *)(a6 + ((__int64)ii << 13) + 4LL * ii) = 1065353216;\nfor ( jj = ii + 1; jj < a1; ++jj )\n{\n*(_DWORD *)(a6 + ((__int64)ii << 13) + 4LL * jj) = 0;\nfor ( kk = 0; kk < a2; ++kk )\n*(float *)(a6 + ((__int64)ii << 13) + 4LL * jj) = (float)(*(float *)(a3 + ((__int64)kk << 13) + 4LL * jj)\n* *(float *)(a3 + ((__int64)kk << 13) + 4LL * ii))\n+ *(float *)(a6 + ((__int64)ii << 13) + 4LL * jj);\n*(_DWORD *)(a6 + ((__int64)jj << 13) + 4LL * ii) = *(_DWORD *)(((__int64)ii << 13) + a6 + 4LL * jj);\n}\n}\nresult = a6 + 16769024;\n*(_DWORD *)(a6 + 16777212) = 1065353216;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,jj,ii,k,l,sub_402403,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'data', 'a4': 'mean', 'a1': 'm', 'a2': 'n', 'a5': 'stddev', 'a6': 'symmat', 'jj': 'j2', 'ii': 'j1', 'k': 'ja', 'l': 'ia', 'sub_402403': 'correlation'}"}
char_hash
69576dcc9c0b8188ddef8cfe961ea18d51e245ccdd99a4a73fef54835fd70e69
flipperdevices
blackmagic-esp32-s2
NA
static size_t char_hash(const char_array_t a) { return m_core_hash (a, strlen(a)); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40AAE8", "function_addr": 4238056, "binary_name": "69576dcc9c0b8188ddef8cfe961ea18d51e245ccdd99a4a73fef54835fd70e69.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+s], rdi"], [4, "mov rax, [rbp+s]"], [5, "mov rdi, rax"], [6, "call _strlen"], [7, "mov rdx, rax"], [8, "mov rax, [rbp+s]"], [9, "mov rsi, rdx"], [10, "mov rdi, rax"], [11, "call sub_402418"], [12, "leave"], [13, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 3], [9, 7], [10, 8], [13, 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/69576dcc9c0b8188ddef8cfe961ea18d51e245ccdd99a4a73fef54835fd70e69_69576dcc9c0b8188ddef8cfe961ea18d51e245ccdd99a4a73fef54835fd70e69.jsonl.gz", "strip_func_name": "sub_40AAE8", "query": "\n\n\nunsigned __int64 __fastcall sub_40AAE8(char *a1)\n{\nunsigned __int64 v1; // rax\n\nv1 = strlen(a1);\nreturn sub_402418((__int64 *)a1, v1);\n}\n\n\n\nQ:[a1,sub_40AAE8,sub_402418,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'a', 'sub_40AAE8': 'char_hash', 'sub_402418': 'm_core_hash'}"}
ana_warning_ex
7f8fdbfe20124f7322debebf1c23d92dc74249e8d5be79082850282d54cea596
analang
ana
NA
void ana_warning_ex(const char *f, const char *fn, int ln, const char* format, ...) { if(isatty(2)) fprintf(stderr, ANSI_COLOR_YELLOW "warning: %s:%s:%d: ", f, fn, ln); else fprintf(stderr, "warning: %s:%s:%d: ", f, fn, ln); va_list args; va_start (args, format); vfprintf (stderr, format, args); va_end (args); if(isatty(2)) fprintf(stderr, ANSI_COLOR_RESET "\n"); else fprintf(stderr, "\n"); fflush(stderr); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "ana_warning_ex", "function_addr": 4397575, "binary_name": "7f8fdbfe20124f7322debebf1c23d92dc74249e8d5be79082850282d54cea596.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0F0h"], [3, "mov [rbp+var_D8], rdi"], [4, "mov [rbp+var_E0], rsi"], [5, "mov [rbp+var_E4], edx"], [6, "mov [rbp+format], rcx"], [7, "mov [rbp+var_90], r8"], [8, "mov [rbp+var_88], r9"], [9, "test al, al"], [10, "jz short loc_431A5F"], [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 edi, 2"], [20, "call _isatty"], [21, "test eax, eax"], [22, "jz short loc_431A9F"], [23, "mov rax, cs:stderr"], [24, "mov esi, [rbp+var_E4]"], [25, "mov rcx, [rbp+var_E0]"], [26, "mov rdx, [rbp+var_D8]"], [27, "mov r8d, esi"], [28, "mov esi, offset a33mwarningSSD"], [29, "mov rdi, rax"], [30, "mov eax, 0"], [31, "call _fprintf"], [32, "jmp short loc_431ACF"], [33, "mov rax, cs:stderr"], [34, "mov esi, [rbp+var_E4]"], [35, "mov rcx, [rbp+var_E0]"], [36, "mov rdx, [rbp+var_D8]"], [37, "mov r8d, esi"], [38, "mov esi, offset aWarningSSD"], [39, "mov rdi, rax"], [40, "mov eax, 0"], [41, "call _fprintf"], [42, "mov [rbp+arg], 20h "], [43, "mov [rbp+var_C4], 30h "], [44, "lea rax, [rbp+arg_0]"], [45, "mov [rbp+var_C0], rax"], [46, "lea rax, [rbp+var_B0]"], [47, "mov [rbp+var_B8], rax"], [48, "mov rax, cs:stderr"], [49, "lea rdx, [rbp+arg]"], [50, "mov rcx, [rbp+format]"], [51, "mov rsi, rcx"], [52, "mov rdi, rax"], [53, "call _vfprintf"], [54, "mov edi, 2"], [55, "call _isatty"], [56, "test eax, eax"], [57, "jz short loc_431B4A"], [58, "mov rax, cs:stderr"], [59, "mov rcx, rax"], [60, "mov edx, 5"], [61, "mov esi, 1"], [62, "mov edi, offset a0m"], [63, "call _fwrite"], [64, "jmp short loc_431B5E"], [65, "mov rax, cs:stderr"], [66, "mov rsi, rax"], [67, "mov edi, 0Ah"], [68, "call _fputc"], [69, "mov rax, cs:stderr"], [70, "mov rdi, rax"], [71, "call _fflush"], [72, "nop"], [73, "leave"], [74, "retn"]], "data_dep": [[10, 9], [21, 20], [22, 21], [24, 5], [25, 4], [26, 3], [27, 24], [29, 23], [34, 5], [35, 4], [36, 3], [37, 34], [39, 33], [44, 41], [44, 31], [45, 44], [46, 44], [47, 46], [49, 26], [49, 36], [49, 42], [50, 6], [51, 50], [52, 48], [56, 55], [57, 56], [59, 58], [66, 65], [70, 69], [74, 71]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/7f8fdbfe20124f7322debebf1c23d92dc74249e8d5be79082850282d54cea596_7f8fdbfe20124f7322debebf1c23d92dc74249e8d5be79082850282d54cea596.jsonl.gz", "strip_func_name": "ana_warning_ex", "query": "\n\n\nint ana_warning_ex(const char *a1, const char *a2, unsigned int a3, const char *a4, __int64 a5, __int64 a6, ...)\n{\ngcc_va_list arg; // [rsp+28h] [rbp-C8h] BYREF\n__int64 v10; // [rsp+60h] [rbp-90h]\n__int64 v11; // [rsp+68h] [rbp-88h]\n\nv10 = a5;\nv11 = a6;\nif ( isatty(2) )\nfprintf(stderr, \"\\x1B[33mwarning: %s:%s:%d: \", a1, a2, a3);\nelse\nfprintf(stderr, \"warning: %s:%s:%d: \", a1, a2, a3);\narg[0].gp_offset = 32;\nva_start(arg, a6);\nvfprintf(stderr, a4, arg);\nif ( isatty(2) )\nfwrite(\"\\x1B[0m\\n\", 1uLL, 5uLL, stderr);\nelse\nfputc(10, stderr);\nreturn fflush(stderr);\n}\n\n\n\nQ:[a3,a4,a1,a2,arg,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'ln', 'a4': 'format', 'a1': 'f', 'a2': 'fn', 'arg': 'args'}"}
sim_tt_set_parity
c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad
open-simh
simh
NA
t_stat sim_tt_set_parity (UNIT *uptr, int32 val, CONST char *cptr, void *desc) { uptr->flags = uptr->flags & ~(TTUF_M_MODE | TTUF_M_PAR); uptr->flags |= TT_MODE_7B | val; return SCPE_OK; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_447C88", "function_addr": 4488328, "binary_name": "c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_C], esi"], [4, "mov [rbp+var_18], rdx"], [5, "mov [rbp+var_20], rcx"], [6, "mov rax, [rbp+var_8]"], [7, "mov eax, [rax+38h]"], [8, "and eax, 0FFFFFFFCh"], [9, "mov edx, eax"], [10, "mov rax, [rbp+var_8]"], [11, "mov [rax+38h], edx"], [12, "mov rax, [rbp+var_8]"], [13, "mov edx, [rax+38h]"], [14, "mov eax, [rbp+var_C]"], [15, "or edx, eax"], [16, "mov rax, [rbp+var_8]"], [17, "mov [rax+38h], edx"], [18, "mov eax, 0"], [19, "pop rbp"], [20, "retn"]], "data_dep": [[6, 2], [7, 6], [8, 7], [9, 8], [10, 2], [11, 10], [11, 9], [12, 2], [13, 12], [13, 11], [14, 3], [15, 14], [15, 13], [16, 2], [17, 16], [17, 15], [19, 0], [20, 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/c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad_c1deb0bfad757ec0db40a5b918ba2f229056dbf532b9acf279bfc49e2c136aad.jsonl.gz", "strip_func_name": "sub_447C88", "query": "\n\n\n__int64 __fastcall sub_447C88(__int64 a1, int a2)\n{\n*(_DWORD *)(a1 + 56) &= 0xFFFFFFFC;\n*(_DWORD *)(a1 + 56) |= a2;\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,sub_447C88,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'uptr', 'a2': 'val', 'sub_447C88': 'sim_tt_set_parity'}"}
pkcs12_pbe_derive_key_iv
ce297ee2eb040ae897b55138df396bcca9b0e280a22ead4e0aa5cba0644de078
dazjo
nxtool
NA
static int pkcs12_pbe_derive_key_iv( mbedtls_asn1_buf *pbe_params, mbedtls_md_type_t md_type, const unsigned char *pwd, size_t pwdlen, unsigned char *key, size_t keylen, unsigned char *iv, size_t ivlen ) { int ret, iterations = 0; mbedtls_asn1_buf salt; size_t i; unsigned char unipwd[PKCS12_MAX_PWDLEN * 2 + 2]; if( pwdlen > PKCS12_MAX_PWDLEN ) return( MBEDTLS_ERR_PKCS12_BAD_INPUT_DATA ); memset( &salt, 0, sizeof(mbedtls_asn1_buf) ); memset( &unipwd, 0, sizeof(unipwd) ); if( ( ret = pkcs12_parse_pbe_params( pbe_params, &salt, &iterations ) ) != 0 ) return( ret ); for( i = 0; i < pwdlen; i++ ) unipwd[i * 2 + 1] = pwd[i]; if( ( ret = mbedtls_pkcs12_derivation( key, keylen, unipwd, pwdlen * 2 + 2, salt.p, salt.len, md_type, MBEDTLS_PKCS12_DERIVE_KEY, iterations ) ) != 0 ) { return( ret ); } if( iv == NULL || ivlen == 0 ) return( 0 ); if( ( ret = mbedtls_pkcs12_derivation( iv, ivlen, unipwd, pwdlen * 2 + 2, salt.p, salt.len, md_type, MBEDTLS_PKCS12_DERIVE_IV, iterations ) ) != 0 ) { return( ret ); } return( 0 ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_466CAC", "function_addr": 4615340, "binary_name": "ce297ee2eb040ae897b55138df396bcca9b0e280a22ead4e0aa5cba0644de078.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 170h"], [3, "mov [rbp+var_148], rdi"], [4, "mov [rbp+var_14C], esi"], [5, "mov [rbp+var_158], rdx"], [6, "mov [rbp+var_160], rcx"], [7, "mov [rbp+var_168], r8"], [8, "mov [rbp+var_170], r9"], [9, "mov [rbp+var_10], 0"], [10, "cmp [rbp+var_160], 80h"], [11, "jbe short loc_466CFE"], [12, "mov eax, 0FFFFE080h"], [13, "jmp locret_466E5F"], [14, "lea rax, [rbp+s]"], [15, "mov edx, 18h"], [16, "mov esi, 0"], [17, "mov rdi, rax"], [18, "call _memset"], [19, "lea rax, [rbp+var_140]"], [20, "mov edx, 102h"], [21, "mov esi, 0"], [22, "mov rdi, rax"], [23, "call _memset"], [24, "lea rdx, [rbp+var_10]"], [25, "lea rcx, [rbp+s]"], [26, "mov rax, [rbp+var_148]"], [27, "mov rsi, rcx"], [28, "mov rdi, rax"], [29, "call sub_466BC3"], [30, "mov [rbp+var_C], eax"], [31, "cmp [rbp+var_C], 0"], [32, "jz short loc_466D58"], [33, "mov eax, [rbp+var_C]"], [34, "jmp locret_466E5F"], [35, "mov [rbp+var_8], 0"], [36, "jmp short loc_466D8A"], [37, "mov rdx, [rbp+var_158]"], [38, "mov rax, [rbp+var_8]"], [39, "add rax, rdx"], [40, "mov rdx, [rbp+var_8]"], [41, "add rdx, rdx"], [42, "add rdx, 1"], [43, "movzx eax, byte ptr [rax]"], [44, "mov [rbp+rdx+var_140], al"], [45, "add [rbp+var_8], 1"], [46, "mov rax, [rbp+var_8]"], [47, "cmp rax, [rbp+var_160]"], [48, "jb short loc_466D62"], [49, "mov edi, [rbp+var_10]"], [50, "mov r9, [rbp+var_28]"], [51, "mov r8, [rbp+var_20]"], [52, "mov rax, [rbp+var_160]"], [53, "add rax, 1"], [54, "lea rcx, [rax+rax]"], [55, "lea rdx, [rbp+var_140]"], [56, "mov rsi, [rbp+var_170]"], [57, "mov rax, [rbp+var_168]"], [58, "sub rsp, 8"], [59, "push rdi"], [60, "push 1"], [61, "mov edi, [rbp+var_14C]"], [62, "push rdi"], [63, "mov rdi, rax"], [64, "call sub_4671D3"], [65, "add rsp, 20h"], [66, "mov [rbp+var_C], eax"], [67, "cmp [rbp+var_C], 0"], [68, "jz short loc_466DEE"], [69, "mov eax, [rbp+var_C]"], [70, "jmp short locret_466E5F"], [71, "cmp [rbp+arg_0], 0"], [72, "jz short loc_466DFC"], [73, "cmp [rbp+arg_8], 0"], [74, "jnz short loc_466E03"], [75, "mov eax, 0"], [76, "jmp short locret_466E5F"], [77, "mov esi, [rbp+var_10]"], [78, "mov r8, [rbp+var_28]"], [79, "mov rdi, [rbp+var_20]"], [80, "mov rax, [rbp+var_160]"], [81, "add rax, 1"], [82, "lea rcx, [rax+rax]"], [83, "lea rdx, [rbp+var_140]"], [84, "mov rax, [rbp+arg_8]"], [85, "sub rsp, 8"], [86, "push rsi"], [87, "push 2"], [88, "mov esi, [rbp+var_14C]"], [89, "push rsi"], [90, "mov r9, r8"], [91, "mov r8, rdi"], [92, "mov rsi, rax"], [93, "mov rdi, [rbp+arg_0]"], [94, "call sub_4671D3"], [95, "add rsp, 20h"], [96, "mov [rbp+var_C], eax"], [97, "cmp [rbp+var_C], 0"], [98, "jz short loc_466E5A"], [99, "mov eax, [rbp+var_C]"], [100, "jmp short locret_466E5F"], [101, "mov eax, 0"], [102, "leave"], [103, "retn"]], "data_dep": [[10, 6], [11, 10], [17, 14], [19, 18], [22, 19], [24, 9], [24, 20], [26, 3], [27, 25], [28, 26], [30, 29], [31, 30], [32, 31], [33, 30], [37, 5], [38, 45], [38, 35], [39, 37], [39, 38], [40, 45], [40, 35], [41, 40], [42, 41], [43, 39], [44, 42], [44, 43], [45, 45], [45, 35], [46, 45], [46, 35], [47, 6], [47, 46], [48, 47], [49, 9], [52, 6], [53, 52], [54, 53], [54, 25], [55, 24], [55, 42], [56, 8], [57, 7], [58, 2], [59, 49], [61, 4], [62, 61], [63, 57], [65, 58], [66, 64], [67, 66], [68, 67], [69, 66], [72, 71], [73, 35], [73, 45], [74, 73], [77, 9], [80, 6], [81, 80], [82, 81], [82, 54], [83, 55], [84, 45], [84, 35], [85, 65], [86, 77], [88, 4], [89, 88], [90, 78], [91, 79], [92, 84], [95, 85], [96, 94], [97, 96], [98, 97], [99, 96], [103, 33], [103, 99], [103, 101], [103, 12], [103, 69], [103, 75]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/ce297ee2eb040ae897b55138df396bcca9b0e280a22ead4e0aa5cba0644de078_ce297ee2eb040ae897b55138df396bcca9b0e280a22ead4e0aa5cba0644de078.jsonl.gz", "strip_func_name": "sub_466CAC", "query": "\n\n\n__int64 __fastcall sub_466CAC(__int64 a1, int a2, __int64 a3, unsigned __int64 a4, int a5, int a6, __int64 a7, __int64 a8)\n{\n__int64 result; // rax\nchar v13[272]; // [rsp+30h] [rbp-140h] BYREF\nchar s[8]; // [rsp+140h] [rbp-30h] BYREF\n__int64 v15; // [rsp+148h] [rbp-28h]\n__int64 v16; // [rsp+150h] [rbp-20h]\nint v17; // [rsp+160h] [rbp-10h] BYREF\nunsigned int v18; // [rsp+164h] [rbp-Ch]\nunsigned __int64 i; // [rsp+168h] [rbp-8h]\n\nv17 = 0;\nif ( a4 > 0x80 )\nreturn 4294959232LL;\nmemset(s, 0, 0x18uLL);\nmemset(v13, 0, 0x102uLL);\nv18 = sub_466BC3(a1, (__int64)s, &v17);\nif ( v18 )\nreturn v18;\nfor ( i = 0LL; i < a4; ++i )\nv13[2 * i + 1] = *(_BYTE *)(a3 + i);\nv18 = sub_4671D3(a5, a6, (unsigned int)v13, 2 * ((int)a4 + 1), v16, v15, a2, 1, v17);\nif ( v18 )\nreturn v18;\nif ( !a7 || !a8 )\nreturn 0LL;\nv18 = sub_4671D3(a7, a8, (unsigned int)v13, 2 * ((int)a4 + 1), v16, v15, a2, 2, v17);\nif ( v18 )\nresult = v18;\nelse\nresult = 0LL;\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,a8,v13,s,v17,sub_466CAC,sub_466BC3,sub_4671D3,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'pwd', 'a4': 'pwdlen', 'a1': 'pbe_params', 'a2': 'md_type', 'a5': 'key', 'a6': 'keylen', 'a7': 'iv', 'a8': 'ivlen', 'v13': 'unipwd', 's': 'salt', 'v17': 'iterations', 'sub_466CAC': 'pkcs12_pbe_derive_key_iv', 'sub_466BC3': 'pkcs12_parse_pbe_params', 'sub_4671D3': 'mbedtls_pkcs12_derivation'}"}
prvTestAbortingTaskDelayUntil
42ad5a794bbb241401a8ce4ae490bc4dd9219aacbfc2ced321b55b2ba0b9f7e9
FreeRTOS
FreeRTOS
NA
static void prvTestAbortingTaskDelayUntil( void ) { TickType_t xTimeAtStart, xLastBlockTime; BaseType_t xReturned; /* Note the time before the delay so the length of the delay is known. */ xTimeAtStart = xTaskGetTickCount(); /* Take a copy of the time as it is updated in the call to * xTaskDelayUntil() but its original value is needed to determine the actual * time spend in the Blocked state. */ xLastBlockTime = xTimeAtStart; /* This first delay should just time out. */ xReturned = xTaskDelayUntil( &xLastBlockTime, xMaxBlockTime ); prvCheckExpectedTimeIsWithinAnAcceptableMargin( xTimeAtStart, xMaxBlockTime ); configASSERT( xReturned == pdTRUE ); /* Remove compiler warning about value being set but not used in the case * configASSERT() is not defined. */ ( void ) xReturned; /* This second delay should be aborted by the primary task half way * through. Again take a copy of the time as it is updated in the call to * vTaskDelayUntil() buts its original value is needed to determine the amount * of time actually spent in the Blocked state. This uses vTaskDelayUntil() * in place of xTaskDelayUntil() for test coverage. */ xTimeAtStart = xTaskGetTickCount(); xLastBlockTime = xTimeAtStart; vTaskDelayUntil( &xLastBlockTime, xMaxBlockTime ); prvCheckExpectedTimeIsWithinAnAcceptableMargin( xTimeAtStart, xHalfMaxBlockTime ); /* As with the other tests, the third block period should not time out. */ xTimeAtStart = xTaskGetTickCount(); xLastBlockTime = xTimeAtStart; xReturned = xTaskDelayUntil( &xLastBlockTime, xMaxBlockTime ); prvCheckExpectedTimeIsWithinAnAcceptableMargin( xTimeAtStart, xMaxBlockTime ); configASSERT( xReturned == pdTRUE ); /* Remove compiler warning about value being set but not used in the case * configASSERT() is not defined. */ ( void ) xReturned; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4121F7", "function_addr": 4268535, "binary_name": "42ad5a794bbb241401a8ce4ae490bc4dd9219aacbfc2ced321b55b2ba0b9f7e9.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "call sub_40DC33"], [4, "mov [rbp+var_8], rax"], [5, "mov rax, [rbp+var_8]"], [6, "mov [rbp+var_18], rax"], [7, "mov edx, 64h "], [8, "lea rax, [rbp+var_18]"], [9, "mov rsi, rdx"], [10, "mov rdi, rax"], [11, "call sub_40CA5B"], [12, "mov [rbp+var_10], rax"], [13, "mov edx, 64h "], [14, "mov rax, [rbp+var_8]"], [15, "mov rsi, rdx"], [16, "mov rdi, rax"], [17, "call sub_412A2D"], [18, "cmp [rbp+var_10], 1"], [19, "jz short loc_412252"], [20, "mov esi, 138h"], [21, "mov edi, offset aUsrSrcRepoFree_6"], [22, "call sub_4038C9"], [23, "call sub_40DC33"], [24, "mov [rbp+var_8], rax"], [25, "mov rax, [rbp+var_8]"], [26, "mov [rbp+var_18], rax"], [27, "mov edx, 64h "], [28, "lea rax, [rbp+var_18]"], [29, "mov rsi, rdx"], [30, "mov rdi, rax"], [31, "call sub_40CA5B"], [32, "mov edx, 32h "], [33, "mov rax, [rbp+var_8]"], [34, "mov rsi, rdx"], [35, "mov rdi, rax"], [36, "call sub_412A2D"], [37, "call sub_40DC33"], [38, "mov [rbp+var_8], rax"], [39, "mov rax, [rbp+var_8]"], [40, "mov [rbp+var_18], rax"], [41, "mov edx, 64h "], [42, "lea rax, [rbp+var_18]"], [43, "mov rsi, rdx"], [44, "mov rdi, rax"], [45, "call sub_40CA5B"], [46, "mov [rbp+var_10], rax"], [47, "mov edx, 64h "], [48, "mov rax, [rbp+var_8]"], [49, "mov rsi, rdx"], [50, "mov rdi, rax"], [51, "call sub_412A2D"], [52, "cmp [rbp+var_10], 1"], [53, "jz short loc_4122DE"], [54, "mov esi, 14Dh"], [55, "mov edi, offset aUsrSrcRepoFree_6"], [56, "call sub_4038C9"], [57, "nop"], [58, "leave"], [59, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 5], [8, 6], [8, 5], [9, 7], [10, 8], [12, 11], [14, 4], [15, 13], [16, 14], [18, 12], [19, 18], [24, 23], [25, 24], [26, 25], [28, 26], [28, 25], [29, 27], [30, 28], [33, 24], [34, 32], [35, 33], [38, 37], [39, 38], [40, 39], [42, 39], [42, 40], [43, 41], [44, 42], [46, 45], [48, 38], [49, 47], [50, 48], [52, 46], [53, 52], [59, 51], [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/42ad5a794bbb241401a8ce4ae490bc4dd9219aacbfc2ced321b55b2ba0b9f7e9_42ad5a794bbb241401a8ce4ae490bc4dd9219aacbfc2ced321b55b2ba0b9f7e9.jsonl.gz", "strip_func_name": "sub_4121F7", "query": "\n\n\nvoid sub_4121F7()\n{\n__int64 v0; // [rsp+8h] [rbp-18h] BYREF\n__int64 v1; // [rsp+10h] [rbp-10h]\n__int64 v2; // [rsp+18h] [rbp-8h]\n\nv2 = sub_40DC33();\nv0 = v2;\nv1 = sub_40CA5B((unsigned __int64 *)&v0, 100LL);\nsub_412A2D(v2, 100LL);\nif ( v1 != 1 )\nsub_4038C9((__int64)\"/usr/src/repo/FreeRTOS/Demo/Common/Minimal/AbortDelay.c\", 312LL);\nv2 = sub_40DC33();\nv0 = v2;\nsub_40CA5B((unsigned __int64 *)&v0, 100LL);\nsub_412A2D(v2, 50LL);\nv2 = sub_40DC33();\nv0 = v2;\nv1 = sub_40CA5B((unsigned __int64 *)&v0, 100LL);\nsub_412A2D(v2, 100LL);\nif ( v1 != 1 )\nsub_4038C9((__int64)\"/usr/src/repo/FreeRTOS/Demo/Common/Minimal/AbortDelay.c\", 333LL);\n}\n\n\n\nQ:[v0,v1,v2,sub_4121F7,sub_40DC33,sub_40CA5B,sub_412A2D,sub_4038C9,]\nAssistant: ", "hints": "[]", "response": "{'v0': 'xLastBlockTime', 'v1': 'xReturned', 'v2': 'xTimeAtStart', 'sub_4121F7': 'prvTestAbortingTaskDelayUntil', 'sub_40DC33': 'xTaskGetTickCount', 'sub_40CA5B': 'xTaskDelayUntil', 'sub_412A2D': 'prvCheckExpectedTimeIsWithinAnAcceptableMargin', 'sub_4038C9': 'vAssertCalled'}"}
luaL_pushmodule
4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487
nccgroup
proxmark3-amiimicyou
NA
LUALIB_API void luaL_pushmodule (lua_State *L, const char *modname, int sizehint) { luaL_findtable(L, LUA_REGISTRYINDEX, "_LOADED", 1); /* get _LOADED table */ lua_getfield(L, -1, modname); /* get _LOADED[modname] */ if (!lua_istable(L, -1)) { /* not found? */ lua_pop(L, 1); /* remove previous result */ /* try global variable (and create one if it does not exist) */ lua_pushglobaltable(L); if (luaL_findtable(L, 0, modname, sizehint) != NULL) luaL_error(L, "name conflict for module " LUA_QS, modname); lua_pushvalue(L, -1); lua_setfield(L, -3, modname); /* _LOADED[modname] = new table */ } lua_remove(L, -2); /* remove _LOADED table */ }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "luaL_pushmodule", "function_addr": 4750513, "binary_name": "4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_14], edx"], [6, "mov rax, [rbp+var_8]"], [7, "mov ecx, 1"], [8, "mov edx, offset aLoaded"], [9, "mov esi, 0FFF0B9D8h"], [10, "mov rdi, rax"], [11, "call sub_487B00"], [12, "mov rdx, [rbp+var_10]"], [13, "mov rax, [rbp+var_8]"], [14, "mov esi, 0FFFFFFFFh"], [15, "mov rdi, rax"], [16, "call lua_getfield"], [17, "mov rax, [rbp+var_8]"], [18, "mov esi, 0FFFFFFFFh"], [19, "mov rdi, rax"], [20, "call lua_type"], [21, "cmp eax, 5"], [22, "jz loc_487D92"], [23, "mov rax, [rbp+var_8]"], [24, "mov esi, 0FFFFFFFEh"], [25, "mov rdi, rax"], [26, "call lua_settop"], [27, "mov rax, [rbp+var_8]"], [28, "mov edx, 2"], [29, "mov esi, 0FFF0B9D8h"], [30, "mov rdi, rax"], [31, "call lua_rawgeti"], [32, "mov ecx, [rbp+var_14]"], [33, "mov rdx, [rbp+var_10]"], [34, "mov rax, [rbp+var_8]"], [35, "mov esi, 0"], [36, "mov rdi, rax"], [37, "call sub_487B00"], [38, "test rax, rax"], [39, "jz short loc_487D6C"], [40, "mov rdx, [rbp+var_10]"], [41, "mov rax, [rbp+var_8]"], [42, "mov esi, offset aNameConflictFo"], [43, "mov rdi, rax"], [44, "mov eax, 0"], [45, "call luaL_error"], [46, "mov rax, [rbp+var_8]"], [47, "mov esi, 0FFFFFFFFh"], [48, "mov rdi, rax"], [49, "call lua_pushvalue"], [50, "mov rdx, [rbp+var_10]"], [51, "mov rax, [rbp+var_8]"], [52, "mov esi, 0FFFFFFFDh"], [53, "mov rdi, rax"], [54, "call lua_setfield"], [55, "mov rax, [rbp+var_8]"], [56, "mov esi, 0FFFFFFFEh"], [57, "mov rdi, rax"], [58, "call lua_remove"], [59, "nop"], [60, "leave"], [61, "retn"]], "data_dep": [[6, 3], [10, 6], [12, 4], [13, 3], [15, 13], [17, 3], [19, 17], [21, 20], [22, 21], [23, 3], [25, 23], [27, 3], [30, 27], [32, 5], [33, 4], [34, 3], [36, 34], [38, 37], [39, 38], [40, 4], [41, 3], [43, 41], [46, 3], [48, 46], [50, 4], [51, 3], [53, 51], [55, 3], [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/4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487_4a8063503b00e2daa87f12503db0823933ebfcd9010aa37d6cf2d80cb8e76487.jsonl.gz", "strip_func_name": "luaL_pushmodule", "query": "\n\n\n_QWORD *__fastcall luaL_pushmodule(_QWORD *a1, const char *a2, int a3)\n{\n__int64 v3; // rcx\n__int64 v4; // r8\n__int64 v5; // r9\n\nsub_487B00(a1, -1001000, \"_LOADED\", 1);\nlua_getfield(a1, -1, (__int64)a2);\nif ( (unsigned int)lua_type(a1, -1) != 5 )\n{\nlua_settop((__int64)a1, -2);\nlua_rawgeti(a1, -1001000, 2u);\nif ( sub_487B00(a1, 0, a2, a3) )\nluaL_error((__int64)a1, (__int64)\"name conflict for module '%s'\", (__int64)a2, v3, v4, v5);\nlua_pushvalue(a1, -1);\nlua_setfield(a1, -3, (__int64)a2);\n}\nreturn lua_remove(a1, -2);\n}\n\n\n\nQ:[a3,a1,a2,sub_487B00,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'sizehint', 'a1': 'L', 'a2': 'modname', 'sub_487B00': 'luaL_findtable'}"}
pjmedia_silence_det_set_fixed
d8d3ef21e51c96db765e8f0d32e6b1df14da5354e4a3a9cd3b6492c5bc4a8750
AonCyberLabs
D-Modem
NA
PJ_DEF(pj_status_t) pjmedia_silence_det_set_fixed( pjmedia_silence_det *sd, int threshold ) { PJ_ASSERT_RETURN(sd, PJ_EINVAL); if (threshold < 0) threshold = DEF_THRESHOLD; sd->mode = VAD_MODE_FIXED; sd->threshold = threshold; return PJ_SUCCESS; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_454F4C", "function_addr": 4542284, "binary_name": "d8d3ef21e51c96db765e8f0d32e6b1df14da5354e4a3a9cd3b6492c5bc4a8750.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_454F89"], [7, "cmp [rbp+var_8], 0"], [8, "jnz short loc_454F82"], [9, "mov ecx, offset aPjmediaSilence_2"], [10, "mov edx, 93h"], [11, "mov esi, offset aSrcPjmediaSile"], [12, "mov edi, offset aSd"], [13, "call ___assert_fail"], [14, "mov eax, 11174h"], [15, "jmp short locret_454FB0"], [16, "cmp [rbp+var_C], 0"], [17, "jns short loc_454F96"], [18, "mov [rbp+var_C], 3E8h"], [19, "mov rax, [rbp+var_8]"], [20, "mov dword ptr [rax+20h], 1"], [21, "mov edx, [rbp+var_C]"], [22, "mov rax, [rbp+var_8]"], [23, "mov [rax+28h], edx"], [24, "mov eax, 0"], [25, "leave"], [26, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 3], [8, 7], [16, 4], [17, 16], [19, 3], [20, 19], [21, 18], [21, 4], [22, 3], [23, 22], [23, 21], [26, 24], [26, 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/d8d3ef21e51c96db765e8f0d32e6b1df14da5354e4a3a9cd3b6492c5bc4a8750_d8d3ef21e51c96db765e8f0d32e6b1df14da5354e4a3a9cd3b6492c5bc4a8750.jsonl.gz", "strip_func_name": "sub_454F4C", "query": "\n\n\n__int64 __fastcall sub_454F4C(__int64 a1, int a2)\n{\nint v3; // [rsp+4h] [rbp-Ch]\n\nv3 = a2;\nif ( !a1 )\n__assert_fail(\"sd\", \"../src/pjmedia/silencedet.c\", 0x93u, \"pjmedia_silence_det_set_fixed\");\nif ( a2 < 0 )\nv3 = 1000;\n*(_DWORD *)(a1 + 32) = 1;\n*(_DWORD *)(a1 + 40) = v3;\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,v3,sub_454F4C,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'sd', 'a2': 'threshold', 'v3': 'thresholda', 'sub_454F4C': 'pjmedia_silence_det_set_fixed'}"}
gap_advertisements_set_data
266b6bceb9d3f5222a007f960f0190a531bfea0cb420d862c9ab53bf7bbb75b7
Kevincoooool
esp32s3_openmv_lvgl
NA
void gap_advertisements_set_data(uint8_t advertising_data_length, uint8_t * advertising_data){ hci_stack->le_advertisements_data_len = advertising_data_length; hci_stack->le_advertisements_data = advertising_data; hci_stack->le_advertisements_todo |= LE_ADVERTISEMENT_TASKS_SET_ADV_DATA; gap_advertisments_changed(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_413946", "function_addr": 4274502, "binary_name": "266b6bceb9d3f5222a007f960f0190a531bfea0cb420d862c9ab53bf7bbb75b7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov eax, edi"], [4, "mov [rbp+var_10], rsi"], [5, "mov [rbp+var_4], al"], [6, "mov rax, cs:ptr"], [7, "movzx edx, [rbp+var_4]"], [8, "mov [rax+7F8h], dl"], [9, "mov rax, cs:ptr"], [10, "mov rdx, [rbp+var_10]"], [11, "mov [rax+7F0h], rdx"], [12, "mov rax, cs:ptr"], [13, "movzx edx, byte ptr [rax+80Bh]"], [14, "mov rax, cs:ptr"], [15, "or edx, 2"], [16, "mov [rax+80Bh], dl"], [17, "call sub_41390A"], [18, "nop"], [19, "leave"], [20, "retn"]], "data_dep": [[5, 3], [7, 5], [8, 7], [8, 6], [10, 4], [11, 10], [11, 9], [13, 12], [13, 11], [15, 13], [16, 14], [16, 15], [20, 17]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/266b6bceb9d3f5222a007f960f0190a531bfea0cb420d862c9ab53bf7bbb75b7_266b6bceb9d3f5222a007f960f0190a531bfea0cb420d862c9ab53bf7bbb75b7.jsonl.gz", "strip_func_name": "sub_413946", "query": "\n\n\n__int64 __fastcall sub_413946(__int64 a1, const char *a2)\n{\n*((_BYTE *)ptr + 2040) = a1;\n*((_QWORD *)ptr + 254) = a2;\n*((_BYTE *)ptr + 2059) |= 2u;\nreturn sub_41390A(a1, a2);\n}\n\n\n\nQ:[a1,a2,sub_413946,sub_41390A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'advertising_data_length', 'a2': 'advertising_data', 'sub_413946': 'gap_advertisements_set_data', 'sub_41390A': 'gap_advertisments_changed'}"}
getr
41d038076c9002a7dbf35d169d3040203f4f01a2bfba9e31834487c457dc534b
ut-osa
ingens
NA
static inline void getr(int type, struct rlimit *rlim) { if (getrlimit(type, rlim)) shutdown(6, "getrlimit()", __LINE__ - 1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401508", "function_addr": 4199688, "binary_name": "41d038076c9002a7dbf35d169d3040203f4f01a2bfba9e31834487c457dc534b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+resource], edi"], [4, "mov [rbp+rlimits], rsi"], [5, "mov rdx, [rbp+rlimits]"], [6, "mov eax, [rbp+resource]"], [7, "mov rsi, rdx"], [8, "mov edi, eax"], [9, "call _getrlimit"], [10, "test eax, eax"], [11, "jz short loc_401540"], [12, "mov edx, 8Bh"], [13, "mov esi, offset aGetrlimit_0"], [14, "mov edi, 6"], [15, "call shutdown"], [16, "nop"], [17, "leave"], [18, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 5], [8, 6], [10, 9], [11, 10], [18, 10], [18, 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/41d038076c9002a7dbf35d169d3040203f4f01a2bfba9e31834487c457dc534b_41d038076c9002a7dbf35d169d3040203f4f01a2bfba9e31834487c457dc534b.jsonl.gz", "strip_func_name": "sub_401508", "query": "\n\n\nint __fastcall sub_401508(__rlimit_resource_t a1, struct rlimit *a2)\n{\nint result; // eax\n\nresult = getrlimit(a1, a2);\nif ( result )\nresult = shutdown(6, \"getrlimit()\", 0x8Bu);\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_401508,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'type', 'a2': 'rlim', 'sub_401508': 'getr'}"}
usage
1c16b5900aad37eb9bdf4c258f2d413f5a10821715d4c402469b3ed9ee8da998
facebookarchive
flashcache
NA
void usage(char *pname) { fprintf(stderr, "%s: [-v] cache_size(in GB) vol_size(in GB)\n", pname); exit(1); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401162", "function_addr": 4198754, "binary_name": "1c16b5900aad37eb9bdf4c258f2d413f5a10821715d4c402469b3ed9ee8da998.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, cs:stderr"], [5, "mov rdx, [rbp+var_8]"], [6, "mov esi, offset format"], [7, "mov rdi, rax"], [8, "mov eax, 0"], [9, "call _fprintf"], [10, "mov edi, 1"], [11, "call _exit"]], "data_dep": [[5, 3], [7, 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/1c16b5900aad37eb9bdf4c258f2d413f5a10821715d4c402469b3ed9ee8da998_1c16b5900aad37eb9bdf4c258f2d413f5a10821715d4c402469b3ed9ee8da998.jsonl.gz", "strip_func_name": "sub_401162", "query": "\n\n\nvoid __fastcall __noreturn sub_401162(const char *a1)\n{\nfprintf(stderr, \"%s: [-v] cache_size(in GB) vol_size(in GB)\\n\", a1);\nexit(1);\n}\n\n\n\nQ:[a1,sub_401162,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'pname', 'sub_401162': 'usage'}"}
hist8
23f7e070556c3a6c8ed5fb5ff41a46030725173d20e12e850926ec8a752f6c10
jkbonfield
rans_static
NA
static void hist8(unsigned char *in, unsigned int in_size, int F0[256]) { int F1[256+MAGIC] = {0}, F2[256+MAGIC] = {0}, F3[256+MAGIC] = {0}; int F4[256+MAGIC] = {0}, F5[256+MAGIC] = {0}, F6[256+MAGIC] = {0}, F7[256+MAGIC] = {0}; int i, i8 = in_size & ~7; for (i = 0; i < i8; i+=8) { F0[in[i+0]]++; F1[in[i+1]]++; F2[in[i+2]]++; F3[in[i+3]]++; F4[in[i+4]]++; F5[in[i+5]]++; F6[in[i+6]]++; F7[in[i+7]]++; } while (i < in_size) F0[in[i++]]++; for (i = 0; i < 256; i++) F0[i] += F1[i] + F2[i] + F3[i] + F4[i] + F5[i] + F6[i] + F7[i]; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40164A", "function_addr": 4200010, "binary_name": "23f7e070556c3a6c8ed5fb5ff41a46030725173d20e12e850926ec8a752f6c10.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 1C90h"], [3, "mov [rbp+var_1CF8], rdi"], [4, "mov [rbp+var_1CFC], esi"], [5, "mov [rbp+var_1D08], rdx"], [6, "lea rdx, [rbp+var_430]"], [7, "mov eax, 0"], [8, "mov ecx, 84h"], [9, "mov rdi, rdx"], [10, "rep stosq"], [11, "lea rdx, [rbp+var_850]"], [12, "mov eax, 0"], [13, "mov ecx, 84h"], [14, "mov rdi, rdx"], [15, "rep stosq"], [16, "lea rdx, [rbp+var_C70]"], [17, "mov eax, 0"], [18, "mov ecx, 84h"], [19, "mov rdi, rdx"], [20, "rep stosq"], [21, "lea rdx, [rbp+var_1090]"], [22, "mov eax, 0"], [23, "mov ecx, 84h"], [24, "mov rdi, rdx"], [25, "rep stosq"], [26, "lea rdx, [rbp+var_14B0]"], [27, "mov eax, 0"], [28, "mov ecx, 84h"], [29, "mov rdi, rdx"], [30, "rep stosq"], [31, "lea rdx, [rbp+var_18D0]"], [32, "mov eax, 0"], [33, "mov ecx, 84h"], [34, "mov rdi, rdx"], [35, "rep stosq"], [36, "lea rdx, [rbp+var_1CF0]"], [37, "mov eax, 0"], [38, "mov ecx, 84h"], [39, "mov rdi, rdx"], [40, "rep stosq"], [41, "mov eax, [rbp+var_1CFC]"], [42, "and eax, 0FFFFFFF8h"], [43, "mov [rbp+var_8], eax"], [44, "mov [rbp+var_4], 0"], [45, "jmp loc_40189E"], [46, "mov eax, [rbp+var_4]"], [47, "movsxd rdx, eax"], [48, "mov rax, [rbp+var_1CF8]"], [49, "add rax, rdx"], [50, "movzx eax, byte ptr [rax]"], [51, "movzx eax, al"], [52, "lea rdx, ds:0[rax*4]"], [53, "mov rax, [rbp+var_1D08]"], [54, "add rax, rdx"], [55, "mov edx, [rax]"], [56, "add edx, 1"], [57, "mov [rax], edx"], [58, "mov eax, [rbp+var_4]"], [59, "cdqe"], [60, "lea rdx, [rax+1]"], [61, "mov rax, [rbp+var_1CF8]"], [62, "add rax, rdx"], [63, "movzx eax, byte ptr [rax]"], [64, "movzx eax, al"], [65, "movsxd rdx, eax"], [66, "mov edx, [rbp+rdx*4+var_430]"], [67, "add edx, 1"], [68, "cdqe"], [69, "mov [rbp+rax*4+var_430], edx"], [70, "mov eax, [rbp+var_4]"], [71, "cdqe"], [72, "lea rdx, [rax+2]"], [73, "mov rax, [rbp+var_1CF8]"], [74, "add rax, rdx"], [75, "movzx eax, byte ptr [rax]"], [76, "movzx eax, al"], [77, "movsxd rdx, eax"], [78, "mov edx, [rbp+rdx*4+var_850]"], [79, "add edx, 1"], [80, "cdqe"], [81, "mov [rbp+rax*4+var_850], edx"], [82, "mov eax, [rbp+var_4]"], [83, "cdqe"], [84, "lea rdx, [rax+3]"], [85, "mov rax, [rbp+var_1CF8]"], [86, "add rax, rdx"], [87, "movzx eax, byte ptr [rax]"], [88, "movzx eax, al"], [89, "movsxd rdx, eax"], [90, "mov edx, [rbp+rdx*4+var_C70]"], [91, "add edx, 1"], [92, "cdqe"], [93, "mov [rbp+rax*4+var_C70], edx"], [94, "mov eax, [rbp+var_4]"], [95, "cdqe"], [96, "lea rdx, [rax+4]"], [97, "mov rax, [rbp+var_1CF8]"], [98, "add rax, rdx"], [99, "movzx eax, byte ptr [rax]"], [100, "movzx eax, al"], [101, "movsxd rdx, eax"], [102, "mov edx, [rbp+rdx*4+var_1090]"], [103, "add edx, 1"], [104, "cdqe"], [105, "mov [rbp+rax*4+var_1090], edx"], [106, "mov eax, [rbp+var_4]"], [107, "cdqe"], [108, "lea rdx, [rax+5]"], [109, "mov rax, [rbp+var_1CF8]"], [110, "add rax, rdx"], [111, "movzx eax, byte ptr [rax]"], [112, "movzx eax, al"], [113, "movsxd rdx, eax"], [114, "mov edx, [rbp+rdx*4+var_14B0]"], [115, "add edx, 1"], [116, "cdqe"], [117, "mov [rbp+rax*4+var_14B0], edx"], [118, "mov eax, [rbp+var_4]"], [119, "cdqe"], [120, "lea rdx, [rax+6]"], [121, "mov rax, [rbp+var_1CF8]"], [122, "add rax, rdx"], [123, "movzx eax, byte ptr [rax]"], [124, "movzx eax, al"], [125, "movsxd rdx, eax"], [126, "mov edx, [rbp+rdx*4+var_18D0]"], [127, "add edx, 1"], [128, "cdqe"], [129, "mov [rbp+rax*4+var_18D0], edx"], [130, "mov eax, [rbp+var_4]"], [131, "cdqe"], [132, "lea rdx, [rax+7]"], [133, "mov rax, [rbp+var_1CF8]"], [134, "add rax, rdx"], [135, "movzx eax, byte ptr [rax]"], [136, "movzx eax, al"], [137, "movsxd rdx, eax"], [138, "mov edx, [rbp+rdx*4+var_1CF0]"], [139, "add edx, 1"], [140, "cdqe"], [141, "mov [rbp+rax*4+var_1CF0], edx"], [142, "add [rbp+var_4], 8"], [143, "mov eax, [rbp+var_4]"], [144, "cmp eax, [rbp+var_8]"], [145, "jl loc_401722"], [146, "jmp short loc_4018E1"], [147, "mov eax, [rbp+var_4]"], [148, "lea edx, [rax+1]"], [149, "mov [rbp+var_4], edx"], [150, "movsxd rdx, eax"], [151, "mov rax, [rbp+var_1CF8]"], [152, "add rax, rdx"], [153, "movzx eax, byte ptr [rax]"], [154, "movzx eax, al"], [155, "lea rdx, ds:0[rax*4]"], [156, "mov rax, [rbp+var_1D08]"], [157, "add rax, rdx"], [158, "mov edx, [rax]"], [159, "add edx, 1"], [160, "mov [rax], edx"], [161, "mov eax, [rbp+var_4]"], [162, "cmp [rbp+var_1CFC], eax"], [163, "ja short loc_4018AC"], [164, "mov [rbp+var_4], 0"], [165, "jmp loc_401990"], [166, "mov eax, [rbp+var_4]"], [167, "cdqe"], [168, "lea rdx, ds:0[rax*4]"], [169, "mov rax, [rbp+var_1D08]"], [170, "add rax, rdx"], [171, "mov edx, [rax]"], [172, "mov eax, [rbp+var_4]"], [173, "cdqe"], [174, "mov ecx, [rbp+rax*4+var_430]"], [175, "mov eax, [rbp+var_4]"], [176, "cdqe"], [177, "mov eax, [rbp+rax*4+var_850]"], [178, "add ecx, eax"], [179, "mov eax, [rbp+var_4]"], [180, "cdqe"], [181, "mov eax, [rbp+rax*4+var_C70]"], [182, "add ecx, eax"], [183, "mov eax, [rbp+var_4]"], [184, "cdqe"], [185, "mov eax, [rbp+rax*4+var_1090]"], [186, "add ecx, eax"], [187, "mov eax, [rbp+var_4]"], [188, "cdqe"], [189, "mov eax, [rbp+rax*4+var_14B0]"], [190, "add ecx, eax"], [191, "mov eax, [rbp+var_4]"], [192, "cdqe"], [193, "mov eax, [rbp+rax*4+var_18D0]"], [194, "add ecx, eax"], [195, "mov eax, [rbp+var_4]"], [196, "cdqe"], [197, "mov eax, [rbp+rax*4+var_1CF0]"], [198, "add ecx, eax"], [199, "mov eax, [rbp+var_4]"], [200, "cdqe"], [201, "lea rsi, ds:0[rax*4]"], [202, "mov rax, [rbp+var_1D08]"], [203, "add rax, rsi"], [204, "add edx, ecx"], [205, "mov [rax], edx"], [206, "add [rbp+var_4], 1"], [207, "cmp [rbp+var_4], 0FFh"], [208, "jle loc_4018F8"], [209, "nop"], [210, "nop"], [211, "leave"], [212, "retn"]], "data_dep": [[9, 6], [11, 6], [14, 11], [15, 10], [16, 11], [19, 16], [20, 15], [21, 16], [24, 21], [25, 20], [26, 21], [29, 26], [30, 25], [31, 26], [34, 31], [35, 30], [36, 31], [39, 36], [40, 35], [41, 4], [42, 41], [43, 42], [46, 44], [46, 142], [47, 46], [48, 3], [49, 48], [49, 47], [50, 49], [50, 57], [51, 50], [52, 47], [53, 5], [54, 53], [54, 52], [55, 57], [55, 54], [56, 55], [57, 54], [57, 56], [58, 44], [58, 142], [60, 57], [60, 56], [60, 58], [61, 3], [62, 60], [62, 61], [63, 62], [63, 57], [64, 63], [65, 64], [66, 65], [67, 66], [69, 67], [69, 64], [70, 44], [70, 142], [72, 57], [72, 70], [72, 67], [73, 3], [74, 73], [74, 72], [75, 74], [75, 57], [76, 75], [77, 76], [78, 77], [79, 78], [81, 76], [81, 79], [82, 44], [82, 142], [84, 79], [84, 82], [84, 57], [85, 3], [86, 85], [86, 84], [87, 57], [87, 86], [88, 87], [89, 88], [90, 89], [91, 90], [93, 88], [93, 91], [94, 142], [94, 44], [96, 94], [96, 91], [96, 57], [97, 3], [98, 96], [98, 97], [99, 98], [99, 57], [100, 99], [101, 100], [102, 101], [103, 102], [105, 100], [105, 103], [106, 44], [106, 142], [108, 57], [108, 106], [108, 103], [109, 3], [110, 109], [110, 108], [111, 110], [111, 57], [112, 111], [113, 112], [114, 113], [115, 114], [117, 112], [117, 115], [118, 44], [118, 142], [120, 115], [120, 57], [120, 118], [121, 3], [122, 121], [122, 120], [123, 57], [123, 122], [124, 123], [125, 124], [126, 125], [127, 126], [129, 127], [129, 124], [130, 44], [130, 142], [132, 57], [132, 130], [132, 127], [133, 3], [134, 133], [134, 132], [135, 57], [135, 134], [136, 135], [137, 136], [138, 137], [139, 138], [141, 136], [141, 139], [142, 44], [142, 142], [143, 142], [143, 44], [144, 143], [144, 43], [145, 144], [147, 149], [147, 142], [147, 44], [148, 159], [148, 147], [148, 57], [148, 160], [148, 36], [148, 139], [149, 148], [150, 147], [151, 3], [152, 151], [152, 150], [153, 57], [153, 152], [153, 160], [154, 153], [155, 150], [156, 5], [157, 155], [157, 156], [158, 160], [158, 57], [158, 157], [159, 158], [160, 157], [160, 159], [161, 44], [161, 149], [161, 142], [162, 161], [162, 4], [163, 162], [166, 206], [166, 164], [168, 36], [168, 139], [168, 159], [168, 204], [169, 5], [170, 169], [170, 168], [171, 170], [171, 57], [171, 160], [171, 205], [172, 206], [172, 164], [174, 69], [174, 172], [175, 206], [175, 164], [177, 81], [177, 175], [178, 177], [178, 174], [179, 206], [179, 164], [181, 93], [181, 179], [182, 181], [182, 178], [183, 206], [183, 164], [185, 105], [185, 183], [186, 185], [186, 182], [187, 206], [187, 164], [189, 117], [189, 187], [190, 186], [190, 189], [191, 164], [191, 206], [193, 191], [193, 129], [194, 190], [194, 193], [195, 164], [195, 206], [197, 195], [197, 141], [198, 194], [198, 197], [199, 206], [199, 164], [201, 201], [202, 5], [203, 202], [203, 201], [204, 171], [204, 198], [205, 204], [205, 203], [206, 164], [206, 206], [207, 206], [207, 164], [208, 207], [212, 203], [212, 161]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/23f7e070556c3a6c8ed5fb5ff41a46030725173d20e12e850926ec8a752f6c10_23f7e070556c3a6c8ed5fb5ff41a46030725173d20e12e850926ec8a752f6c10.jsonl.gz", "strip_func_name": "sub_40164A", "query": "\n\n\n_DWORD *__fastcall sub_40164A(__int64 a1, unsigned int a2, __int64 a3)\n{\n_DWORD *v3; // rax\nint v4; // eax\n_DWORD *v5; // rax\n_DWORD *result; // rax\nint v7[264]; // [rsp+18h] [rbp-1CF0h] BYREF\nint v8[264]; // [rsp+438h] [rbp-18D0h] BYREF\nint v9[264]; // [rsp+858h] [rbp-14B0h] BYREF\nint v10[264]; // [rsp+C78h] [rbp-1090h] BYREF\nint v11[264]; // [rsp+1098h] [rbp-C70h] BYREF\nint v12[264]; // [rsp+14B8h] [rbp-850h] BYREF\nint v13[266]; // [rsp+18D8h] [rbp-430h] BYREF\nint v14; // [rsp+1D00h] [rbp-8h]\nunsigned int i; // [rsp+1D04h] [rbp-4h]\n\nmemset(v13, 0, 0x420uLL);\nmemset(v12, 0, sizeof(v12));\nmemset(v11, 0, sizeof(v11));\nmemset(v10, 0, sizeof(v10));\nmemset(v9, 0, sizeof(v9));\nmemset(v8, 0, sizeof(v8));\nmemset(v7, 0, sizeof(v7));\nv14 = a2 & 0xFFFFFFF8;\nfor ( i = 0; (int)i < v14; i += 8 )\n{\nv3 = (_DWORD *)(4LL * *(unsigned __int8 *)((int)i + a1) + a3);\n++*v3;\n++v13[*(unsigned __int8 *)((int)i + 1LL + a1)];\n++v12[*(unsigned __int8 *)((int)i + 2LL + a1)];\n++v11[*(unsigned __int8 *)((int)i + 3LL + a1)];\n++v10[*(unsigned __int8 *)((int)i + 4LL + a1)];\n++v9[*(unsigned __int8 *)((int)i + 5LL + a1)];\n++v8[*(unsigned __int8 *)((int)i + 6LL + a1)];\n++v7[*(unsigned __int8 *)((int)i + 7LL + a1)];\n}\nwhile ( 1 )\n{\nresult = (_DWORD *)i;\nif ( a2 <= i )\nbreak;\nv4 = i++;\nv5 = (_DWORD *)(4LL * *(unsigned __int8 *)(v4 + a1) + a3);\n++*v5;\n}\nfor ( i = 0; (int)i <= 255; ++i )\n{\nresult = (_DWORD *)(4LL * (int)i + a3);\n*result += v7[i] + v8[i] + v9[i] + v10[i] + v11[i] + v12[i] + v13[i];\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v7,v8,v9,v10,v11,v12,v13,v14,sub_40164A,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'F0', 'a1': 'in', 'a2': 'in_size', 'v7': 'F7', 'v8': 'F6', 'v9': 'F5', 'v10': 'F4', 'v11': 'F3', 'v12': 'F2', 'v13': 'F1', 'v14': 'i8', 'sub_40164A': 'hist8'}"}
OH_DirectIndirectLong
28aeaecdf61b5658652bdb4f4092bdfa01457a1c58e1006fdfb00089d2b32a3b
mupfdev
SNESoIP
NA
void OH_DirectIndirectLong (const OpcDesc* D attribute ((unused))) { Error ("Not implemented"); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405647", "function_addr": 4216391, "binary_name": "28aeaecdf61b5658652bdb4f4092bdfa01457a1c58e1006fdfb00089d2b32a3b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov edi, offset aNotImplemented"], [5, "mov eax, 0"], [6, "call sub_4016EA"]], "data_dep": []}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/28aeaecdf61b5658652bdb4f4092bdfa01457a1c58e1006fdfb00089d2b32a3b_28aeaecdf61b5658652bdb4f4092bdfa01457a1c58e1006fdfb00089d2b32a3b.jsonl.gz", "strip_func_name": "sub_405647", "query": "\n\n\nvoid __fastcall __noreturn sub_405647(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\nsub_4016EA(\"Not implemented\", a2, a3, a4, a5, a6);\n}\n\n\n\nQ:[a1,sub_405647,sub_4016EA,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'D', 'sub_405647': 'OH_DirectIndirectLong', 'sub_4016EA': 'Error'}"}
JEncoder_setString
1ceb61cb76ebc70c3108923bff0e4764d02ba5561c9584cbcb4aa271e0dfe8d7
RealTimeLogic
JSON
NA
int JEncoder_setString(JEncoder* o, const char* val) { if(JEncoder_beginValue(o, FALSE)) { if(val) { if(BufPrint_jsonString(o->out,val)<0) return JEncoder_setIoErr(o); } else { if(BufPrint_write(o->out,"null", -1)<0) return JEncoder_setIoErr(o); } return 0; } return -1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40701E", "function_addr": 4223006, "binary_name": "1ceb61cb76ebc70c3108923bff0e4764d02ba5561c9584cbcb4aa271e0dfe8d7.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 10h"], [3, "mov [rbp+var_8], rdi"], [4, "mov [rbp+var_10], rsi"], [5, "mov rax, [rbp+var_8]"], [6, "mov esi, 0"], [7, "mov rdi, rax"], [8, "call sub_406D2A"], [9, "test al, al"], [10, "jz short loc_4070A6"], [11, "cmp [rbp+var_10], 0"], [12, "jz short loc_407073"], [13, "mov rax, [rbp+var_8]"], [14, "mov rax, [rax+50h]"], [15, "mov rdx, [rbp+var_10]"], [16, "mov rsi, rdx"], [17, "mov rdi, rax"], [18, "call sub_4044A8"], [19, "test eax, eax"], [20, "jns short loc_40709F"], [21, "mov rax, [rbp+var_8]"], [22, "mov rdi, rax"], [23, "call sub_406CA4"], [24, "jmp short locret_4070AB"], [25, "mov rax, [rbp+var_8]"], [26, "mov rax, [rax+50h]"], [27, "mov edx, 0FFFFFFFFh"], [28, "mov esi, offset aNull_1"], [29, "mov rdi, rax"], [30, "call sub_403D60"], [31, "test eax, eax"], [32, "jns short loc_40709F"], [33, "mov rax, [rbp+var_8]"], [34, "mov rdi, rax"], [35, "call sub_406CA4"], [36, "jmp short locret_4070AB"], [37, "mov eax, 0"], [38, "jmp short locret_4070AB"], [39, "mov eax, 0FFFFFFFFh"], [40, "leave"], [41, "retn"]], "data_dep": [[5, 3], [7, 5], [9, 8], [10, 9], [11, 4], [12, 11], [13, 3], [14, 13], [15, 4], [16, 15], [17, 14], [19, 18], [20, 19], [21, 3], [22, 21], [25, 3], [26, 25], [29, 26], [31, 30], [32, 31], [33, 3], [34, 33], [41, 39], [41, 23], [41, 35], [41, 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/1ceb61cb76ebc70c3108923bff0e4764d02ba5561c9584cbcb4aa271e0dfe8d7_1ceb61cb76ebc70c3108923bff0e4764d02ba5561c9584cbcb4aa271e0dfe8d7.jsonl.gz", "strip_func_name": "sub_40701E", "query": "\n\n\n__int64 __fastcall sub_40701E(_QWORD *a1, unsigned __int8 *a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 v6; // rcx\nint v7; // er8\nint v8; // er9\n\nif ( !(unsigned __int8)sub_406D2A(a1, 0LL, a3, a4, a5, a6) )\nreturn 0xFFFFFFFFLL;\nif ( a2 )\n{\nif ( (int)sub_4044A8(a1[10], a2, (__int64)a2, v6, v7, v8) < 0 )\nreturn sub_406CA4(a1);\n}\nelse if ( (int)sub_403D60(a1[10], \"null\", -1) < 0 )\n{\nreturn sub_406CA4(a1);\n}\nreturn 0LL;\n}\n\n\n\nQ:[a1,a2,sub_40701E,sub_406D2A,sub_4044A8,sub_406CA4,sub_403D60,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'o', 'a2': 'val', 'sub_40701E': 'JEncoder_setString', 'sub_406D2A': 'JEncoder_beginValue', 'sub_4044A8': 'BufPrint_jsonString', 'sub_406CA4': 'JEncoder_setIoErr', 'sub_403D60': 'BufPrint_write'}"}
run_test
3ea9fe412513452ecfcdb9f65c225de567b42640d8292b8ce2bd1b01a4b01330
dlbeer
mspdebug
NA
static void run_test(void (*test)(), const char *test_name) { set_up(); test(); printf(" PASS %s\n", test_name); tear_down(); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40A041", "function_addr": 4235329, "binary_name": "3ea9fe412513452ecfcdb9f65c225de567b42640d8292b8ce2bd1b01a4b01330.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 eax, 0"], [6, "call sub_402DBB"], [7, "mov rdx, [rbp+var_8]"], [8, "mov eax, 0"], [9, "call rdx"], [10, "mov rax, [rbp+var_10]"], [11, "mov rsi, rax"], [12, "mov edi, offset format"], [13, "mov eax, 0"], [14, "call _printf"], [15, "mov eax, 0"], [16, "call sub_402DEB"], [17, "nop"], [18, "leave"], [19, "retn"]], "data_dep": [[7, 3], [9, 7], [10, 4], [11, 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/3ea9fe412513452ecfcdb9f65c225de567b42640d8292b8ce2bd1b01a4b01330_3ea9fe412513452ecfcdb9f65c225de567b42640d8292b8ce2bd1b01a4b01330.jsonl.gz", "strip_func_name": "sub_40A041", "query": "\n\n\nvoid __fastcall sub_40A041(void (*a1)(void), const char *a2)\n{\nsub_402DBB();\na1();\nprintf(\" PASS %s\\n\", a2);\nsub_402DEB();\n}\n\n\n\nQ:[a1,a2,sub_40A041,sub_402DBB,sub_402DEB,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'test', 'a2': 'test_name', 'sub_40A041': 'run_test', 'sub_402DBB': 'set_up', 'sub_402DEB': 'tear_down'}"}
lv_txt_get_size
1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a
FASTSHIFT
lv_gba_emu
NA
void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * font, lv_coord_t letter_space, lv_coord_t line_space, lv_coord_t max_width, lv_text_flag_t flag) { size_res->x = 0; size_res->y = 0; if(text == NULL) return; if(font == NULL) return; if(flag & LV_TEXT_FLAG_EXPAND) max_width = LV_COORD_MAX; uint32_t line_start = 0; uint32_t new_line_start = 0; uint16_t letter_height = lv_font_get_line_height(font); /*Calc. the height and longest line*/ while(text[line_start] != '\0') { new_line_start += _lv_txt_get_next_line(&text[line_start], font, letter_space, max_width, NULL, flag); if((unsigned long)size_res->y + (unsigned long)letter_height + (unsigned long)line_space > LV_MAX_OF(lv_coord_t)) { LV_LOG_WARN("integer overflow while calculating text height"); return; } else { size_res->y += letter_height; size_res->y += line_space; } /*Calculate the longest line*/ lv_coord_t act_line_length = lv_txt_get_width(&text[line_start], new_line_start - line_start, font, letter_space, flag); size_res->x = LV_MAX(act_line_length, size_res->x); line_start = new_line_start; } /*Make the text one line taller if the last character is '\n' or '\r'*/ if((line_start != 0) && (text[line_start - 1] == '\n' || text[line_start - 1] == '\r')) { size_res->y += letter_height + line_space; } /*Correction with the last line space or set the height manually if the text is empty*/ if(size_res->y == 0) size_res->y = letter_height; else size_res->y -= line_space; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_41740B", "function_addr": 4289547, "binary_name": "1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov eax, ecx"], [7, "mov ecx, r8d"], [8, "mov edx, r9d"], [9, "mov esi, [rbp+arg_0]"], [10, "mov [rbp+var_2C], ax"], [11, "mov eax, ecx"], [12, "mov [rbp+var_30], ax"], [13, "mov eax, edx"], [14, "mov [rbp+var_34], ax"], [15, "mov eax, esi"], [16, "mov [rbp+var_38], al"], [17, "mov rax, [rbp+var_18]"], [18, "mov word ptr [rax], 0"], [19, "mov rax, [rbp+var_18]"], [20, "mov word ptr [rax+2], 0"], [21, "cmp [rbp+var_20], 0"], [22, "jz loc_41760A"], [23, "cmp [rbp+var_28], 0"], [24, "jz loc_41760D"], [25, "movzx eax, [rbp+var_38]"], [26, "and eax, 2"], [27, "test eax, eax"], [28, "jz short loc_417479"], [29, "mov [rbp+var_34], 1FFFh"], [30, "mov [rbp+var_4], 0"], [31, "mov [rbp+var_8], 0"], [32, "mov rax, [rbp+var_28]"], [33, "mov rdi, rax"], [34, "call sub_417393"], [35, "mov [rbp+var_A], ax"], [36, "jmp loc_41756E"], [37, "movzx esi, [rbp+var_38]"], [38, "movsx ecx, [rbp+var_34]"], [39, "movsx edx, [rbp+var_2C]"], [40, "mov edi, [rbp+var_4]"], [41, "mov rax, [rbp+var_20]"], [42, "add rdi, rax"], [43, "mov rax, [rbp+var_28]"], [44, "mov r9d, esi"], [45, "mov r8d, 0"], [46, "mov rsi, rax"], [47, "call sub_417859"], [48, "add [rbp+var_8], eax"], [49, "mov rax, [rbp+var_18]"], [50, "movzx eax, word ptr [rax+2]"], [51, "movsx rdx, ax"], [52, "movzx eax, [rbp+var_A]"], [53, "add rdx, rax"], [54, "movsx rax, [rbp+var_30]"], [55, "add rax, rdx"], [56, "cmp rax, 7FFFh"], [57, "ja loc_417610"], [58, "mov rax, [rbp+var_18]"], [59, "movzx eax, word ptr [rax+2]"], [60, "mov edx, eax"], [61, "movzx eax, [rbp+var_A]"], [62, "add eax, edx"], [63, "mov edx, eax"], [64, "mov rax, [rbp+var_18]"], [65, "mov [rax+2], dx"], [66, "mov rax, [rbp+var_18]"], [67, "movzx eax, word ptr [rax+2]"], [68, "mov edx, eax"], [69, "movzx eax, [rbp+var_30]"], [70, "add eax, edx"], [71, "mov edx, eax"], [72, "mov rax, [rbp+var_18]"], [73, "mov [rax+2], dx"], [74, "movzx esi, [rbp+var_38]"], [75, "movsx ecx, [rbp+var_2C]"], [76, "mov eax, [rbp+var_8]"], [77, "sub eax, [rbp+var_4]"], [78, "mov edi, [rbp+var_4]"], [79, "mov rdx, [rbp+var_20]"], [80, "add rdi, rdx"], [81, "mov rdx, [rbp+var_28]"], [82, "mov r8d, esi"], [83, "mov esi, eax"], [84, "call sub_417AA6"], [85, "mov [rbp+var_C], ax"], [86, "mov rax, [rbp+var_18]"], [87, "movzx eax, word ptr [rax]"], [88, "cmp [rbp+var_C], ax"], [89, "cmovge ax, [rbp+var_C]"], [90, "mov edx, eax"], [91, "mov rax, [rbp+var_18]"], [92, "mov [rax], dx"], [93, "mov eax, [rbp+var_8]"], [94, "mov [rbp+var_4], eax"], [95, "mov edx, [rbp+var_4]"], [96, "mov rax, [rbp+var_20]"], [97, "add rax, rdx"], [98, "movzx eax, byte ptr [rax]"], [99, "test al, al"], [100, "jnz loc_41749C"], [101, "cmp [rbp+var_4], 0"], [102, "jz short loc_4175D5"], [103, "mov eax, [rbp+var_4]"], [104, "sub eax, 1"], [105, "mov edx, eax"], [106, "mov rax, [rbp+var_20]"], [107, "add rax, rdx"], [108, "movzx eax, byte ptr [rax]"], [109, "cmp al, 0Ah"], [110, "jz short loc_4175B5"], [111, "mov eax, [rbp+var_4]"], [112, "sub eax, 1"], [113, "mov edx, eax"], [114, "mov rax, [rbp+var_20]"], [115, "add rax, rdx"], [116, "movzx eax, byte ptr [rax]"], [117, "cmp al, 0Dh"], [118, "jnz short loc_4175D5"], [119, "mov rax, [rbp+var_18]"], [120, "movzx eax, word ptr [rax+2]"], [121, "mov ecx, eax"], [122, "movzx edx, [rbp+var_30]"], [123, "movzx eax, [rbp+var_A]"], [124, "add eax, edx"], [125, "add eax, ecx"], [126, "mov edx, eax"], [127, "mov rax, [rbp+var_18]"], [128, "mov [rax+2], dx"], [129, "mov rax, [rbp+var_18]"], [130, "movzx eax, word ptr [rax+2]"], [131, "test ax, ax"], [132, "jnz short loc_4175F0"], [133, "movzx edx, [rbp+var_A]"], [134, "mov rax, [rbp+var_18]"], [135, "mov [rax+2], dx"], [136, "jmp short locret_417611"], [137, "mov rax, [rbp+var_18]"], [138, "movzx eax, word ptr [rax+2]"], [139, "movzx edx, [rbp+var_30]"], [140, "sub eax, edx"], [141, "mov edx, eax"], [142, "mov rax, [rbp+var_18]"], [143, "mov [rax+2], dx"], [144, "jmp short locret_417611"], [145, "nop"], [146, "jmp short locret_417611"], [147, "nop"], [148, "jmp short locret_417611"], [149, "nop"], [150, "leave"], [151, "retn"]], "data_dep": [[10, 6], [11, 7], [12, 11], [13, 8], [14, 13], [15, 9], [16, 15], [17, 3], [18, 17], [19, 3], [20, 19], [21, 4], [22, 21], [23, 5], [24, 23], [25, 16], [26, 25], [27, 26], [28, 27], [32, 5], [33, 32], [35, 34], [37, 16], [38, 29], [38, 14], [39, 10], [40, 30], [40, 94], [41, 4], [42, 41], [42, 40], [43, 5], [44, 37], [46, 43], [48, 47], [48, 31], [48, 48], [49, 3], [50, 20], [50, 49], [50, 65], [50, 92], [50, 73], [50, 18], [51, 50], [52, 35], [53, 52], [53, 51], [54, 12], [55, 54], [55, 53], [56, 55], [57, 56], [58, 3], [59, 73], [59, 18], [59, 20], [59, 65], [59, 92], [59, 58], [60, 59], [61, 35], [62, 60], [62, 61], [63, 62], [64, 3], [65, 63], [65, 64], [66, 3], [67, 65], [67, 66], [68, 67], [69, 12], [70, 68], [70, 69], [71, 70], [72, 3], [73, 71], [73, 72], [74, 16], [75, 10], [76, 48], [77, 76], [77, 30], [77, 94], [78, 30], [78, 94], [79, 4], [80, 78], [80, 79], [81, 5], [82, 74], [83, 77], [85, 84], [86, 3], [87, 73], [87, 18], [87, 86], [87, 92], [88, 85], [88, 87], [89, 88], [89, 85], [90, 89], [91, 3], [92, 90], [92, 91], [93, 48], [94, 93], [95, 30], [95, 94], [96, 4], [97, 95], [97, 96], [98, 92], [98, 73], [98, 18], [98, 20], [98, 65], [98, 97], [99, 98], [100, 99], [101, 30], [101, 94], [102, 101], [103, 30], [103, 94], [104, 103], [105, 104], [106, 4], [107, 106], [107, 105], [108, 20], [108, 107], [108, 65], [108, 92], [108, 73], [108, 18], [109, 108], [110, 109], [111, 30], [111, 94], [112, 111], [113, 112], [114, 4], [115, 114], [115, 113], [116, 65], [116, 115], [116, 92], [116, 18], [116, 73], [116, 20], [117, 116], [118, 117], [119, 3], [120, 92], [120, 119], [120, 128], [120, 73], [120, 18], [120, 20], [120, 65], [121, 120], [122, 12], [123, 35], [124, 122], [124, 123], [125, 121], [125, 124], [126, 125], [127, 3], [128, 126], [128, 127], [129, 3], [130, 92], [130, 128], [130, 73], [130, 18], [130, 20], [130, 65], [130, 129], [131, 130], [132, 131], [133, 35], [134, 3], [135, 133], [135, 134], [137, 3], [138, 128], [138, 73], [138, 18], [138, 137], [138, 20], [138, 143], [138, 65], [138, 92], [139, 12], [140, 139], [140, 138], [141, 140], [142, 3], [143, 142], [143, 141], [151, 134], [151, 19], [151, 55], [151, 142]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a_1ba19119f39f257e698158d43e5d3674346db96601f10ff9792919370406ff3a.jsonl.gz", "strip_func_name": "sub_41740B", "query": "\n\n\nunsigned __int64 __fastcall sub_41740B(__int16 *a1, __int64 a2, __int64 a3, __int16 a4, __int16 a5, __int16 a6, unsigned __int8 a7)\n{\nunsigned __int64 result; // rax\n__int16 v8; // ax\n__int16 v13; // [rsp+34h] [rbp-Ch]\n_BYTE v14[6]; // [rsp+36h] [rbp-Ah]\nunsigned int v15; // [rsp+3Ch] [rbp-4h]\n\n*a1 = 0;\nresult = (unsigned __int64)a1;\na1[1] = 0;\nif ( a2 && a3 )\n{\nif ( (a7 & 2) != 0 )\na6 = 0x1FFF;\nv15 = 0;\n*(_WORD *)&v14[4] = 0;\n*(_DWORD *)v14 = (unsigned __int16)sub_417393(a3);\nwhile ( *(_BYTE *)(v15 + a2) )\n{\n*(_DWORD *)&v14[2] += sub_417859(a2 + v15, a3, (unsigned int)a4, (unsigned int)a6, 0LL, a7);\nresult = *(unsigned __int16 *)v14 + (__int64)a1[1] + a5;\nif ( result > 0x7FFF )\nreturn result;\na1[1] += *(_WORD *)v14;\na1[1] += a5;\nv13 = sub_417AA6(a2 + v15, *(_DWORD *)&v14[2] - v15, a3, (unsigned int)a4, a7);\nv8 = *a1;\nif ( v13 >= *a1 )\nv8 = v13;\n*a1 = v8;\nv15 = *(_DWORD *)&v14[2];\n}\nif ( v15 && (*(_BYTE *)(v15 - 1 + a2) == 10 || *(_BYTE *)(v15 - 1 + a2) == 13) )\na1[1] += a5 + *(_WORD *)v14;\nresult = (unsigned __int64)a1;\nif ( a1[1] )\na1[1] -= a5;\nelse\na1[1] = *(_WORD *)v14;\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,a7,v13,v14,v15,sub_41740B,sub_417393,sub_417859,sub_417AA6,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'font', 'a4': 'letter_space', 'a1': 'size_res', 'a2': 'text', 'a5': 'line_space', 'a6': 'max_width', 'a7': 'flag', 'v13': 'act_line_length', 'v14': 'letter_height', 'v15': 'line_start', 'sub_41740B': 'lv_txt_get_size', 'sub_417393': 'lv_font_get_line_height', 'sub_417859': '_lv_txt_get_next_line', 'sub_417AA6': 'lv_txt_get_width'}"}
VM_VmProfile_f
a4da3dd4120f18235dcd09911711a112ee922becb3d1ea031edfea92b6f9c406
zturtleman
spearmint
NA
void VM_VmProfile_f( void ) { vm_t *vm; vmSymbol_t **sorted, *sym; int i; double total; if ( !lastVM ) { return; } vm = lastVM; if ( !vm->numSymbols ) { return; } sorted = Z_Malloc( vm->numSymbols * sizeof( *sorted ) ); sorted[0] = vm->symbols; total = sorted[0]->profileCount; for ( i = 1 ; i < vm->numSymbols ; i++ ) { sorted[i] = sorted[i-1]->next; total += sorted[i]->profileCount; } qsort( sorted, vm->numSymbols, sizeof( *sorted ), VM_ProfileSort ); for ( i = 0 ; i < vm->numSymbols ; i++ ) { int perc; sym = sorted[i]; perc = 100 * (float) sym->profileCount / total; Com_Printf( "%2i%% %9i %s\n", perc, sym->profileCount, sym->symName ); sym->profileCount = 0; } Com_Printf(" %9.0f total\n", total ); Z_Free( sorted ); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_45CBEC", "function_addr": 4574188, "binary_name": "a4da3dd4120f18235dcd09911711a112ee922becb3d1ea031edfea92b6f9c406.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov rax, cs:qword_76D3F8"], [4, "test rax, rax"], [5, "jz loc_45CDBF"], [6, "mov rax, cs:qword_76D3F8"], [7, "mov [rbp+var_18], rax"], [8, "mov rax, [rbp+var_18]"], [9, "mov eax, [rax+10C4h]"], [10, "test eax, eax"], [11, "jz loc_45CDC2"], [12, "mov rax, [rbp+var_18]"], [13, "mov eax, [rax+10C4h]"], [14, "cdqe"], [15, "shl eax, 3"], [16, "mov edi, eax"], [17, "call sub_439E27"], [18, "mov [rbp+base], rax"], [19, "mov rax, [rbp+var_18]"], [20, "mov rdx, [rax+10C8h]"], [21, "mov rax, [rbp+base]"], [22, "mov [rax], rdx"], [23, "mov rax, [rbp+base]"], [24, "mov rax, [rax]"], [25, "mov eax, [rax+0Ch]"], [26, "pxor xmm0, xmm0"], [27, "cvtsi2sd xmm0, eax"], [28, "movsd [rbp+var_10], xmm0"], [29, "mov [rbp+var_4], 1"], [30, "jmp short loc_45CCD3"], [31, "mov eax, [rbp+var_4]"], [32, "cdqe"], [33, "shl rax, 3"], [34, "lea rdx, [rax-8]"], [35, "mov rax, [rbp+base]"], [36, "add rax, rdx"], [37, "mov rax, [rax]"], [38, "mov edx, [rbp+var_4]"], [39, "movsxd rdx, edx"], [40, "lea rcx, ds:0[rdx*8]"], [41, "mov rdx, [rbp+base]"], [42, "add rdx, rcx"], [43, "mov rax, [rax]"], [44, "mov [rdx], rax"], [45, "mov eax, [rbp+var_4]"], [46, "cdqe"], [47, "lea rdx, ds:0[rax*8]"], [48, "mov rax, [rbp+base]"], [49, "add rax, rdx"], [50, "mov rax, [rax]"], [51, "mov eax, [rax+0Ch]"], [52, "pxor xmm0, xmm0"], [53, "cvtsi2sd xmm0, eax"], [54, "movsd xmm1, [rbp+var_10]"], [55, "addsd xmm0, xmm1"], [56, "movsd [rbp+var_10], xmm0"], [57, "add [rbp+var_4], 1"], [58, "mov rax, [rbp+var_18]"], [59, "mov eax, [rax+10C4h]"], [60, "cmp [rbp+var_4], eax"], [61, "jl short loc_45CC6D"], [62, "mov rax, [rbp+var_18]"], [63, "mov eax, [rax+10C4h]"], [64, "movsxd rsi, eax"], [65, "mov rax, [rbp+base]"], [66, "mov ecx, offset sub_45CB91"], [67, "mov edx, 8"], [68, "mov rdi, rax"], [69, "call _qsort"], [70, "mov [rbp+var_4], 0"], [71, "jmp short loc_45CD86"], [72, "mov eax, [rbp+var_4]"], [73, "cdqe"], [74, "lea rdx, ds:0[rax*8]"], [75, "mov rax, [rbp+base]"], [76, "add rax, rdx"], [77, "mov rax, [rax]"], [78, "mov [rbp+var_28], rax"], [79, "mov rax, [rbp+var_28]"], [80, "mov eax, [rax+0Ch]"], [81, "pxor xmm1, xmm1"], [82, "cvtsi2ss xmm1, eax"], [83, "movss xmm0, cs:dword_48EBB8"], [84, "mulss xmm0, xmm1"], [85, "cvtss2sd xmm0, xmm0"], [86, "divsd xmm0, [rbp+var_10]"], [87, "cvttsd2si eax, xmm0"], [88, "mov [rbp+var_2C], eax"], [89, "mov rax, [rbp+var_28]"], [90, "lea rcx, [rax+10h]"], [91, "mov rax, [rbp+var_28]"], [92, "mov edx, [rax+0Ch]"], [93, "mov eax, [rbp+var_2C]"], [94, "mov esi, eax"], [95, "mov edi, offset a2i9iS"], [96, "mov eax, 0"], [97, "call sub_4383DF"], [98, "mov rax, [rbp+var_28]"], [99, "mov dword ptr [rax+0Ch], 0"], [100, "add [rbp+var_4], 1"], [101, "mov rax, [rbp+var_18]"], [102, "mov eax, [rax+10C4h]"], [103, "cmp [rbp+var_4], eax"], [104, "jl loc_45CD0E"], [105, "mov rax, [rbp+var_10]"], [106, "movq xmm0, rax"], [107, "mov edi, offset a90fTotal"], [108, "mov eax, 1"], [109, "call sub_4383DF"], [110, "mov rax, [rbp+base]"], [111, "mov rdi, rax"], [112, "call sub_43996D"], [113, "jmp short locret_45CDC3"], [114, "nop"], [115, "jmp short locret_45CDC3"], [116, "nop"], [117, "leave"], [118, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [12, 7], [13, 12], [15, 13], [16, 15], [18, 17], [19, 7], [20, 19], [21, 18], [22, 21], [22, 20], [23, 18], [24, 23], [24, 22], [25, 22], [25, 24], [27, 26], [27, 25], [28, 27], [31, 29], [31, 57], [33, 31], [34, 20], [34, 47], [34, 22], [34, 33], [34, 44], [35, 18], [36, 34], [36, 35], [37, 44], [37, 36], [37, 22], [38, 57], [38, 29], [39, 38], [40, 40], [41, 18], [42, 41], [42, 40], [43, 37], [43, 22], [43, 44], [44, 42], [44, 43], [45, 57], [45, 29], [47, 42], [48, 18], [49, 48], [49, 47], [50, 22], [50, 49], [50, 44], [51, 50], [51, 44], [53, 52], [53, 51], [54, 28], [54, 56], [55, 54], [55, 53], [56, 55], [57, 57], [57, 29], [58, 7], [59, 22], [59, 44], [59, 58], [60, 57], [60, 59], [60, 29], [61, 60], [62, 7], [63, 22], [63, 44], [63, 62], [64, 63], [65, 18], [68, 65], [72, 100], [72, 70], [74, 92], [74, 67], [75, 18], [76, 74], [76, 75], [77, 99], [77, 44], [77, 76], [77, 22], [78, 77], [79, 78], [80, 99], [80, 44], [80, 22], [80, 79], [82, 81], [82, 80], [84, 83], [84, 82], [85, 84], [86, 56], [86, 28], [86, 85], [87, 80], [87, 86], [88, 87], [89, 78], [90, 90], [90, 99], [90, 44], [90, 89], [90, 66], [90, 22], [91, 78], [92, 99], [92, 44], [92, 91], [92, 22], [93, 88], [94, 93], [98, 78], [99, 98], [100, 70], [100, 100], [101, 7], [102, 22], [102, 99], [102, 44], [102, 101], [103, 102], [103, 100], [103, 70], [104, 103], [105, 56], [105, 28], [106, 105], [110, 18], [111, 110], [118, 112], [118, 4], [118, 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/a4da3dd4120f18235dcd09911711a112ee922becb3d1ea031edfea92b6f9c406_a4da3dd4120f18235dcd09911711a112ee922becb3d1ea031edfea92b6f9c406.jsonl.gz", "strip_func_name": "sub_45CBEC", "query": "\n\n\n__int64 __fastcall sub_45CBEC(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6)\n{\n__int64 result; // rax\nsize_t 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\n__int64 v16; // [rsp+8h] [rbp-28h]\nint *base; // [rsp+10h] [rbp-20h]\n__int64 v18; // [rsp+18h] [rbp-18h]\ndouble v19; // [rsp+20h] [rbp-10h]\nint i; // [rsp+2Ch] [rbp-4h]\nint j; // [rsp+2Ch] [rbp-4h]\n\nresult = qword_76D3F8;\nif ( qword_76D3F8 )\n{\nv18 = qword_76D3F8;\nresult = *(unsigned int *)(qword_76D3F8 + 4292);\nif ( (_DWORD)result )\n{\nbase = sub_439E27(8 * *(_DWORD *)(qword_76D3F8 + 4292), a2, a3, a4, a5, a6);\n*(_QWORD *)base = *(_QWORD *)(v18 + 4296);\nv19 = (double)*(int *)(*(_QWORD *)base + 12LL);\nfor ( i = 1; i < *(_DWORD *)(v18 + 4292); ++i )\n{\n*(_QWORD *)&base[2 * i] = **(_QWORD **)&base[2 * i - 2];\nv19 = (double)*(int *)(*(_QWORD *)&base[2 * i] + 12LL) + v19;\n}\nv7 = *(int *)(v18 + 4292);\nqsort(base, v7, 8uLL, (__compar_fn_t)sub_45CB91);\nfor ( j = 0; j < *(_DWORD *)(v18 + 4292); ++j )\n{\nv16 = *(_QWORD *)&base[2 * j];\nv7 = (unsigned int)(int)((float)(100.0 * (float)*(int *)(v16 + 12)) / v19);\nsub_4383DF(\"%2i%% %9i %s\\n\", v7, *(unsigned int *)(v16 + 12), v16 + 16, v10, v11);\n*(_DWORD *)(v16 + 12) = 0;\n}\nsub_4383DF(\" %9.0f total\\n\", v7, v8, v9, v10, v11, v19);\nresult = sub_43996D(base, v7, v12, v13, v14, v15);\n}\n}\nreturn result;\n}\n\n\n\nQ:[v16,base,v18,v19,j,sub_45CBEC,sub_439E27,sub_45CB91,sub_4383DF,sub_43996D,]\nAssistant: ", "hints": "[]", "response": "{'v16': 'sym', 'base': 'sorted', 'v18': 'vm', 'v19': 'total', 'j': 'ia', 'sub_45CBEC': 'VM_VmProfile_f', 'sub_439E27': 'Z_Malloc', 'sub_45CB91': 'VM_ProfileSort', 'sub_4383DF': 'Com_Printf', 'sub_43996D': 'Z_Free'}"}
test_hashmap_percpu
5f189cdcc78f91ec5a8598fa3b6c559994152121d112d1307b43b593a709d992
linux-wpan
linux-wpan-next
NA
static void test_hashmap_percpu(int task, void *data) { unsigned int nr_cpus = bpf_num_possible_cpus(); long long value[nr_cpus]; long long key, next_key; int expected_key_mask = 0; int fd, i; fd = bpf_map_create(BPF_MAP_TYPE_PERCPU_HASH, sizeof(key), sizeof(value[0]), 2, map_flags); if (fd < 0) { printf("Failed to create hashmap '%s'!\n", strerror(errno)); exit(1); } for (i = 0; i < nr_cpus; i++) value[i] = i + 100; key = 1; /* Insert key=1 element. */ assert(!(expected_key_mask & key)); assert(bpf_map_update(fd, &key, value, BPF_ANY) == 0); expected_key_mask |= key; /* BPF_NOEXIST means add new element if it doesn't exist. */ assert(bpf_map_update(fd, &key, value, BPF_NOEXIST) == -1 && /* key=1 already exists. */ errno == EEXIST); /* -1 is an invalid flag. */ assert(bpf_map_update(fd, &key, value, -1) == -1 && errno == EINVAL); /* Check that key=1 can be found. Value could be 0 if the lookup * was run from a different CPU. */ value[0] = 1; assert(bpf_map_lookup(fd, &key, value) == 0 && value[0] == 100); key = 2; /* Check that key=2 is not found. */ assert(bpf_map_lookup(fd, &key, value) == -1 && errno == ENOENT); /* BPF_EXIST means update existing element. */ assert(bpf_map_update(fd, &key, value, BPF_EXIST) == -1 && /* key=2 is not there. */ errno == ENOENT); /* Insert key=2 element. */ assert(!(expected_key_mask & key)); assert(bpf_map_update(fd, &key, value, BPF_NOEXIST) == 0); expected_key_mask |= key; /* key=1 and key=2 were inserted, check that key=0 cannot be * inserted due to max_entries limit. */ key = 0; assert(bpf_map_update(fd, &key, value, BPF_NOEXIST) == -1 && errno == E2BIG); /* Check that key = 0 doesn't exist. */ assert(bpf_map_delete(fd, &key) == -1 && errno == ENOENT); /* Iterate over two elements. */ while (!bpf_map_next_key(fd, &key, &next_key)) { assert((expected_key_mask & next_key) == next_key); expected_key_mask &= ~next_key; assert(bpf_map_lookup(fd, &next_key, value) == 0); for (i = 0; i < nr_cpus; i++) assert(value[i] == i + 100); key = next_key; } assert(errno == ENOENT); /* Update with BPF_EXIST. */ key = 1; assert(bpf_map_update(fd, &key, value, BPF_EXIST) == 0); /* Delete both elements. */ key = 1; assert(bpf_map_delete(fd, &key) == 0); key = 2; assert(bpf_map_delete(fd, &key) == 0); assert(bpf_map_delete(fd, &key) == -1 && errno == ENOENT); key = 0; /* Check that map is empty. */ assert(bpf_map_next_key(fd, &key, &next_key) == -1 && errno == ENOENT); close(fd); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401ADB", "function_addr": 4201179, "binary_name": "5f189cdcc78f91ec5a8598fa3b6c559994152121d112d1307b43b593a709d992.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, 58h"], [8, "mov [rbp+var_74], edi"], [9, "mov [rbp+var_80], rsi"], [10, "mov rax, rsp"], [11, "mov rbx, rax"], [12, "call sub_4014B9"], [13, "mov [rbp+var_3C], eax"], [14, "mov eax, [rbp+var_3C]"], [15, "mov edx, eax"], [16, "sub rdx, 1"], [17, "mov [rbp+var_48], rdx"], [18, "mov edx, eax"], [19, "mov r14, rdx"], [20, "mov r15d, 0"], [21, "mov edx, eax"], [22, "mov r12, rdx"], [23, "mov r13d, 0"], [24, "mov eax, eax"], [25, "lea rdx, ds:0[rax*8]"], [26, "mov eax, 10h"], [27, "sub rax, 1"], [28, "add rax, rdx"], [29, "mov ecx, 10h"], [30, "mov edx, 0"], [31, "div rcx"], [32, "imul rax, 10h"], [33, "sub rsp, rax"], [34, "mov rax, rsp"], [35, "add rax, 7"], [36, "shr rax, 3"], [37, "shl rax, 3"], [38, "mov [rbp+var_50], rax"], [39, "mov [rbp+var_38], 0"], [40, "mov eax, cs:dword_4070AC"], [41, "mov r8d, eax"], [42, "mov ecx, 2"], [43, "mov edx, 8"], [44, "mov esi, 8"], [45, "mov edi, 5"], [46, "call sub_40143B"], [47, "mov [rbp+fd], eax"], [48, "cmp [rbp+fd], 0"], [49, "jns short loc_401BBD"], [50, "call ___errno_location"], [51, "mov eax, [rax]"], [52, "mov edi, eax"], [53, "call _strerror"], [54, "mov rsi, rax"], [55, "mov edi, offset aFailedToCreate"], [56, "mov eax, 0"], [57, "call _printf"], [58, "mov edi, 1"], [59, "call _exit"], [60, "mov [rbp+var_34], 0"], [61, "jmp short loc_401BE1"], [62, "mov eax, [rbp+var_34]"], [63, "add eax, 64h "], [64, "movsxd rcx, eax"], [65, "mov rax, [rbp+var_50]"], [66, "mov edx, [rbp+var_34]"], [67, "movsxd rdx, edx"], [68, "mov [rax+rdx*8], rcx"], [69, "add [rbp+var_34], 1"], [70, "mov eax, [rbp+var_34]"], [71, "cmp [rbp+var_3C], eax"], [72, "ja short loc_401BC6"], [73, "mov [rbp+var_60], 1"], [74, "mov eax, [rbp+var_38]"], [75, "movsxd rdx, eax"], [76, "mov rax, [rbp+var_60]"], [77, "and rax, rdx"], [78, "test rax, rax"], [79, "jz short loc_401C1C"], [80, "mov ecx, offset aTestHashmapPer"], [81, "mov edx, 84h"], [82, "mov esi, offset file"], [83, "mov edi, offset aExpectedKeyMas"], [84, "call ___assert_fail"], [85, "mov rdx, [rbp+var_50]"], [86, "lea rsi, [rbp+var_60]"], [87, "mov eax, [rbp+fd]"], [88, "mov ecx, 0"], [89, "mov edi, eax"], [90, "call sub_4012C0"], [91, "test eax, eax"], [92, "jz short loc_401C50"], [93, "mov ecx, offset aTestHashmapPer"], [94, "mov edx, 85h"], [95, "mov esi, offset file"], [96, "mov edi, offset aBpfMapUpdateFd_6"], [97, "call ___assert_fail"], [98, "mov rax, [rbp+var_60]"], [99, "or [rbp+var_38], eax"], [100, "mov rdx, [rbp+var_50]"], [101, "lea rsi, [rbp+var_60]"], [102, "mov eax, [rbp+fd]"], [103, "mov ecx, 1"], [104, "mov edi, eax"], [105, "call sub_4012C0"], [106, "cmp eax, 0FFFFFFFFh"], [107, "jnz short loc_401C7F"], [108, "call ___errno_location"], [109, "mov eax, [rax]"], [110, "cmp eax, 11h"], [111, "jz short loc_401C98"], [112, "mov ecx, offset aTestHashmapPer"], [113, "mov edx, 89h"], [114, "mov esi, offset file"], [115, "mov edi, offset aBpfMapUpdateFd_7"], [116, "call ___assert_fail"], [117, "mov rdx, [rbp+var_50]"], [118, "lea rsi, [rbp+var_60]"], [119, "mov eax, [rbp+fd]"], [120, "mov rcx, 0FFFFFFFFFFFFFFFFh"], [121, "mov edi, eax"], [122, "call sub_4012C0"], [123, "cmp eax, 0FFFFFFFFh"], [124, "jnz short loc_401CC2"], [125, "call ___errno_location"], [126, "mov eax, [rax]"], [127, "cmp eax, 16h"], [128, "jz short loc_401CDB"], [129, "mov ecx, offset aTestHashmapPer"], [130, "mov edx, 8Eh"], [131, "mov esi, offset file"], [132, "mov edi, offset aBpfMapUpdateFd_8"], [133, "call ___assert_fail"], [134, "mov rax, [rbp+var_50]"], [135, "mov qword ptr [rax], 1"], [136, "mov rdx, [rbp+var_50]"], [137, "lea rcx, [rbp+var_60]"], [138, "mov eax, [rbp+fd]"], [139, "mov rsi, rcx"], [140, "mov edi, eax"], [141, "call sub_40123F"], [142, "test eax, eax"], [143, "jnz short loc_401D0C"], [144, "mov rax, [rbp+var_50]"], [145, "mov rax, [rax]"], [146, "cmp rax, 64h "], [147, "jz short loc_401D25"], [148, "mov ecx, offset aTestHashmapPer"], [149, "mov edx, 94h"], [150, "mov esi, offset file"], [151, "mov edi, offset aBpfMapLookupFd_1"], [152, "call ___assert_fail"], [153, "mov [rbp+var_60], 2"], [154, "mov rdx, [rbp+var_50]"], [155, "lea rcx, [rbp+var_60]"], [156, "mov eax, [rbp+fd]"], [157, "mov rsi, rcx"], [158, "mov edi, eax"], [159, "call sub_40123F"], [160, "cmp eax, 0FFFFFFFFh"], [161, "jnz short loc_401D53"], [162, "call ___errno_location"], [163, "mov eax, [rax]"], [164, "cmp eax, 2"], [165, "jz short loc_401D6C"], [166, "mov ecx, offset aTestHashmapPer"], [167, "mov edx, 98h"], [168, "mov esi, offset file"], [169, "mov edi, offset aBpfMapLookupFd_2"], [170, "call ___assert_fail"], [171, "mov rdx, [rbp+var_50]"], [172, "lea rsi, [rbp+var_60]"], [173, "mov eax, [rbp+fd]"], [174, "mov ecx, 2"], [175, "mov edi, eax"], [176, "call sub_4012C0"], [177, "cmp eax, 0FFFFFFFFh"], [178, "jnz short loc_401D94"], [179, "call ___errno_location"], [180, "mov eax, [rax]"], [181, "cmp eax, 2"], [182, "jz short loc_401DAD"], [183, "mov ecx, offset aTestHashmapPer"], [184, "mov edx, 9Bh"], [185, "mov esi, offset file"], [186, "mov edi, offset aBpfMapUpdateFd_9"], [187, "call ___assert_fail"], [188, "mov eax, [rbp+var_38]"], [189, "movsxd rdx, eax"], [190, "mov rax, [rbp+var_60]"], [191, "and rax, rdx"], [192, "test rax, rax"], [193, "jz short loc_401DD8"], [194, "mov ecx, offset aTestHashmapPer"], [195, "mov edx, 0A0h"], [196, "mov esi, offset file"], [197, "mov edi, offset aExpectedKeyMas"], [198, "call ___assert_fail"], [199, "mov rdx, [rbp+var_50]"], [200, "lea rsi, [rbp+var_60]"], [201, "mov eax, [rbp+fd]"], [202, "mov ecx, 1"], [203, "mov edi, eax"], [204, "call sub_4012C0"], [205, "test eax, eax"], [206, "jz short loc_401E0C"], [207, "mov ecx, offset aTestHashmapPer"], [208, "mov edx, 0A1h"], [209, "mov esi, offset file"], [210, "mov edi, offset aBpfMapUpdateFd_10"], [211, "call ___assert_fail"], [212, "mov rax, [rbp+var_60]"], [213, "or [rbp+var_38], eax"], [214, "mov [rbp+var_60], 0"], [215, "mov rdx, [rbp+var_50]"], [216, "lea rsi, [rbp+var_60]"], [217, "mov eax, [rbp+fd]"], [218, "mov ecx, 1"], [219, "mov edi, eax"], [220, "call sub_4012C0"], [221, "cmp eax, 0FFFFFFFFh"], [222, "jnz short loc_401E43"], [223, "call ___errno_location"], [224, "mov eax, [rax]"], [225, "cmp eax, 7"], [226, "jz short loc_401E5C"], [227, "mov ecx, offset aTestHashmapPer"], [228, "mov edx, 0A8h"], [229, "mov esi, offset file"], [230, "mov edi, offset aBpfMapUpdateFd_11"], [231, "call ___assert_fail"], [232, "lea rdx, [rbp+var_60]"], [233, "mov eax, [rbp+fd]"], [234, "mov rsi, rdx"], [235, "mov edi, eax"], [236, "call sub_40134D"], [237, "cmp eax, 0FFFFFFFFh"], [238, "jnz short loc_401E7E"], [239, "call ___errno_location"], [240, "mov eax, [rax]"], [241, "cmp eax, 2"], [242, "jz short loc_401E97"], [243, "mov ecx, offset aTestHashmapPer"], [244, "mov edx, 0ACh"], [245, "mov esi, offset file"], [246, "mov edi, offset aBpfMapDeleteFd"], [247, "call ___assert_fail"], [248, "jmp loc_401F57"], [249, "mov eax, [rbp+var_38]"], [250, "movsxd rdx, eax"], [251, "mov rax, [rbp+var_68]"], [252, "and rdx, rax"], [253, "mov rax, [rbp+var_68]"], [254, "cmp rdx, rax"], [255, "jz short loc_401ECB"], [256, "mov ecx, offset aTestHashmapPer"], [257, "mov edx, 0B0h"], [258, "mov esi, offset file"], [259, "mov edi, offset aExpectedKeyMas_0"], [260, "call ___assert_fail"], [261, "mov rax, [rbp+var_68]"], [262, "not eax"], [263, "and [rbp+var_38], eax"], [264, "mov rdx, [rbp+var_50]"], [265, "lea rcx, [rbp+var_68]"], [266, "mov eax, [rbp+fd]"], [267, "mov rsi, rcx"], [268, "mov edi, eax"], [269, "call sub_40123F"], [270, "test eax, eax"], [271, "jz short loc_401F06"], [272, "mov ecx, offset aTestHashmapPer"], [273, "mov edx, 0B3h"], [274, "mov esi, offset file"], [275, "mov edi, offset aBpfMapLookupFd_3"], [276, "call ___assert_fail"], [277, "mov [rbp+var_34], 0"], [278, "jmp short loc_401F47"], [279, "mov rax, [rbp+var_50]"], [280, "mov edx, [rbp+var_34]"], [281, "movsxd rdx, edx"], [282, "mov rdx, [rax+rdx*8]"], [283, "mov eax, [rbp+var_34]"], [284, "add eax, 64h "], [285, "cdqe"], [286, "cmp rdx, rax"], [287, "jz short loc_401F43"], [288, "mov ecx, offset aTestHashmapPer"], [289, "mov edx, 0B6h"], [290, "mov esi, offset file"], [291, "mov edi, offset aValueII100"], [292, "call ___assert_fail"], [293, "add [rbp+var_34], 1"], [294, "mov eax, [rbp+var_34]"], [295, "cmp [rbp+var_3C], eax"], [296, "ja short loc_401F0F"], [297, "mov rax, [rbp+var_68]"], [298, "mov [rbp+var_60], rax"], [299, "lea rdx, [rbp+var_68]"], [300, "lea rcx, [rbp+var_60]"], [301, "mov eax, [rbp+fd]"], [302, "mov rsi, rcx"], [303, "mov edi, eax"], [304, "call sub_4013BA"], [305, "test eax, eax"], [306, "jz loc_401E9C"], [307, "call ___errno_location"], [308, "mov eax, [rax]"], [309, "cmp eax, 2"], [310, "jz short loc_401F99"], [311, "mov ecx, offset aTestHashmapPer"], [312, "mov edx, 0BAh"], [313, "mov esi, offset file"], [314, "mov edi, offset aErrnoEnoent"], [315, "call ___assert_fail"], [316, "mov [rbp+var_60], 1"], [317, "mov rdx, [rbp+var_50]"], [318, "lea rsi, [rbp+var_60]"], [319, "mov eax, [rbp+fd]"], [320, "mov ecx, 2"], [321, "mov edi, eax"], [322, "call sub_4012C0"], [323, "test eax, eax"], [324, "jz short loc_401FD5"], [325, "mov ecx, offset aTestHashmapPer"], [326, "mov edx, 0BEh"], [327, "mov esi, offset file"], [328, "mov edi, offset aBpfMapUpdateFd_12"], [329, "call ___assert_fail"], [330, "mov [rbp+var_60], 1"], [331, "lea rdx, [rbp+var_60]"], [332, "mov eax, [rbp+fd]"], [333, "mov rsi, rdx"], [334, "mov edi, eax"], [335, "call sub_40134D"], [336, "test eax, eax"], [337, "jz short loc_40200B"], [338, "mov ecx, offset aTestHashmapPer"], [339, "mov edx, 0C2h"], [340, "mov esi, offset file"], [341, "mov edi, offset aBpfMapDeleteFd_0"], [342, "call ___assert_fail"], [343, "mov [rbp+var_60], 2"], [344, "lea rdx, [rbp+var_60]"], [345, "mov eax, [rbp+fd]"], [346, "mov rsi, rdx"], [347, "mov edi, eax"], [348, "call sub_40134D"], [349, "test eax, eax"], [350, "jz short loc_402041"], [351, "mov ecx, offset aTestHashmapPer"], [352, "mov edx, 0C4h"], [353, "mov esi, offset file"], [354, "mov edi, offset aBpfMapDeleteFd_0"], [355, "call ___assert_fail"], [356, "lea rdx, [rbp+var_60]"], [357, "mov eax, [rbp+fd]"], [358, "mov rsi, rdx"], [359, "mov edi, eax"], [360, "call sub_40134D"], [361, "cmp eax, 0FFFFFFFFh"], [362, "jnz short loc_402063"], [363, "call ___errno_location"], [364, "mov eax, [rax]"], [365, "cmp eax, 2"], [366, "jz short loc_40207C"], [367, "mov ecx, offset aTestHashmapPer"], [368, "mov edx, 0C5h"], [369, "mov esi, offset file"], [370, "mov edi, offset aBpfMapDeleteFd"], [371, "call ___assert_fail"], [372, "mov [rbp+var_60], 0"], [373, "lea rdx, [rbp+var_68]"], [374, "lea rcx, [rbp+var_60]"], [375, "mov eax, [rbp+fd]"], [376, "mov rsi, rcx"], [377, "mov edi, eax"], [378, "call sub_4013BA"], [379, "cmp eax, 0FFFFFFFFh"], [380, "jnz short loc_4020AA"], [381, "call ___errno_location"], [382, "mov eax, [rax]"], [383, "cmp eax, 2"], [384, "jz short loc_4020C3"], [385, "mov ecx, offset aTestHashmapPer"], [386, "mov edx, 0C9h"], [387, "mov esi, offset file"], [388, "mov edi, offset aBpfMapNextKeyF_2"], [389, "call ___assert_fail"], [390, "mov eax, [rbp+fd]"], [391, "mov edi, eax"], [392, "call _close"], [393, "mov rsp, rbx"], [394, "nop"], [395, "lea rsp, [rbp-28h]"], [396, "pop rbx"], [397, "pop r12"], [398, "pop r13"], [399, "pop r14"], [400, "pop r15"], [401, "pop rbp"], [402, "retn"]], "data_dep": [[10, 7], [11, 10], [13, 12], [14, 13], [15, 14], [16, 15], [17, 16], [18, 14], [19, 18], [21, 14], [22, 21], [24, 14], [25, 21], [27, 26], [28, 25], [28, 27], [31, 29], [32, 28], [33, 7], [33, 32], [34, 33], [35, 34], [36, 35], [37, 36], [38, 37], [41, 40], [47, 46], [48, 47], [49, 48], [51, 50], [52, 51], [54, 53], [62, 60], [62, 69], [63, 62], [64, 63], [65, 38], [66, 60], [66, 69], [67, 66], [68, 65], [68, 64], [69, 60], [69, 69], [70, 60], [70, 69], [71, 13], [71, 70], [72, 71], [74, 39], [75, 74], [76, 73], [77, 76], [77, 75], [78, 77], [79, 78], [85, 38], [86, 44], [86, 73], [87, 47], [89, 87], [91, 90], [92, 91], [98, 73], [99, 39], [99, 98], [100, 38], [101, 73], [101, 86], [102, 47], [104, 102], [106, 105], [107, 106], [109, 108], [109, 68], [110, 109], [111, 110], [117, 38], [118, 101], [118, 73], [119, 47], [121, 119], [123, 122], [124, 123], [126, 68], [126, 125], [127, 126], [128, 127], [134, 38], [135, 134], [136, 38], [137, 120], [137, 73], [138, 47], [139, 137], [140, 138], [142, 141], [143, 142], [144, 38], [145, 135], [145, 144], [145, 68], [146, 145], [147, 146], [154, 38], [155, 153], [155, 137], [156, 47], [157, 155], [158, 156], [160, 159], [161, 160], [163, 68], [163, 135], [163, 162], [164, 163], [165, 164], [171, 38], [172, 157], [172, 153], [173, 47], [175, 173], [177, 176], [178, 177], [180, 68], [180, 179], [180, 135], [181, 180], [182, 181], [188, 99], [189, 188], [190, 153], [191, 189], [191, 190], [192, 191], [193, 192], [199, 38], [200, 172], [200, 153], [201, 47], [203, 201], [205, 204], [206, 205], [212, 153], [213, 99], [213, 212], [215, 38], [216, 214], [216, 200], [217, 47], [219, 217], [221, 220], [222, 221], [224, 135], [224, 68], [224, 223], [225, 224], [226, 225], [232, 215], [232, 214], [233, 47], [234, 232], [235, 233], [237, 236], [238, 237], [240, 68], [240, 239], [240, 135], [241, 240], [242, 241], [249, 263], [249, 213], [250, 249], [252, 250], [252, 251], [254, 252], [254, 253], [255, 254], [262, 261], [263, 262], [263, 213], [263, 263], [264, 38], [265, 300], [266, 47], [267, 265], [268, 266], [270, 269], [271, 270], [279, 38], [280, 293], [280, 277], [281, 280], [282, 279], [282, 135], [282, 68], [283, 293], [283, 277], [284, 283], [286, 282], [286, 284], [287, 286], [293, 293], [293, 277], [294, 293], [294, 277], [295, 294], [295, 13], [296, 295], [298, 297], [299, 232], [299, 264], [299, 282], [300, 265], [300, 214], [300, 298], [300, 218], [301, 47], [302, 300], [303, 301], [305, 304], [306, 305], [308, 68], [308, 307], [308, 135], [309, 308], [310, 309], [317, 38], [318, 316], [318, 302], [319, 47], [321, 319], [323, 322], [324, 323], [331, 330], [331, 317], [332, 47], [333, 331], [334, 332], [336, 335], [337, 336], [344, 343], [344, 331], [345, 47], [346, 344], [347, 345], [349, 348], [350, 349], [356, 343], [356, 344], [357, 47], [358, 356], [359, 357], [361, 360], [362, 361], [364, 135], [364, 68], [364, 363], [365, 364], [366, 365], [373, 356], [374, 372], [374, 320], [375, 47], [376, 374], [377, 375], [379, 378], [380, 379], [382, 381], [382, 135], [382, 68], [383, 382], [384, 383], [390, 47], [391, 390], [393, 11], [395, 393], [396, 6], [397, 5], [398, 4], [399, 3], [400, 2], [401, 0], [402, 392]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5f189cdcc78f91ec5a8598fa3b6c559994152121d112d1307b43b593a709d992_5f189cdcc78f91ec5a8598fa3b6c559994152121d112d1307b43b593a709d992.jsonl.gz", "strip_func_name": "sub_401ADB", "query": "\n\n\nint __fastcall sub_401ADB(__int64 a1, __int64 a2)\n{\nvoid *v2; // rsp\nint *v3; // rax\nchar *v4; // rax\n__int64 v6; // [rsp+0h] [rbp-80h] BYREF\nint v7; // [rsp+Ch] [rbp-74h]\nunsigned __int64 v8; // [rsp+18h] [rbp-68h] BYREF\nunsigned __int64 v9; // [rsp+20h] [rbp-60h] BYREF\nint fd; // [rsp+2Ch] [rbp-54h]\n_QWORD *v11; // [rsp+30h] [rbp-50h]\n__int64 v12; // [rsp+38h] [rbp-48h]\nunsigned int v13; // [rsp+44h] [rbp-3Ch]\nint v14; // [rsp+48h] [rbp-38h]\nunsigned int i; // [rsp+4Ch] [rbp-34h]\n\nv7 = a1;\nHIBYTE(v6) = HIBYTE(a2);\nv13 = sub_4014B9(a1);\nv12 = v13 - 1LL;\nv2 = alloca(16 * ((8 * (unsigned __int64)v13 + 15) / 0x10));\nv11 = (_QWORD *)(8 * (((unsigned __int64)&v6 + 7) >> 3));\nv14 = 0;\nfd = sub_40143B(5u, 8u, 8u, 2u, dword_4070AC);\nif ( fd < 0 )\n{\nv3 = __errno_location();\nv4 = strerror(*v3);\nprintf(\"Failed to create hashmap '%s'!\\n\", v4);\nexit(1);\n}\nfor ( i = 0; v13 > i; ++i )\nv11[i] = (int)(i + 100);\nv9 = 1LL;\nif ( (v14 & 1LL) != 0 )\n__assert_fail(\"!(expected_key_mask & key)\", \"test_maps.c\", 0x84u, \"test_hashmap_percpu\");\nif ( (unsigned int)sub_4012C0(fd, (__int64)&v9, (__int64)v11, 0LL) )\n__assert_fail(\"bpf_map_update(fd, &key, value, BPF_ANY) == 0\", \"test_maps.c\", 0x85u, \"test_hashmap_percpu\");\nv14 |= v9;\nif ( (unsigned int)sub_4012C0(fd, (__int64)&v9, (__int64)v11, 1LL) != -1 || *__errno_location() != 17 )\n__assert_fail(\n\"bpf_map_update(fd, &key, value, BPF_NOEXIST) == -1 && errno == EEXIST\",\n\"test_maps.c\",\n0x89u,\n\"test_hashmap_percpu\");\nif ( (unsigned int)sub_4012C0(fd, (__int64)&v9, (__int64)v11, -1LL) != -1 || *__errno_location() != 22 )\n__assert_fail(\n\"bpf_map_update(fd, &key, value, -1) == -1 && errno == EINVAL\",\n\"test_maps.c\",\n0x8Eu,\n\"test_hashmap_percpu\");\n*v11 = 1LL;\nif ( (unsigned int)sub_40123F(fd, (__int64)&v9, (__int64)v11) || *v11 != 100LL )\n__assert_fail(\n\"bpf_map_lookup(fd, &key, value) == 0 && value[0] == 100\",\n\"test_maps.c\",\n0x94u,\n\"test_hashmap_percpu\");\nv9 = 2LL;\nif ( (unsigned int)sub_40123F(fd, (__int64)&v9, (__int64)v11) != -1 || *__errno_location() != 2 )\n__assert_fail(\n\"bpf_map_lookup(fd, &key, value) == -1 && errno == ENOENT\",\n\"test_maps.c\",\n0x98u,\n\"test_hashmap_percpu\");\nif ( (unsigned int)sub_4012C0(fd, (__int64)&v9, (__int64)v11, 2LL) != -1 || *__errno_location() != 2 )\n__assert_fail(\n\"bpf_map_update(fd, &key, value, BPF_EXIST) == -1 && errno == ENOENT\",\n\"test_maps.c\",\n0x9Bu,\n\"test_hashmap_percpu\");\nif ( (v14 & v9) != 0 )\n__assert_fail(\"!(expected_key_mask & key)\", \"test_maps.c\", 0xA0u, \"test_hashmap_percpu\");\nif ( (unsigned int)sub_4012C0(fd, (__int64)&v9, (__int64)v11, 1LL) )\n__assert_fail(\"bpf_map_update(fd, &key, value, BPF_NOEXIST) == 0\", \"test_maps.c\", 0xA1u, \"test_hashmap_percpu\");\nv14 |= v9;\nv9 = 0LL;\nif ( (unsigned int)sub_4012C0(fd, (__int64)&v9, (__int64)v11, 1LL) != -1 || *__errno_location() != 7 )\n__assert_fail(\n\"bpf_map_update(fd, &key, value, BPF_NOEXIST) == -1 && errno == E2BIG\",\n\"test_maps.c\",\n0xA8u,\n\"test_hashmap_percpu\");\nif ( (unsigned int)sub_40134D(fd, (__int64)&v9) != -1 || *__errno_location() != 2 )\n__assert_fail(\"bpf_map_delete(fd, &key) == -1 && errno == ENOENT\", \"test_maps.c\", 0xACu, \"test_hashmap_percpu\");\nwhile ( !(unsigned int)sub_4013BA(fd, (__int64)&v9, (__int64)&v8) )\n{\nif ( (v8 & v14) != v8 )\n__assert_fail(\"(expected_key_mask & next_key) == next_key\", \"test_maps.c\", 0xB0u, \"test_hashmap_percpu\");\nv14 &= ~(_DWORD)v8;\nif ( (unsigned int)sub_40123F(fd, (__int64)&v8, (__int64)v11) )\n__assert_fail(\"bpf_map_lookup(fd, &next_key, value) == 0\", \"test_maps.c\", 0xB3u, \"test_hashmap_percpu\");\nfor ( i = 0; v13 > i; ++i )\n{\nif ( v11[i] != i + 100 )\n__assert_fail(\"value[i] == i + 100\", \"test_maps.c\", 0xB6u, \"test_hashmap_percpu\");\n}\nv9 = v8;\n}\nif ( *__errno_location() != 2 )\n__assert_fail(\"errno == ENOENT\", \"test_maps.c\", 0xBAu, \"test_hashmap_percpu\");\nv9 = 1LL;\nif ( (unsigned int)sub_4012C0(fd, (__int64)&v9, (__int64)v11, 2LL) )\n__assert_fail(\"bpf_map_update(fd, &key, value, BPF_EXIST) == 0\", \"test_maps.c\", 0xBEu, \"test_hashmap_percpu\");\nv9 = 1LL;\nif ( (unsigned int)sub_40134D(fd, (__int64)&v9) )\n__assert_fail(\"bpf_map_delete(fd, &key) == 0\", \"test_maps.c\", 0xC2u, \"test_hashmap_percpu\");\nv9 = 2LL;\nif ( (unsigned int)sub_40134D(fd, (__int64)&v9) )\n__assert_fail(\"bpf_map_delete(fd, &key) == 0\", \"test_maps.c\", 0xC4u, \"test_hashmap_percpu\");\nif ( (unsigned int)sub_40134D(fd, (__int64)&v9) != -1 || *__errno_location() != 2 )\n__assert_fail(\"bpf_map_delete(fd, &key) == -1 && errno == ENOENT\", \"test_maps.c\", 0xC5u, \"test_hashmap_percpu\");\nv9 = 0LL;\nif ( (unsigned int)sub_4013BA(fd, (__int64)&v9, (__int64)&v8) != -1 || *__errno_location() != 2 )\n__assert_fail(\n\"bpf_map_next_key(fd, &key, &next_key) == -1 && errno == ENOENT\",\n\"test_maps.c\",\n0xC9u,\n\"test_hashmap_percpu\");\nreturn close(fd);\n}\n\n\n\nQ:[a1,a2,v6,v7,v8,v9,v11,v13,v14,sub_401ADB,sub_4014B9,sub_40143B,sub_4012C0,sub_40123F,sub_40134D,sub_4013BA,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'task', 'a2': 'data', 'v6': 'dataa', 'v7': 'taska', 'v8': 'next_key', 'v9': 'key', 'v11': 'p_value', 'v13': 'nr_cpus', 'v14': 'expected_key_mask', 'sub_401ADB': 'test_hashmap_percpu', 'sub_4014B9': 'bpf_num_possible_cpus', 'sub_40143B': 'bpf_map_create', 'sub_4012C0': 'bpf_map_update', 'sub_40123F': 'bpf_map_lookup', 'sub_40134D': 'bpf_map_delete', 'sub_4013BA': 'bpf_map_next_key'}"}
histogram_insert_data_point
2b0844fa722e08703e4bc3bd23ccfce69b732cb51cf14e9c8b52e439a282d1b6
aerospike
act
NA
void histogram_insert_data_point(histogram* h, uint64_t delta_ns) { uint64_t delta_t = delta_ns / h->time_div; int bucket = 0; if (delta_t != 0) { bucket = msb(delta_t); } __atomic_fetch_add(&h->counts[bucket], 1, __ATOMIC_RELAXED); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4030EE", "function_addr": 4206830, "binary_name": "2b0844fa722e08703e4bc3bd23ccfce69b732cb51cf14e9c8b52e439a282d1b6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov rax, [rbp+var_18]"], [6, "mov eax, [rax]"], [7, "mov ecx, eax"], [8, "mov rax, [rbp+var_20]"], [9, "mov edx, 0"], [10, "div rcx"], [11, "mov [rbp+var_10], rax"], [12, "mov [rbp+var_4], 0"], [13, "cmp [rbp+var_10], 0"], [14, "jz short loc_403133"], [15, "mov rax, [rbp+var_10]"], [16, "mov rdi, rax"], [17, "call sub_403153"], [18, "mov [rbp+var_4], eax"], [19, "mov eax, [rbp+var_4]"], [20, "cdqe"], [21, "lea rdx, ds:0[rax*8]"], [22, "mov rax, [rbp+var_18]"], [23, "add rax, rdx"], [24, "add rax, 8"], [25, "lock add qword ptr [rax], 1"], [26, "nop"], [27, "leave"], [28, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 6], [8, 4], [10, 7], [11, 8], [13, 11], [14, 13], [15, 11], [16, 15], [18, 17], [19, 12], [19, 18], [21, 9], [22, 3], [23, 22], [23, 21], [24, 23], [28, 24]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/2b0844fa722e08703e4bc3bd23ccfce69b732cb51cf14e9c8b52e439a282d1b6_2b0844fa722e08703e4bc3bd23ccfce69b732cb51cf14e9c8b52e439a282d1b6.jsonl.gz", "strip_func_name": "sub_4030EE", "query": "\n\n\nvolatile signed __int64 *__fastcall sub_4030EE(unsigned int *a1, unsigned __int64 a2)\n{\nvolatile signed __int64 *result; // rax\nunsigned __int64 v3; // [rsp+10h] [rbp-10h]\nint v4; // [rsp+1Ch] [rbp-4h]\n\nv3 = a2 / *a1;\nv4 = 0;\nif ( v3 )\nv4 = sub_403153(v3, a2, a2 % *a1);\nresult = (volatile signed __int64 *)&a1[2 * v4 + 2];\n_InterlockedAdd64(result, 1uLL);\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,v4,sub_4030EE,sub_403153,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'h', 'a2': 'delta_ns', 'v3': 'delta_t', 'v4': 'bucket', 'sub_4030EE': 'histogram_insert_data_point', 'sub_403153': 'msb'}"}
GenerateNal
44e8aed08fe933b793e356a871e8f31cdd3a534e9dca1fb63610d519aee2b0ea
Xilinx
vcu-ctrl-sw
NA
static void GenerateNal(IRbspWriter* writer, AL_TBitStreamLite* bitstream, AL_NalUnit* nal, AL_TStreamMetaData* pMeta, uint32_t uFlags) { int start = getBytesOffset(bitstream); int size = WriteNal(writer, bitstream, nal); /* we should always be able to write the configuration nals as we reserved * enough space for them */ assert(size >= 0); AddSection(pMeta, start, size, uFlags); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_483F6B", "function_addr": 4734827, "binary_name": "44e8aed08fe933b793e356a871e8f31cdd3a534e9dca1fb63610d519aee2b0ea.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 40h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov [rbp+var_30], rcx"], [7, "mov [rbp+var_34], r8d"], [8, "mov rax, [rbp+var_20]"], [9, "mov rdi, rax"], [10, "call sub_483E11"], [11, "mov [rbp+var_4], eax"], [12, "mov rdx, [rbp+var_28]"], [13, "mov rcx, [rbp+var_20]"], [14, "mov rax, [rbp+var_18]"], [15, "mov rsi, rcx"], [16, "mov rdi, rax"], [17, "call sub_483EA0"], [18, "mov [rbp+var_8], eax"], [19, "cmp [rbp+var_8], 0"], [20, "jns short loc_483FD5"], [21, "lea rcx, aGeneratenal"], [22, "mov edx, 5Eh "], [23, "lea rsi, aLibEncodeSecti"], [24, "lea rdi, aSize0"], [25, "call ___assert_fail"], [26, "mov edx, [rbp+var_8]"], [27, "mov esi, [rbp+var_4]"], [28, "mov ecx, [rbp+var_34]"], [29, "mov rax, [rbp+var_30]"], [30, "mov rdi, rax"], [31, "call sub_483DBC"], [32, "nop"], [33, "leave"], [34, "retn"]], "data_dep": [[8, 4], [9, 8], [11, 10], [12, 5], [13, 4], [14, 3], [15, 13], [16, 14], [18, 17], [19, 18], [20, 19], [21, 13], [23, 15], [24, 16], [26, 18], [27, 11], [28, 7], [29, 6], [30, 29], [34, 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/44e8aed08fe933b793e356a871e8f31cdd3a534e9dca1fb63610d519aee2b0ea_44e8aed08fe933b793e356a871e8f31cdd3a534e9dca1fb63610d519aee2b0ea.jsonl.gz", "strip_func_name": "sub_483F6B", "query": "\n\n\n__int64 __fastcall sub_483F6B(__int64 a1, __int64 a2, __int64 a3, __int64 a4, unsigned int a5)\n{\nint v9; // [rsp+38h] [rbp-8h]\nint v10; // [rsp+3Ch] [rbp-4h]\n\nv10 = sub_483E11(a2);\nv9 = sub_483EA0(a1, a2, a3);\nif ( v9 < 0 )\n__assert_fail(\"size >= 0\", \"lib_encode/Sections.c\", 0x5Eu, \"GenerateNal\");\nreturn sub_483DBC(a4, v10, v9, a5);\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,v9,v10,sub_483F6B,sub_483E11,sub_483EA0,sub_483DBC,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'nal', 'a4': 'pMeta', 'a1': 'writer', 'a2': 'bitstream', 'a5': 'uFlags', 'v9': 'size', 'v10': 'start', 'sub_483F6B': 'GenerateNal', 'sub_483E11': 'getBytesOffset', 'sub_483EA0': 'WriteNal', 'sub_483DBC': 'AddSection'}"}
pj_gettimeofday
a3e4f2ea093fcaf3e709fc4fd522bb0a36accac0c86ea61615c7de8c1eafc2c8
AonCyberLabs
D-Modem
NA
PJ_DEF(pj_status_t) pj_gettimeofday(pj_time_val *p_tv) { struct timeval the_time; int rc; PJ_CHECK_STACK(); rc = gettimeofday(&the_time, NULL); if (rc != 0) return PJ_RETURN_OS_ERROR(pj_get_native_os_error()); p_tv->sec = the_time.tv_sec; p_tv->msec = the_time.tv_usec / 1000; return PJ_SUCCESS; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_475675", "function_addr": 4675189, "binary_name": "a3e4f2ea093fcaf3e709fc4fd522bb0a36accac0c86ea61615c7de8c1eafc2c8.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_28], rdi"], [4, "lea rax, [rbp+tv]"], [5, "mov esi, 0"], [6, "mov rdi, rax"], [7, "call _gettimeofday"], [8, "mov [rbp+var_4], eax"], [9, "cmp [rbp+var_4], 0"], [10, "jz short loc_4756BB"], [11, "call ___errno_location"], [12, "mov eax, [rax]"], [13, "test eax, eax"], [14, "jz short loc_4756B4"], [15, "call ___errno_location"], [16, "mov eax, [rax]"], [17, "add eax, 1D4C0h"], [18, "jmp short locret_4756F8"], [19, "mov eax, 0FFFFFFFFh"], [20, "jmp short locret_4756F8"], [21, "mov rdx, [rbp+tv.tv_sec]"], [22, "mov rax, [rbp+var_28]"], [23, "mov [rax], rdx"], [24, "mov rcx, [rbp+tv.tv_usec]"], [25, "mov rdx, 20C49BA5E353F7CFh"], [26, "mov rax, rcx"], [27, "imul rdx"], [28, "mov rax, rdx"], [29, "sar rax, 7"], [30, "sar rcx, 3Fh"], [31, "sub rax, rcx"], [32, "mov rdx, rax"], [33, "mov rax, [rbp+var_28]"], [34, "mov [rax+8], rdx"], [35, "mov eax, 0"], [36, "leave"], [37, "retn"]], "data_dep": [[6, 4], [8, 7], [9, 8], [10, 9], [12, 11], [13, 12], [14, 13], [16, 15], [17, 16], [22, 3], [23, 22], [23, 21], [26, 24], [27, 25], [28, 27], [29, 28], [30, 24], [31, 29], [31, 30], [32, 31], [33, 3], [34, 33], [34, 32], [37, 17], [37, 35], [37, 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/a3e4f2ea093fcaf3e709fc4fd522bb0a36accac0c86ea61615c7de8c1eafc2c8_a3e4f2ea093fcaf3e709fc4fd522bb0a36accac0c86ea61615c7de8c1eafc2c8.jsonl.gz", "strip_func_name": "sub_475675", "query": "\n\n\n__int64 __fastcall sub_475675(__time_t *a1)\n{\n__int64 result; // rax\nstruct timeval tv; // [rsp+10h] [rbp-20h] BYREF\n\nif ( gettimeofday(&tv, 0LL) )\n{\nif ( *__errno_location() )\nresult = (unsigned int)(*__errno_location() + 120000);\nelse\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\n*a1 = tv.tv_sec;\na1[1] = tv.tv_usec / 1000;\nresult = 0LL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,tv,sub_475675,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'p_tv', 'tv': 'the_time', 'sub_475675': 'pj_gettimeofday'}"}
tms9918a_irq_pending
3deaa26b246f8964cefc554f8e45c3fa1927a4b1f93f252cc3bdaf69e1399b61
EtchedPixels
EmulatorKit
NA
int tms9918a_irq_pending(struct tms9918a *vdp) { if (vdp->reg[1] & 0x20) return vdp->status & 0x80; return 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4156FA", "function_addr": 4282106, "binary_name": "3deaa26b246f8964cefc554f8e45c3fa1927a4b1f93f252cc3bdaf69e1399b61.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov rax, [rbp+var_8]"], [4, "movzx eax, byte ptr [rax+1]"], [5, "movzx eax, al"], [6, "and eax, 20h"], [7, "test eax, eax"], [8, "jz short loc_415726"], [9, "mov rax, [rbp+var_8]"], [10, "movzx eax, byte ptr [rax+8]"], [11, "movzx eax, al"], [12, "and eax, 80h"], [13, "jmp short loc_41572B"], [14, "mov eax, 0"], [15, "pop rbp"], [16, "retn"]], "data_dep": [[3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 2], [10, 9], [11, 10], [12, 11], [15, 0], [16, 12], [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/3deaa26b246f8964cefc554f8e45c3fa1927a4b1f93f252cc3bdaf69e1399b61_3deaa26b246f8964cefc554f8e45c3fa1927a4b1f93f252cc3bdaf69e1399b61.jsonl.gz", "strip_func_name": "sub_4156FA", "query": "\n\n\n__int64 __fastcall sub_4156FA(__int64 a1)\n{\n__int64 result; // rax\n\nif ( (*(_BYTE *)(a1 + 1) & 0x20) != 0 )\nresult = *(_BYTE *)(a1 + 8) & 0x80;\nelse\nresult = 0LL;\nreturn result;\n}\n\n\n\nQ:[a1,sub_4156FA,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'vdp', 'sub_4156FA': 'tms9918a_irq_pending'}"}
add_cigar
5ea9f9c54079c7f4b8eaa0e7140af6562134c5adc9cce337d10805b6c5752ec2
lh3
bwa
NA
static inline void add_cigar(const mem_opt_t *opt, mem_aln_t *p, kstring_t *str, int which) { int i; if (p->n_cigar) { // aligned for (i = 0; i < p->n_cigar; ++i) { int c = p->cigar[i]&0xf; if (!(opt->flag&MEM_F_SOFTCLIP) && !p->is_alt && (c == 3 || c == 4)) c = which? 4 : 3; // use hard clipping for supplementary alignments kputw(p->cigar[i]>>4, str); kputc("MIDSH"[c], str); } } else kputc('*', str); // having a coordinate but unaligned (e.g. when copy_mate is true) }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_44F63A", "function_addr": 4519482, "binary_name": "5ea9f9c54079c7f4b8eaa0e7140af6562134c5adc9cce337d10805b6c5752ec2.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_20], rsi"], [5, "mov [rbp+var_28], rdx"], [6, "mov [rbp+var_2C], ecx"], [7, "mov rax, [rbp+var_20]"], [8, "mov eax, [rax+14h]"], [9, "test eax, eax"], [10, "jz loc_44F724"], [11, "mov [rbp+var_4], 0"], [12, "jmp loc_44F712"], [13, "mov rax, [rbp+var_20]"], [14, "mov rdx, [rax+18h]"], [15, "mov eax, [rbp+var_4]"], [16, "cdqe"], [17, "shl rax, 2"], [18, "add rax, rdx"], [19, "mov eax, [rax]"], [20, "and eax, 0Fh"], [21, "mov [rbp+var_8], eax"], [22, "mov rax, [rbp+var_18]"], [23, "mov eax, [rax+3Ch]"], [24, "and eax, 200h"], [25, "test eax, eax"], [26, "jnz short loc_44F6C8"], [27, "mov rax, [rbp+var_20]"], [28, "movzx eax, byte ptr [rax+10h]"], [29, "and eax, 2"], [30, "test al, al"], [31, "jnz short loc_44F6C8"], [32, "cmp [rbp+var_8], 3"], [33, "jz short loc_44F6B3"], [34, "cmp [rbp+var_8], 4"], [35, "jnz short loc_44F6C8"], [36, "cmp [rbp+var_2C], 0"], [37, "jz short loc_44F6C0"], [38, "mov eax, 4"], [39, "jmp short loc_44F6C5"], [40, "mov eax, 3"], [41, "mov [rbp+var_8], eax"], [42, "mov rax, [rbp+var_20]"], [43, "mov rdx, [rax+18h]"], [44, "mov eax, [rbp+var_4]"], [45, "cdqe"], [46, "shl rax, 2"], [47, "add rax, rdx"], [48, "mov eax, [rax]"], [49, "shr eax, 4"], [50, "mov edx, eax"], [51, "mov rax, [rbp+var_28]"], [52, "mov rsi, rax"], [53, "mov edi, edx"], [54, "call sub_439D5B"], [55, "mov eax, [rbp+var_8]"], [56, "cdqe"], [57, "movzx eax, ds:byte_469C5B[rax]"], [58, "movsx eax, al"], [59, "mov rdx, [rbp+var_28]"], [60, "mov rsi, rdx"], [61, "mov edi, eax"], [62, "call sub_439BEF"], [63, "add [rbp+var_4], 1"], [64, "mov rax, [rbp+var_20]"], [65, "mov eax, [rax+14h]"], [66, "cmp [rbp+var_4], eax"], [67, "jl loc_44F66C"], [68, "jmp short loc_44F735"], [69, "mov rax, [rbp+var_28]"], [70, "mov rsi, rax"], [71, "mov edi, 2Ah "], [72, "call sub_439BEF"], [73, "nop"], [74, "leave"], [75, "retn"]], "data_dep": [[7, 4], [8, 7], [9, 8], [10, 9], [13, 4], [14, 13], [15, 63], [15, 11], [17, 15], [18, 17], [18, 14], [19, 18], [20, 19], [21, 20], [22, 3], [23, 22], [24, 23], [25, 24], [26, 25], [27, 4], [28, 27], [29, 28], [30, 29], [31, 30], [32, 21], [33, 32], [34, 21], [35, 34], [36, 6], [37, 36], [41, 40], [41, 38], [42, 4], [43, 42], [44, 63], [44, 11], [46, 44], [47, 46], [47, 43], [48, 47], [49, 48], [50, 49], [51, 5], [52, 51], [53, 50], [55, 41], [55, 21], [58, 57], [59, 5], [60, 59], [61, 58], [63, 63], [63, 11], [64, 4], [65, 64], [66, 63], [66, 11], [66, 65], [67, 66], [69, 5], [70, 69], [75, 72], [75, 65]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/5ea9f9c54079c7f4b8eaa0e7140af6562134c5adc9cce337d10805b6c5752ec2_5ea9f9c54079c7f4b8eaa0e7140af6562134c5adc9cce337d10805b6c5752ec2.jsonl.gz", "strip_func_name": "sub_44F63A", "query": "\n\n\n__int64 __fastcall sub_44F63A(__int64 a1, __int64 a2, _QWORD *a3, int a4)\n{\nint v4; // eax\n__int64 result; // rax\nint v8; // [rsp+28h] [rbp-8h]\nint i; // [rsp+2Ch] [rbp-4h]\n\nif ( !*(_DWORD *)(a2 + 20) )\nreturn sub_439BEF(0x2Au, a3);\nfor ( i = 0; ; ++i )\n{\nresult = *(unsigned int *)(a2 + 20);\nif ( i >= (int)result )\nbreak;\nv8 = *(_DWORD *)(*(_QWORD *)(a2 + 24) + 4LL * i) & 0xF;\nif ( (*(_DWORD *)(a1 + 60) & 0x200) == 0 && (*(_BYTE *)(a2 + 16) & 2) == 0 && (v8 == 3 || v8 == 4) )\n{\nif ( a4 )\nv4 = 4;\nelse\nv4 = 3;\nv8 = v4;\n}\nsub_439D5B(*(_DWORD *)(*(_QWORD *)(a2 + 24) + 4LL * i) >> 4, a3);\nsub_439BEF(byte_469C5B[v8], a3);\n}\nreturn result;\n}\n\n\n\nQ:[a3,a4,a1,a2,v8,sub_44F63A,sub_439BEF,sub_439D5B,]\nAssistant: ", "hints": "[]", "response": "{'a3': 'str', 'a4': 'which', 'a1': 'opt', 'a2': 'p', 'v8': 'c', 'sub_44F63A': 'add_cigar', 'sub_439BEF': 'kputc_2', 'sub_439D5B': 'kputw_0'}"}
pj_log_1
cf1695820213fbf6b72d0a2a2c8f7406ba3da1515cfec93bb0899b8d9d8f038e
AonCyberLabs
D-Modem
NA
PJ_DEF(void) pj_log_1(const char *obj, const char *format, ...) { va_list arg; va_start(arg, format); pj_log(obj, 1, format, arg); va_end(arg); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_46D189", "function_addr": 4641161, "binary_name": "cf1695820213fbf6b72d0a2a2c8f7406ba3da1515cfec93bb0899b8d9d8f038e.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_46D1E2"], [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_C8], 10h"], [20, "mov [rbp+var_C4], 30h "], [21, "lea rax, [rbp+arg_0]"], [22, "mov [rbp+var_C0], rax"], [23, "lea rax, [rbp+var_B0]"], [24, "mov [rbp+var_B8], rax"], [25, "lea rcx, [rbp+var_C8]"], [26, "mov rdx, [rbp+var_E0]"], [27, "mov rax, [rbp+var_D8]"], [28, "mov esi, 1"], [29, "mov rdi, rax"], [30, "call sub_46CB1A"], [31, "nop"], [32, "leave"], [33, "retn"]], "data_dep": [[10, 9], [21, 9], [22, 21], [23, 21], [24, 23], [25, 19], [26, 4], [27, 3], [29, 27], [33, 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/cf1695820213fbf6b72d0a2a2c8f7406ba3da1515cfec93bb0899b8d9d8f038e_cf1695820213fbf6b72d0a2a2c8f7406ba3da1515cfec93bb0899b8d9d8f038e.jsonl.gz", "strip_func_name": "sub_46D189", "query": "\n\n\n__int64 sub_46D189(const char *a1, const char *a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, ...)\n{\ngcc_va_list va; // [rsp+18h] [rbp-C8h] 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_46CB1A(a1, 1, a2, va);\n}\n\n\n\nQ:[a1,a2,va,sub_46D189,sub_46CB1A,]\nAssistant: ", "hints": "[]", "response": "{'a1': 'obj', 'a2': 'format', 'va': 'arg', 'sub_46D189': 'pj_log_1', 'sub_46CB1A': 'pj_log'}"}
bdf_ResetMax
4bd07b1fddb917ded3dbeed51101a5766be187676212ea81a3371ac4e3a89d44
olikraus
u8glib
NA
void bdf_ResetMax(void) { bdf_char_max_width = 0; bdf_char_max_height = 0; bdf_char_max_x = 0; bdf_char_max_y = 0; bdf_delta_max_x = 0; bdf_delta_max_y = 0; bdf_char_min_x = 0; bdf_char_min_y = 0; bdf_delta_min_x = 0; bdf_delta_min_y = 0; bdf_glyph_data_max_len = 0; bdf_char_max_ascent = 0; bdf_char_xascent = 0; bdf_char_xdescent = 0; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4018EB", "function_addr": 4200683, "binary_name": "4bd07b1fddb917ded3dbeed51101a5766be187676212ea81a3371ac4e3a89d44.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov cs:dword_42486C, 0"], [3, "mov cs:dword_424884, 0"], [4, "mov cs:dword_42488C, 0"], [5, "mov cs:dword_424898, 0"], [6, "mov cs:dword_4248A4, 0"], [7, "mov cs:dword_4248B0, 0"], [8, "mov cs:dword_424890, 0"], [9, "mov cs:dword_42489C, 0"], [10, "mov cs:dword_4248A8, 0"], [11, "mov cs:dword_4248B4, 0"], [12, "mov cs:dword_4248BC, 0"], [13, "mov cs:dword_424880, 0"], [14, "mov cs:dword_424878, 0"], [15, "mov cs:dword_42487C, 0"], [16, "nop"], [17, "pop rbp"], [18, "retn"]], "data_dep": [[17, 0]]}
{"prompt": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n Human: Help user generate meaningful names for variables and functions in the following code snippet.\n\n\n", "prog_name": "gh-dataset-dirty/bins/4bd07b1fddb917ded3dbeed51101a5766be187676212ea81a3371ac4e3a89d44_4bd07b1fddb917ded3dbeed51101a5766be187676212ea81a3371ac4e3a89d44.jsonl.gz", "strip_func_name": "sub_4018EB", "query": "\n\n\nvoid sub_4018EB()\n{\ndword_42486C = 0;\ndword_424884 = 0;\ndword_42488C = 0;\ndword_424898 = 0;\ndword_4248A4 = 0;\ndword_4248B0 = 0;\ndword_424890 = 0;\ndword_42489C = 0;\ndword_4248A8 = 0;\ndword_4248B4 = 0;\ndword_4248BC = 0;\ndword_424880 = 0;\ndword_424878 = 0;\ndword_42487C = 0;\n}\n\n\n\nQ:[sub_4018EB,]\nAssistant: ", "hints": "[]", "response": "{'sub_4018EB': 'bdf_ResetMax'}"}