function_name
stringlengths
3
34
binary_name
stringlengths
64
64
author_name
stringlengths
2
36
project_name
stringlengths
2
48
opt
stringclasses
1 value
src
stringlengths
82
18.8k
dbg
stringclasses
1 value
codeart
stringlengths
461
87.8k
lmpa
stringlengths
492
9.74k
retrieved_index
sequencelengths
2
2
hsort
dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b
lavabit
pahoehoe
NA
void hsort(void *base, size_t n, size_t size, hsort_cmp_t *cmp) { register char *p, *q, *base0, *hi; register unsigned int gap, g; if (n < 2) return; base0 = (char *)base - size; /* set up address of h[0] */ /* * The gap is the distance, in bytes, between h[0] and h[i], * for some i. It is also the distance between h[i] and h[2*i]; * that is, the distance between a node and its left child. * The initial node of interest is h[n/2] (the rightmost * interior node), so gap is set accordingly. The following is * the only multiplication needed. */ gap = (n >> 1) * size; /* initial gap is n/2*size */ hi = base0 + gap + gap; /* calculate address of h[n] */ if (n & 1) hi += size; /* watch out for odd arrays */ /* * Phase 1: Construct heap from random data. * * For i = n/2 downto 2, ensure h[i] is greater than its * children h[2*i] and h[2*i+1]. By decreasing 'gap' at each * iteration, we move down the heap towards h[2]. The final step * of making h[1] the maximum value is done in the next phase. */ for ( ; gap != size; gap -= size) { /* fixheap(base0, size, cmp, gap, hi) */ for (p = base0 + (g = gap); (q = p + g) <= hi; p = q) { g += g; /* double gap for next level */ /* * Find greater of left and right children. */ if (q != hi && (*cmp)(q + size, q) > 0) { q += size; /* choose right child */ g += size; /* follow right subtree */ } /* * Compare with parent. */ if ((*cmp)(p, q) >= 0) break; /* order is correct */ swap(p, q, size); /* swap parent and child */ } } /* * Phase 2: Each iteration makes the first item in the * array the maximum, then swaps it with the last item, which * is its correct position. The size of the heap is decreased * each iteration. The gap is always "size", as we are interested * in the heap starting at h[1]. */ for ( ; hi != base; hi -= size) { /* fixheap(base0, size, cmp, gap (== size), hi) */ p = (char *)base; /* == base0 + size */ for (g = size; (q = p + g) <= hi; p = q) { g += g; if (q != hi && (*cmp)(q + size, q) > 0) { q += size; g += size; } if ((*cmp)(p, q) >= 0) break; swap(p, q, size); } swap((char *)base, hi, size); /* move largest item to end */ } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_423920", "function_addr": 4340000, "binary_name": "dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b.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, 38h"], [8, "mov [rbp+var_38], rdi"], [9, "mov [rbp+var_40], rsi"], [10, "mov [rbp+var_48], rdx"], [11, "mov [rbp+var_50], rcx"], [12, "cmp [rbp+var_40], 1"], [13, "jbe loc_423AC6"], [14, "mov rax, [rbp+var_48]"], [15, "neg rax"], [16, "mov rdx, rax"], [17, "mov rax, [rbp+var_38]"], [18, "lea rcx, [rdx+rax]"], [19, "mov [rbp+var_58], rcx"], [20, "mov rax, [rbp+var_40]"], [21, "shr rax, 1"], [22, "mov edx, eax"], [23, "mov rax, [rbp+var_48]"], [24, "imul edx, eax"], [25, "mov r15d, edx"], [26, "mov eax, r15d"], [27, "add rax, rax"], [28, "lea r12, [rcx+rax]"], [29, "mov rax, [rbp+var_40]"], [30, "and eax, 1"], [31, "test rax, rax"], [32, "jz loc_423A18"], [33, "mov rax, [rbp+var_48]"], [34, "add rax, r12"], [35, "mov r12, rax"], [36, "jmp short loc_423A18"], [37, "mov r14d, r15d"], [38, "mov eax, r14d"], [39, "mov rcx, [rbp+var_58]"], [40, "lea r13, [rcx+rax]"], [41, "jmp short loc_423A01"], [42, "add r14d, r14d"], [43, "cmp rbx, r12"], [44, "jz short loc_4239DC"], [45, "mov rax, [rbp+var_48]"], [46, "lea rdx, [rbx+rax]"], [47, "mov rax, [rbp+var_50]"], [48, "mov rsi, rbx"], [49, "mov rdi, rdx"], [50, "call rax"], [51, "test eax, eax"], [52, "jle short loc_4239DC"], [53, "mov rax, [rbp+var_48]"], [54, "add rax, rbx"], [55, "mov rbx, rax"], [56, "mov rax, [rbp+var_48]"], [57, "add r14d, eax"], [58, "mov rax, [rbp+var_50]"], [59, "mov rsi, rbx"], [60, "mov rdi, r13"], [61, "call rax"], [62, "test eax, eax"], [63, "jns short loc_423A10"], [64, "mov rax, [rbp+var_48]"], [65, "mov rdx, rax"], [66, "mov rsi, rbx"], [67, "mov rdi, r13"], [68, "call sub_4238E6"], [69, "mov r13, rbx"], [70, "mov eax, r14d"], [71, "lea rbx, [r13+rax+0]"], [72, "cmp rbx, r12"], [73, "jbe short loc_4239AB"], [74, "jmp short loc_423A11"], [75, "nop"], [76, "mov rax, [rbp+var_48]"], [77, "sub r15d, eax"], [78, "mov eax, r15d"], [79, "cmp [rbp+var_48], rax"], [80, "jnz loc_42399B"], [81, "jmp loc_423ABA"], [82, "mov r13, [rbp+var_38]"], [83, "mov rax, [rbp+var_48]"], [84, "mov r14d, eax"], [85, "jmp short loc_423A8D"], [86, "add r14d, r14d"], [87, "cmp rbx, r12"], [88, "jz short loc_423A68"], [89, "mov rax, [rbp+var_48]"], [90, "lea rdx, [rbx+rax]"], [91, "mov rax, [rbp+var_50]"], [92, "mov rsi, rbx"], [93, "mov rdi, rdx"], [94, "call rax"], [95, "test eax, eax"], [96, "jle short loc_423A68"], [97, "mov rax, [rbp+var_48]"], [98, "add rax, rbx"], [99, "mov rbx, rax"], [100, "mov rax, [rbp+var_48]"], [101, "add r14d, eax"], [102, "mov rax, [rbp+var_50]"], [103, "mov rsi, rbx"], [104, "mov rdi, r13"], [105, "call rax"], [106, "test eax, eax"], [107, "jns short loc_423A9C"], [108, "mov rax, [rbp+var_48]"], [109, "mov rdx, rax"], [110, "mov rsi, rbx"], [111, "mov rdi, r13"], [112, "call sub_4238E6"], [113, "mov r13, rbx"], [114, "mov eax, r14d"], [115, "lea rbx, [r13+rax+0]"], [116, "cmp rbx, r12"], [117, "jbe short loc_423A37"], [118, "jmp short loc_423A9D"], [119, "nop"], [120, "mov rdx, [rbp+var_48]"], [121, "mov rax, [rbp+var_38]"], [122, "mov rsi, r12"], [123, "mov rdi, rax"], [124, "call sub_4238E6"], [125, "mov rax, [rbp+var_48]"], [126, "neg rax"], [127, "add r12, rax"], [128, "cmp r12, [rbp+var_38]"], [129, "jnz loc_423A2A"], [130, "jmp short loc_423AC7"], [131, "nop"], [132, "add rsp, 38h"], [133, "pop rbx"], [134, "pop r12"], [135, "pop r13"], [136, "pop r14"], [137, "pop r15"], [138, "pop rbp"], [139, "retn"]], "data_dep": [[12, 9], [13, 12], [14, 10], [15, 14], [16, 15], [17, 8], [18, 17], [19, 18], [20, 9], [21, 20], [22, 21], [23, 10], [24, 23], [24, 22], [25, 24], [26, 25], [27, 26], [28, 27], [29, 9], [30, 29], [31, 30], [32, 31], [33, 10], [34, 28], [34, 33], [35, 34], [37, 25], [37, 77], [38, 37], [39, 19], [40, 38], [40, 40], [40, 69], [42, 57], [42, 42], [42, 37], [43, 71], [43, 35], [43, 28], [44, 43], [45, 10], [46, 45], [46, 65], [46, 24], [46, 46], [47, 11], [48, 71], [49, 46], [50, 47], [51, 50], [52, 51], [53, 10], [54, 53], [54, 71], [55, 54], [56, 10], [57, 56], [57, 42], [58, 11], [59, 55], [59, 71], [60, 69], [60, 40], [61, 58], [62, 61], [63, 62], [64, 10], [65, 64], [66, 71], [66, 55], [67, 40], [67, 69], [69, 71], [69, 55], [70, 57], [70, 42], [70, 37], [71, 71], [71, 55], [71, 70], [72, 35], [72, 28], [72, 71], [73, 72], [76, 10], [77, 76], [77, 25], [77, 77], [78, 77], [78, 25], [79, 10], [79, 78], [80, 79], [82, 8], [83, 10], [84, 83], [86, 101], [86, 84], [86, 86], [87, 127], [87, 115], [87, 35], [87, 28], [88, 87], [89, 10], [90, 24], [90, 46], [90, 89], [90, 109], [90, 120], [90, 65], [91, 11], [92, 115], [93, 90], [94, 91], [95, 94], [96, 95], [97, 10], [98, 97], [98, 115], [99, 98], [100, 10], [101, 86], [101, 100], [102, 11], [103, 115], [103, 99], [104, 82], [104, 113], [105, 102], [106, 105], [107, 106], [108, 10], [109, 108], [110, 115], [110, 99], [111, 82], [111, 113], [113, 99], [113, 115], [114, 101], [114, 84], [114, 86], [115, 71], [115, 55], [115, 114], [115, 115], [115, 99], [116, 127], [116, 115], [116, 35], [116, 28], [117, 116], [120, 10], [121, 8], [122, 35], [122, 28], [122, 127], [123, 121], [125, 10], [126, 125], [127, 127], [127, 35], [127, 126], [127, 28], [128, 35], [128, 28], [128, 8], [128, 127], [129, 128], [132, 7], [133, 6], [134, 5], [135, 4], [136, 3], [137, 2], [138, 0], [139, 126], [139, 78]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b_dbef1d827ccd2a42e8941d50152f102df28295732bfb69acb1ef6314d264873b.jsonl.gz", "strip_func_name": "sub_423920", "query": "\n\n\nvoid __fastcall sub_423920(char *a1, unsigned __int64 a2, __int64 a3, int (__fastcall *a4)(char *, char *))\n{\nunsigned int v4; // er15\nchar *v5; // r12\nunsigned int v6; // er14\nchar *i; // r13\nchar *v8; // rbx\nchar *v9; // r13\nint v10; // er14\nchar *v11; // rbx\n\nif ( a2 > 1 )\n{\nv4 = a3 * (a2 >> 1);\nv5 = &a1[2 * v4 - a3];\nif ( (a2 & 1) != 0 )\nv5 = &a1[2 * (unsigned int)a3 * (unsigned int)(a2 >> 1)];\nwhile ( a3 != v4 )\n{\nv6 = v4;\nfor ( i = &a1[v4 - a3]; ; i = v8 )\n{\nv8 = &i[v6];\nif ( v8 > v5 )\nbreak;\nv6 *= 2;\nif ( v8 != v5 && a4(&v8[a3], v8) > 0 )\n{\nv8 += a3;\nv6 += a3;\n}\nif ( a4(i, v8) >= 0 )\nbreak;\nsub_4238E6(i, v8, a3);\n}\nv4 -= a3;\n}\nwhile ( v5 != a1 )\n{\nv9 = a1;\nv10 = a3;\nwhile ( 1 )\n{\nv11 = &v9[v10];\nif ( v11 > v5 )\nbreak;\nv10 *= 2;\nif ( v11 != v5 && a4(&v11[a3], v11) > 0 )\n{\nv11 += a3;\nv10 += a3;\n}\nif ( a4(v9, v11) >= 0 )\nbreak;\nsub_4238E6(v9, v11, a3);\nv9 = v11;\n}\nsub_4238E6(a1, v5, a3);\nv5 -= a3;\n}\n}\n}\n\n\n\nQ:[a3,a4,a1,a2,sub_423920,sub_4238E6,]", "hints": "[]", "response": "{'a3': 'size', 'a4': 'cmp', 'a1': 'base', 'a2': 'n', 'sub_423920': 'hsort', 'sub_4238E6': 'swap'}"}
[ [ 0.7695409059524536, 0.7328778505325317, 0.7212467193603516, 0.7166948318481445, 0.7110140323638916, 0.6900853514671326, 0.6882831454277039, 0.6878212690353394, 0.6870876550674438, 0.6858653426170349, 0.6833648085594177, 0.6806107759475708, 0.6794067621231079, 0.673912525177002, 0.6726387143135071, 0.6709787845611572, 0.6688427329063416, 0.6651244163513184, 0.6637542843818665, 0.6623186469078064 ], [ 14807, 3764, 92020, 101461, 184336, 39116, 242026, 42984, 49998, 21636, 209787, 233099, 100003, 182485, 113981, 159170, 138235, 129825, 218562, 241629 ] ]
unzReadCurrentFile
3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f
yquake2
yquake2
NA
extern int ZEXPORT unzReadCurrentFile(unzFile file, voidp buf, unsigned len) { int err=UNZ_OK; uInt iRead = 0; unz64_s* s; file_in_zip64_read_info_s* pfile_in_zip_read_info; if (file==NULL) return UNZ_PARAMERROR; s=(unz64_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR; if (pfile_in_zip_read_info->read_buffer == NULL) return UNZ_END_OF_LIST_OF_FILE; if (len==0) return 0; pfile_in_zip_read_info->stream.next_out = (Bytef*)buf; pfile_in_zip_read_info->stream.avail_out = (uInt)len; if ((len>pfile_in_zip_read_info->rest_read_uncompressed) && (!(pfile_in_zip_read_info->raw))) pfile_in_zip_read_info->stream.avail_out = (uInt)pfile_in_zip_read_info->rest_read_uncompressed; if ((len>pfile_in_zip_read_info->rest_read_compressed+ pfile_in_zip_read_info->stream.avail_in) && (pfile_in_zip_read_info->raw)) pfile_in_zip_read_info->stream.avail_out = (uInt)pfile_in_zip_read_info->rest_read_compressed+ pfile_in_zip_read_info->stream.avail_in; while (pfile_in_zip_read_info->stream.avail_out>0) { if ((pfile_in_zip_read_info->stream.avail_in==0) && (pfile_in_zip_read_info->rest_read_compressed>0)) { uInt uReadThis = UNZ_BUFSIZE; if (pfile_in_zip_read_info->rest_read_compressed<uReadThis) uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed; if (uReadThis == 0) return UNZ_EOF; if (ZSEEK64(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, pfile_in_zip_read_info->pos_in_zipfile + pfile_in_zip_read_info->byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (ZREAD64(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, pfile_in_zip_read_info->read_buffer, uReadThis)!=uReadThis) return UNZ_ERRNO; # ifndef NOUNCRYPT if(s->encrypted) { uInt i; for(i=0;i<uReadThis;i++) pfile_in_zip_read_info->read_buffer[i] = zdecode(s->keys,s->pcrc_32_tab, pfile_in_zip_read_info->read_buffer[i]); } # endif pfile_in_zip_read_info->pos_in_zipfile += uReadThis; pfile_in_zip_read_info->rest_read_compressed-=uReadThis; pfile_in_zip_read_info->stream.next_in = (Bytef*)pfile_in_zip_read_info->read_buffer; pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis; } if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw)) { uInt uDoCopy,i ; if ((pfile_in_zip_read_info->stream.avail_in == 0) && (pfile_in_zip_read_info->rest_read_compressed == 0)) return (iRead==0) ? UNZ_EOF : (int)iRead; if (pfile_in_zip_read_info->stream.avail_out < pfile_in_zip_read_info->stream.avail_in) uDoCopy = pfile_in_zip_read_info->stream.avail_out ; else uDoCopy = pfile_in_zip_read_info->stream.avail_in ; for (i=0;i<uDoCopy;i++) *(pfile_in_zip_read_info->stream.next_out+i) = *(pfile_in_zip_read_info->stream.next_in+i); pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uDoCopy; pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32, pfile_in_zip_read_info->stream.next_out, uDoCopy); pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy; pfile_in_zip_read_info->stream.avail_in -= uDoCopy; pfile_in_zip_read_info->stream.avail_out -= uDoCopy; pfile_in_zip_read_info->stream.next_out += uDoCopy; pfile_in_zip_read_info->stream.next_in += uDoCopy; pfile_in_zip_read_info->stream.total_out += uDoCopy; iRead += uDoCopy; } else if (pfile_in_zip_read_info->compression_method==Z_BZIP2ED) { #ifdef HAVE_BZIP2 uLong uTotalOutBefore,uTotalOutAfter; const Bytef *bufBefore; uLong uOutThis; pfile_in_zip_read_info->bstream.next_in = (char*)pfile_in_zip_read_info->stream.next_in; pfile_in_zip_read_info->bstream.avail_in = pfile_in_zip_read_info->stream.avail_in; pfile_in_zip_read_info->bstream.total_in_lo32 = pfile_in_zip_read_info->stream.total_in; pfile_in_zip_read_info->bstream.total_in_hi32 = 0; pfile_in_zip_read_info->bstream.next_out = (char*)pfile_in_zip_read_info->stream.next_out; pfile_in_zip_read_info->bstream.avail_out = pfile_in_zip_read_info->stream.avail_out; pfile_in_zip_read_info->bstream.total_out_lo32 = pfile_in_zip_read_info->stream.total_out; pfile_in_zip_read_info->bstream.total_out_hi32 = 0; uTotalOutBefore = pfile_in_zip_read_info->bstream.total_out_lo32; bufBefore = (const Bytef *)pfile_in_zip_read_info->bstream.next_out; err=BZ2_bzDecompress(&pfile_in_zip_read_info->bstream); uTotalOutAfter = pfile_in_zip_read_info->bstream.total_out_lo32; uOutThis = uTotalOutAfter-uTotalOutBefore; pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis; pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis)); pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis; iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); pfile_in_zip_read_info->stream.next_in = (Bytef*)pfile_in_zip_read_info->bstream.next_in; pfile_in_zip_read_info->stream.avail_in = pfile_in_zip_read_info->bstream.avail_in; pfile_in_zip_read_info->stream.total_in = pfile_in_zip_read_info->bstream.total_in_lo32; pfile_in_zip_read_info->stream.next_out = (Bytef*)pfile_in_zip_read_info->bstream.next_out; pfile_in_zip_read_info->stream.avail_out = pfile_in_zip_read_info->bstream.avail_out; pfile_in_zip_read_info->stream.total_out = pfile_in_zip_read_info->bstream.total_out_lo32; if (err==BZ_STREAM_END) return (iRead==0) ? UNZ_EOF : iRead; if (err!=BZ_OK) break; #endif } // end Z_BZIP2ED else { ZPOS64_T uTotalOutBefore,uTotalOutAfter; const Bytef *bufBefore; ZPOS64_T uOutThis; int flush=Z_SYNC_FLUSH; uTotalOutBefore = pfile_in_zip_read_info->stream.total_out; bufBefore = pfile_in_zip_read_info->stream.next_out; /* if ((pfile_in_zip_read_info->rest_read_uncompressed == pfile_in_zip_read_info->stream.avail_out) && (pfile_in_zip_read_info->rest_read_compressed == 0)) flush = Z_FINISH; */ err=inflate(&pfile_in_zip_read_info->stream,flush); if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL)) err = Z_DATA_ERROR; uTotalOutAfter = pfile_in_zip_read_info->stream.total_out; /* Detect overflow, because z_stream.total_out is uLong (32 bits) */ if (uTotalOutAfter<uTotalOutBefore) uTotalOutAfter += 1LL << 32; /* Add maximum value of uLong + 1 */ uOutThis = uTotalOutAfter-uTotalOutBefore; pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis; pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis)); pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis; iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); if (err==Z_STREAM_END) return (iRead==0) ? UNZ_EOF : (int)iRead; if (err!=Z_OK) break; } } if (err==Z_OK) return (int)iRead; return err; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_49D12F", "function_addr": 4837679, "binary_name": "3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f.elf_extract.pkl\n"}, "code": [[0, "sub rsp, 78h"], [1, "mov [rsp+78h+var_60], rdi"], [2, "mov [rsp+78h+var_68], rsi"], [3, "mov [rsp+78h+var_6C], edx"], [4, "mov [rsp+78h+var_C], 0"], [5, "mov [rsp+78h+var_10], 0"], [6, "cmp [rsp+78h+var_60], 0"], [7, "jnz short loc_49D163"], [8, "mov eax, 0FFFFFF9Ah"], [9, "jmp loc_49D6B2"], [10, "mov rax, [rsp+78h+var_60]"], [11, "mov [rsp+78h+var_28], rax"], [12, "mov rax, [rsp+78h+var_28]"], [13, "mov rax, [rax+140h]"], [14, "mov [rsp+78h+var_30], rax"], [15, "cmp [rsp+78h+var_30], 0"], [16, "jnz short loc_49D190"], [17, "mov eax, 0FFFFFF9Ah"], [18, "jmp loc_49D6B2"], [19, "mov rax, [rsp+78h+var_30]"], [20, "mov rax, [rax]"], [21, "test rax, rax"], [22, "jnz short loc_49D1A7"], [23, "mov eax, 0FFFFFF9Ch"], [24, "jmp loc_49D6B2"], [25, "cmp [rsp+78h+var_6C], 0"], [26, "jnz short loc_49D1B8"], [27, "mov eax, 0"], [28, "jmp loc_49D6B2"], [29, "mov rax, [rsp+78h+var_30]"], [30, "mov rdx, [rsp+78h+var_68]"], [31, "mov [rax+20h], rdx"], [32, "mov rax, [rsp+78h+var_30]"], [33, "mov edx, [rsp+78h+var_6C]"], [34, "mov [rax+28h], edx"], [35, "mov edx, [rsp+78h+var_6C]"], [36, "mov rax, [rsp+78h+var_30]"], [37, "mov rax, [rax+0C0h]"], [38, "cmp rdx, rax"], [39, "jbe short loc_49D20C"], [40, "mov rax, [rsp+78h+var_30]"], [41, "mov eax, [rax+138h]"], [42, "test eax, eax"], [43, "jnz short loc_49D20C"], [44, "mov rax, [rsp+78h+var_30]"], [45, "mov rax, [rax+0C0h]"], [46, "mov edx, eax"], [47, "mov rax, [rsp+78h+var_30]"], [48, "mov [rax+28h], edx"], [49, "mov edx, [rsp+78h+var_6C]"], [50, "mov rax, [rsp+78h+var_30]"], [51, "mov rcx, [rax+0B8h]"], [52, "mov rax, [rsp+78h+var_30]"], [53, "mov eax, [rax+10h]"], [54, "mov eax, eax"], [55, "add rax, rcx"], [56, "cmp rdx, rax"], [57, "jbe loc_49D68E"], [58, "mov rax, [rsp+78h+var_30]"], [59, "mov eax, [rax+138h]"], [60, "test eax, eax"], [61, "jz loc_49D68E"], [62, "mov rax, [rsp+78h+var_30]"], [63, "mov rax, [rax+0B8h]"], [64, "mov edx, eax"], [65, "mov rax, [rsp+78h+var_30]"], [66, "mov eax, [rax+10h]"], [67, "add edx, eax"], [68, "mov rax, [rsp+78h+var_30]"], [69, "mov [rax+28h], edx"], [70, "jmp loc_49D68E"], [71, "mov rax, [rsp+78h+var_30]"], [72, "mov eax, [rax+10h]"], [73, "test eax, eax"], [74, "jnz loc_49D3BA"], [75, "mov rax, [rsp+78h+var_30]"], [76, "mov rax, [rax+0B8h]"], [77, "test rax, rax"], [78, "jz loc_49D3BA"], [79, "mov [rsp+78h+var_14], 4000h"], [80, "mov rax, [rsp+78h+var_30]"], [81, "mov rdx, [rax+0B8h]"], [82, "mov eax, [rsp+78h+var_14]"], [83, "cmp rdx, rax"], [84, "jnb short loc_49D2BC"], [85, "mov rax, [rsp+78h+var_30]"], [86, "mov rax, [rax+0B8h]"], [87, "mov [rsp+78h+var_14], eax"], [88, "cmp [rsp+78h+var_14], 0"], [89, "jnz short loc_49D2CD"], [90, "mov eax, 0"], [91, "jmp loc_49D6B2"], [92, "mov rax, [rsp+78h+var_30]"], [93, "mov rdx, [rax+78h]"], [94, "mov rax, [rsp+78h+var_30]"], [95, "mov rax, [rax+130h]"], [96, "add rdx, rax"], [97, "mov rax, [rsp+78h+var_30]"], [98, "mov rax, [rax+120h]"], [99, "mov rcx, [rsp+78h+var_30]"], [100, "lea rdi, [rcx+0C8h]"], [101, "mov ecx, 0"], [102, "mov rsi, rax"], [103, "call sub_47AF9F"], [104, "test rax, rax"], [105, "jz short loc_49D319"], [106, "mov eax, 0FFFFFFFFh"], [107, "jmp loc_49D6B2"], [108, "mov rax, [rsp+78h+var_30]"], [109, "mov r8, [rax+0D0h]"], [110, "mov ecx, [rsp+78h+var_14]"], [111, "mov rax, [rsp+78h+var_30]"], [112, "mov rdx, [rax]"], [113, "mov rax, [rsp+78h+var_30]"], [114, "mov rsi, [rax+120h]"], [115, "mov rax, [rsp+78h+var_30]"], [116, "mov rax, [rax+100h]"], [117, "mov rdi, rax"], [118, "call r8"], [119, "mov edx, [rsp+78h+var_14]"], [120, "cmp rax, rdx"], [121, "jz short loc_49D362"], [122, "mov eax, 0FFFFFFFFh"], [123, "jmp loc_49D6B2"], [124, "mov rax, [rsp+78h+var_30]"], [125, "mov rdx, [rax+78h]"], [126, "mov eax, [rsp+78h+var_14]"], [127, "add rdx, rax"], [128, "mov rax, [rsp+78h+var_30]"], [129, "mov [rax+78h], rdx"], [130, "mov rax, [rsp+78h+var_30]"], [131, "mov rax, [rax+0B8h]"], [132, "mov ecx, [rsp+78h+var_14]"], [133, "sub rax, rcx"], [134, "mov rdx, rax"], [135, "mov rax, [rsp+78h+var_30]"], [136, "mov [rax+0B8h], rdx"], [137, "mov rax, [rsp+78h+var_30]"], [138, "mov rdx, [rax]"], [139, "mov rax, [rsp+78h+var_30]"], [140, "mov [rax+8], rdx"], [141, "mov rax, [rsp+78h+var_30]"], [142, "mov edx, [rsp+78h+var_14]"], [143, "mov [rax+10h], edx"], [144, "mov rax, [rsp+78h+var_30]"], [145, "mov rax, [rax+128h]"], [146, "test rax, rax"], [147, "jz short loc_49D3DE"], [148, "mov rax, [rsp+78h+var_30]"], [149, "mov eax, [rax+138h]"], [150, "test eax, eax"], [151, "jz loc_49D566"], [152, "mov rax, [rsp+78h+var_30]"], [153, "mov eax, [rax+10h]"], [154, "test eax, eax"], [155, "jnz short loc_49D404"], [156, "mov rax, [rsp+78h+var_30]"], [157, "mov rax, [rax+0B8h]"], [158, "test rax, rax"], [159, "jnz short loc_49D404"], [160, "mov eax, [rsp+78h+var_10]"], [161, "jmp loc_49D6B2"], [162, "mov rax, [rsp+78h+var_30]"], [163, "mov edx, [rax+28h]"], [164, "mov rax, [rsp+78h+var_30]"], [165, "mov eax, [rax+10h]"], [166, "cmp edx, eax"], [167, "jnb short loc_49D426"], [168, "mov rax, [rsp+78h+var_30]"], [169, "mov eax, [rax+28h]"], [170, "mov [rsp+78h+var_18], eax"], [171, "jmp short loc_49D432"], [172, "mov rax, [rsp+78h+var_30]"], [173, "mov eax, [rax+10h]"], [174, "mov [rsp+78h+var_18], eax"], [175, "mov [rsp+78h+var_1C], 0"], [176, "jmp short loc_49D467"], [177, "mov rax, [rsp+78h+var_30]"], [178, "mov rdx, [rax+8]"], [179, "mov eax, [rsp+78h+var_1C]"], [180, "lea rcx, [rdx+rax]"], [181, "mov rax, [rsp+78h+var_30]"], [182, "mov rdx, [rax+20h]"], [183, "mov eax, [rsp+78h+var_1C]"], [184, "add rdx, rax"], [185, "movzx eax, byte ptr [rcx]"], [186, "mov [rdx], al"], [187, "add [rsp+78h+var_1C], 1"], [188, "mov eax, [rsp+78h+var_1C]"], [189, "cmp eax, [rsp+78h+var_18]"], [190, "jb short loc_49D43C"], [191, "mov rax, [rsp+78h+var_30]"], [192, "mov rdx, [rax+0A0h]"], [193, "mov eax, [rsp+78h+var_18]"], [194, "add rdx, rax"], [195, "mov rax, [rsp+78h+var_30]"], [196, "mov [rax+0A0h], rdx"], [197, "mov edx, [rsp+78h+var_18]"], [198, "mov rax, [rsp+78h+var_30]"], [199, "mov rcx, [rax+20h]"], [200, "mov rax, [rsp+78h+var_30]"], [201, "mov rax, [rax+0A8h]"], [202, "mov rsi, rcx"], [203, "mov rdi, rax"], [204, "call sub_47B7FC"], [205, "mov rdx, [rsp+78h+var_30]"], [206, "mov [rdx+0A8h], rax"], [207, "mov rax, [rsp+78h+var_30]"], [208, "mov rax, [rax+0C0h]"], [209, "mov ecx, [rsp+78h+var_18]"], [210, "sub rax, rcx"], [211, "mov rdx, rax"], [212, "mov rax, [rsp+78h+var_30]"], [213, "mov [rax+0C0h], rdx"], [214, "mov rax, [rsp+78h+var_30]"], [215, "mov eax, [rax+10h]"], [216, "sub eax, [rsp+78h+var_18]"], [217, "mov edx, eax"], [218, "mov rax, [rsp+78h+var_30]"], [219, "mov [rax+10h], edx"], [220, "mov rax, [rsp+78h+var_30]"], [221, "mov eax, [rax+28h]"], [222, "sub eax, [rsp+78h+var_18]"], [223, "mov edx, eax"], [224, "mov rax, [rsp+78h+var_30]"], [225, "mov [rax+28h], edx"], [226, "mov rax, [rsp+78h+var_30]"], [227, "mov rdx, [rax+20h]"], [228, "mov eax, [rsp+78h+var_18]"], [229, "add rdx, rax"], [230, "mov rax, [rsp+78h+var_30]"], [231, "mov [rax+20h], rdx"], [232, "mov rax, [rsp+78h+var_30]"], [233, "mov rdx, [rax+8]"], [234, "mov eax, [rsp+78h+var_18]"], [235, "add rdx, rax"], [236, "mov rax, [rsp+78h+var_30]"], [237, "mov [rax+8], rdx"], [238, "mov rax, [rsp+78h+var_30]"], [239, "mov rdx, [rax+30h]"], [240, "mov eax, [rsp+78h+var_18]"], [241, "add rdx, rax"], [242, "mov rax, [rsp+78h+var_30]"], [243, "mov [rax+30h], rdx"], [244, "mov eax, [rsp+78h+var_18]"], [245, "add [rsp+78h+var_10], eax"], [246, "jmp loc_49D68E"], [247, "mov rax, [rsp+78h+var_30]"], [248, "mov rax, [rax+128h]"], [249, "cmp rax, 0Ch"], [250, "jz loc_49D68E"], [251, "mov [rsp+78h+var_34], 2"], [252, "mov rax, [rsp+78h+var_30]"], [253, "mov rax, [rax+30h]"], [254, "mov [rsp+78h+var_40], rax"], [255, "mov rax, [rsp+78h+var_30]"], [256, "mov rax, [rax+20h]"], [257, "mov [rsp+78h+var_48], rax"], [258, "mov rax, [rsp+78h+var_30]"], [259, "lea rdx, [rax+8]"], [260, "mov eax, [rsp+78h+var_34]"], [261, "mov esi, eax"], [262, "mov rdi, rdx"], [263, "call sub_47C25E"], [264, "mov [rsp+78h+var_C], eax"], [265, "cmp [rsp+78h+var_C], 0"], [266, "js short loc_49D5D8"], [267, "mov rax, [rsp+78h+var_30]"], [268, "mov rax, [rax+38h]"], [269, "test rax, rax"], [270, "jz short loc_49D5D8"], [271, "mov [rsp+78h+var_C], 0FFFFFFFDh"], [272, "mov rax, [rsp+78h+var_30]"], [273, "mov rax, [rax+30h]"], [274, "mov [rsp+78h+var_50], rax"], [275, "mov rax, [rsp+78h+var_50]"], [276, "sub rax, [rsp+78h+var_40]"], [277, "mov [rsp+78h+var_58], rax"], [278, "mov rax, [rsp+78h+var_30]"], [279, "mov rdx, [rax+0A0h]"], [280, "mov rax, [rsp+78h+var_58]"], [281, "add rdx, rax"], [282, "mov rax, [rsp+78h+var_30]"], [283, "mov [rax+0A0h], rdx"], [284, "mov rax, [rsp+78h+var_58]"], [285, "mov edx, eax"], [286, "mov rax, [rsp+78h+var_30]"], [287, "mov rax, [rax+0A8h]"], [288, "mov rcx, [rsp+78h+var_48]"], [289, "mov rsi, rcx"], [290, "mov rdi, rax"], [291, "call sub_47B7FC"], [292, "mov rdx, [rsp+78h+var_30]"], [293, "mov [rdx+0A8h], rax"], [294, "mov rax, [rsp+78h+var_30]"], [295, "mov rax, [rax+0C0h]"], [296, "sub rax, [rsp+78h+var_58]"], [297, "mov rdx, rax"], [298, "mov rax, [rsp+78h+var_30]"], [299, "mov [rax+0C0h], rdx"], [300, "mov rax, [rsp+78h+var_50]"], [301, "mov edx, eax"], [302, "mov rax, [rsp+78h+var_40]"], [303, "mov ecx, eax"], [304, "mov eax, edx"], [305, "sub eax, ecx"], [306, "add [rsp+78h+var_10], eax"], [307, "cmp [rsp+78h+var_C], 1"], [308, "jnz short loc_49D687"], [309, "mov eax, [rsp+78h+var_10]"], [310, "jmp short loc_49D6B2"], [311, "cmp [rsp+78h+var_C], 0"], [312, "jnz short loc_49D6A0"], [313, "mov rax, [rsp+78h+var_30]"], [314, "mov eax, [rax+28h]"], [315, "test eax, eax"], [316, "jnz loc_49D26A"], [317, "jmp short loc_49D6A1"], [318, "nop"], [319, "cmp [rsp+78h+var_C], 0"], [320, "jnz short loc_49D6AE"], [321, "mov eax, [rsp+78h+var_10]"], [322, "jmp short loc_49D6B2"], [323, "mov eax, [rsp+78h+var_C]"], [324, "add rsp, 78h"], [325, "retn"]], "data_dep": [[6, 1], [7, 6], [10, 1], [11, 10], [12, 11], [13, 12], [14, 13], [15, 14], [16, 15], [19, 14], [20, 19], [21, 20], [22, 21], [25, 3], [26, 25], [29, 14], [30, 2], [31, 29], [31, 30], [32, 14], [33, 3], [34, 33], [34, 32], [35, 3], [36, 14], [37, 34], [37, 36], [38, 35], [38, 37], [39, 38], [40, 14], [41, 31], [41, 40], [41, 34], [42, 41], [43, 42], [44, 14], [45, 48], [45, 34], [45, 31], [45, 44], [46, 45], [47, 14], [48, 47], [48, 46], [49, 3], [50, 14], [51, 50], [51, 31], [51, 48], [51, 34], [52, 14], [53, 34], [53, 48], [53, 52], [53, 31], [54, 53], [55, 51], [55, 54], [56, 55], [56, 49], [57, 56], [58, 14], [59, 31], [59, 58], [59, 48], [59, 34], [60, 59], [61, 60], [62, 14], [63, 34], [63, 69], [63, 31], [63, 62], [63, 48], [64, 63], [65, 14], [66, 48], [66, 34], [66, 65], [66, 69], [66, 31], [67, 66], [67, 64], [68, 14], [69, 67], [69, 68], [71, 14], [72, 136], [72, 225], [72, 243], [72, 206], [72, 71], [72, 219], [72, 196], [72, 186], [72, 293], [72, 140], [72, 283], [72, 143], [72, 237], [72, 129], [72, 213], [72, 231], [72, 69], [72, 31], [72, 48], [72, 34], [72, 299], [73, 72], [74, 73], [75, 14], [76, 143], [76, 237], [76, 129], [76, 213], [76, 231], [76, 69], [76, 31], [76, 48], [76, 34], [76, 299], [76, 136], [76, 225], [76, 243], [76, 206], [76, 219], [76, 75], [76, 196], [76, 186], [76, 293], [76, 140], [76, 283], [77, 76], [78, 77], [80, 14], [81, 213], [81, 231], [81, 69], [81, 31], [81, 48], [81, 34], [81, 299], [81, 136], [81, 225], [81, 243], [81, 206], [81, 80], [81, 219], [81, 196], [81, 186], [81, 293], [81, 140], [81, 283], [81, 143], [81, 237], [81, 129], [82, 79], [83, 81], [83, 82], [84, 83], [85, 14], [86, 31], [86, 48], [86, 34], [86, 299], [86, 136], [86, 225], [86, 243], [86, 85], [86, 206], [86, 219], [86, 196], [86, 186], [86, 293], [86, 140], [86, 283], [86, 143], [86, 237], [86, 129], [86, 213], [86, 231], [86, 69], [87, 86], [88, 79], [88, 87], [89, 88], [92, 14], [93, 196], [93, 186], [93, 69], [93, 293], [93, 140], [93, 283], [93, 143], [93, 237], [93, 129], [93, 92], [93, 213], [93, 231], [93, 31], [93, 48], [93, 34], [93, 299], [93, 136], [93, 225], [93, 243], [93, 206], [93, 219], [94, 14], [95, 143], [95, 237], [95, 129], [95, 213], [95, 231], [95, 69], [95, 31], [95, 34], [95, 136], [95, 225], [95, 243], [95, 94], [95, 206], [95, 219], [95, 48], [95, 196], [95, 299], [95, 186], [95, 293], [95, 140], [95, 283], [96, 95], [96, 93], [97, 14], [98, 293], [98, 140], [98, 283], [98, 143], [98, 237], [98, 129], [98, 97], [98, 213], [98, 231], [98, 69], [98, 31], [98, 48], [98, 34], [98, 299], [98, 136], [98, 225], [98, 243], [98, 206], [98, 219], [98, 196], [98, 186], [99, 14], [100, 213], [100, 231], [100, 69], [100, 203], [100, 31], [100, 34], [100, 290], [100, 136], [100, 225], [100, 243], [100, 99], [100, 117], [100, 206], [100, 219], [100, 48], [100, 196], [100, 299], [100, 186], [100, 293], [100, 140], [100, 283], [100, 143], [100, 237], [100, 129], [102, 98], [104, 103], [105, 104], [108, 14], [109, 186], [109, 293], [109, 140], [109, 283], [109, 143], [109, 237], [109, 129], [109, 213], [109, 231], [109, 69], [109, 31], [109, 34], [109, 136], [109, 225], [109, 243], [109, 108], [109, 206], [109, 219], [109, 48], [109, 196], [109, 299], [110, 79], [110, 87], [111, 14], [112, 219], [112, 196], [112, 186], [112, 293], [112, 140], [112, 283], [112, 143], [112, 237], [112, 111], [112, 129], [112, 213], [112, 231], [112, 69], [112, 31], [112, 48], [112, 34], [112, 299], [112, 136], [112, 225], [112, 243], [112, 206], [113, 14], [114, 143], [114, 237], [114, 129], [114, 213], [114, 231], [114, 31], [114, 48], [114, 34], [114, 299], [114, 136], [114, 113], [114, 140], [114, 225], [114, 243], [114, 206], [114, 219], [114, 196], [114, 186], [114, 69], [114, 293], [114, 283], [115, 14], [116, 31], [116, 48], [116, 34], [116, 136], [116, 225], [116, 243], [116, 206], [116, 219], [116, 196], [116, 299], [116, 186], [116, 293], [116, 140], [116, 283], [116, 143], [116, 237], [116, 129], [116, 115], [116, 213], [116, 231], [116, 69], [117, 116], [118, 109], [119, 87], [119, 79], [120, 119], [120, 118], [121, 120], [124, 14], [125, 283], [125, 143], [125, 237], [125, 129], [125, 124], [125, 213], [125, 231], [125, 69], [125, 31], [125, 34], [125, 136], [125, 225], [125, 243], [125, 206], [125, 219], [125, 48], [125, 196], [125, 299], [125, 186], [125, 293], [125, 140], [126, 79], [126, 87], [127, 126], [127, 125], [128, 14], [129, 128], [129, 127], [130, 14], [131, 130], [131, 129], [131, 136], [132, 79], [132, 87], [133, 132], [133, 131], [134, 133], [135, 14], [136, 135], [136, 134], [137, 14], [138, 137], [138, 136], [139, 14], [140, 139], [140, 138], [141, 14], [142, 79], [142, 87], [143, 141], [143, 142], [144, 14], [145, 225], [145, 243], [145, 206], [145, 219], [145, 196], [145, 186], [145, 69], [145, 293], [145, 144], [145, 283], [145, 31], [145, 143], [145, 237], [145, 129], [145, 213], [145, 231], [145, 48], [145, 34], [145, 299], [145, 136], [145, 140], [146, 145], [147, 146], [148, 14], [149, 213], [149, 231], [149, 31], [149, 48], [149, 34], [149, 299], [149, 136], [149, 225], [149, 243], [149, 206], [149, 219], [149, 196], [149, 186], [149, 69], [149, 293], [149, 140], [149, 283], [149, 148], [149, 143], [149, 237], [149, 129], [150, 149], [151, 150], [152, 14], [153, 219], [153, 196], [153, 186], [153, 293], [153, 140], [153, 283], [153, 143], [153, 152], [153, 237], [153, 129], [153, 213], [153, 231], [153, 69], [153, 31], [153, 48], [153, 34], [153, 299], [153, 136], [153, 225], [153, 243], [153, 206], [154, 153], [155, 154], [156, 14], [157, 225], [157, 156], [157, 48], [157, 34], [157, 299], [157, 136], [157, 140], [157, 243], [157, 206], [157, 219], [157, 237], [157, 196], [157, 186], [157, 69], [157, 293], [157, 283], [157, 31], [157, 143], [157, 129], [157, 213], [157, 231], [158, 157], [159, 158], [160, 5], [160, 306], [160, 245], [162, 14], [163, 283], [163, 143], [163, 237], [163, 129], [163, 213], [163, 231], [163, 69], [163, 31], [163, 48], [163, 34], [163, 299], [163, 136], [163, 225], [163, 243], [163, 206], [163, 219], [163, 196], [163, 186], [163, 293], [163, 140], [163, 162], [164, 14], [165, 48], [165, 34], [165, 299], [165, 164], [165, 136], [165, 140], [165, 225], [165, 243], [165, 206], [165, 219], [165, 196], [165, 186], [165, 69], [165, 293], [165, 283], [165, 31], [165, 143], [165, 237], [165, 129], [165, 213], [165, 231], [166, 165], [166, 163], [167, 166], [168, 14], [169, 186], [169, 213], [169, 69], [169, 293], [169, 283], [169, 31], [169, 143], [169, 129], [169, 231], [169, 225], [169, 206], [169, 48], [169, 34], [169, 299], [169, 168], [169, 136], [169, 140], [169, 243], [169, 219], [169, 237], [169, 196], [170, 169], [172, 14], [173, 206], [173, 48], [173, 34], [173, 299], [173, 136], [173, 140], [173, 243], [173, 219], [173, 237], [173, 196], [173, 186], [173, 69], [173, 172], [173, 293], [173, 283], [173, 31], [173, 143], [173, 129], [173, 213], [173, 231], [173, 225], [174, 173], [177, 14], [178, 136], [178, 140], [178, 243], [178, 219], [178, 237], [178, 196], [178, 177], [178, 186], [178, 69], [178, 293], [178, 283], [178, 31], [178, 143], [178, 129], [178, 213], [178, 231], [178, 225], [178, 206], [178, 48], [178, 34], [178, 299], [179, 175], [179, 187], [180, 219], [180, 196], [180, 209], [180, 303], [180, 186], [180, 51], [180, 69], [180, 293], [180, 283], [180, 143], [180, 237], [180, 129], [180, 213], [180, 231], [180, 180], [180, 31], [180, 179], [180, 48], [180, 34], [180, 299], [180, 132], [180, 136], [180, 140], [180, 225], [180, 243], [180, 206], [181, 14], [182, 143], [182, 129], [182, 213], [182, 231], [182, 225], [182, 48], [182, 34], [182, 299], [182, 136], [182, 140], [182, 243], [182, 206], [182, 219], [182, 237], [182, 196], [182, 186], [182, 69], [182, 181], [182, 293], [182, 283], [182, 31], [183, 175], [183, 187], [184, 183], [184, 182], [185, 180], [185, 283], [185, 31], [185, 143], [185, 129], [185, 231], [185, 225], [185, 206], [185, 48], [185, 34], [185, 299], [185, 136], [185, 140], [185, 243], [185, 219], [185, 237], [185, 196], [185, 186], [185, 213], [185, 69], [185, 293], [186, 185], [186, 184], [187, 175], [187, 187], [188, 187], [188, 175], [189, 170], [189, 188], [189, 174], [190, 189], [191, 14], [192, 48], [192, 34], [192, 299], [192, 136], [192, 140], [192, 225], [192, 243], [192, 206], [192, 219], [192, 237], [192, 196], [192, 191], [192, 186], [192, 69], [192, 293], [192, 283], [192, 31], [192, 143], [192, 129], [192, 213], [192, 231], [193, 170], [193, 174], [194, 193], [194, 192], [195, 14], [196, 194], [196, 195], [197, 170], [197, 174], [198, 14], [199, 196], [199, 31], [199, 231], [199, 198], [200, 14], [201, 196], [201, 200], [202, 199], [203, 201], [205, 14], [206, 205], [206, 204], [207, 14], [208, 299], [208, 213], [208, 207], [208, 206], [209, 170], [209, 174], [210, 209], [210, 208], [211, 210], [212, 14], [213, 212], [213, 211], [214, 14], [215, 143], [215, 219], [215, 214], [215, 213], [216, 215], [216, 170], [216, 174], [217, 216], [218, 14], [219, 218], [219, 217], [220, 14], [221, 219], [221, 69], [221, 225], [221, 220], [221, 48], [221, 34], [222, 170], [222, 174], [222, 221], [223, 222], [224, 14], [225, 224], [225, 223], [226, 14], [227, 31], [227, 231], [227, 226], [227, 225], [228, 174], [228, 170], [229, 228], [229, 227], [230, 14], [231, 230], [231, 229], [232, 14], [233, 140], [233, 237], [233, 232], [233, 231], [234, 170], [234, 174], [235, 233], [235, 234], [236, 14], [237, 236], [237, 235], [238, 14], [239, 243], [239, 238], [239, 237], [240, 170], [240, 174], [241, 240], [241, 239], [242, 14], [243, 242], [243, 241], [244, 174], [244, 170], [245, 306], [245, 245], [245, 244], [245, 5], [247, 14], [248, 186], [248, 213], [248, 69], [248, 293], [248, 283], [248, 31], [248, 143], [248, 129], [248, 231], [248, 225], [248, 206], [248, 48], [248, 196], [248, 34], [248, 299], [248, 136], [248, 140], [248, 243], [248, 247], [248, 219], [248, 237], [249, 248], [250, 249], [252, 14], [253, 283], [253, 31], [253, 143], [253, 129], [253, 231], [253, 225], [253, 206], [253, 48], [253, 196], [253, 34], [253, 299], [253, 136], [253, 140], [253, 243], [253, 252], [253, 219], [253, 237], [253, 186], [253, 213], [253, 69], [253, 293], [254, 253], [255, 14], [256, 186], [256, 213], [256, 69], [256, 283], [256, 31], [256, 143], [256, 129], [256, 231], [256, 225], [256, 206], [256, 48], [256, 196], [256, 34], [256, 299], [256, 136], [256, 293], [256, 140], [256, 243], [256, 219], [256, 237], [256, 255], [257, 256], [258, 14], [259, 219], [259, 237], [259, 241], [259, 186], [259, 213], [259, 69], [259, 293], [259, 283], [259, 301], [259, 31], [259, 143], [259, 129], [259, 142], [259, 231], [259, 258], [259, 225], [259, 49], [259, 67], [259, 206], [259, 48], [259, 196], [259, 34], [259, 299], [259, 136], [259, 140], [259, 243], [260, 251], [261, 260], [262, 259], [264, 263], [265, 264], [266, 265], [267, 14], [268, 48], [268, 196], [268, 34], [268, 299], [268, 186], [268, 136], [268, 293], [268, 140], [268, 219], [268, 237], [268, 213], [268, 231], [268, 69], [268, 283], [268, 31], [268, 143], [268, 129], [268, 267], [268, 225], [268, 243], [268, 206], [269, 268], [270, 269], [272, 14], [273, 136], [273, 293], [273, 140], [273, 219], [273, 237], [273, 213], [273, 231], [273, 69], [273, 283], [273, 31], [273, 143], [273, 129], [273, 272], [273, 225], [273, 243], [273, 206], [273, 48], [273, 196], [273, 34], [273, 299], [273, 186], [274, 273], [275, 274], [276, 275], [276, 254], [277, 276], [278, 14], [279, 206], [279, 48], [279, 196], [279, 34], [279, 299], [279, 136], [279, 140], [279, 243], [279, 219], [279, 237], [279, 186], [279, 213], [279, 69], [279, 293], [279, 283], [279, 31], [279, 278], [279, 143], [279, 129], [279, 231], [279, 225], [280, 277], [281, 280], [281, 279], [282, 14], [283, 282], [283, 281], [284, 277], [285, 284], [286, 14], [287, 283], [287, 286], [288, 257], [289, 288], [290, 287], [292, 14], [293, 292], [293, 291], [294, 14], [295, 294], [295, 293], [295, 213], [295, 299], [296, 277], [296, 295], [297, 296], [298, 14], [299, 298], [299, 297], [300, 274], [301, 300], [302, 254], [303, 302], [304, 301], [305, 304], [305, 303], [306, 5], [306, 245], [306, 306], [306, 305], [307, 271], [307, 264], [308, 307], [309, 306], [311, 264], [311, 271], [312, 311], [313, 14], [314, 186], [314, 136], [314, 293], [314, 140], [314, 219], [314, 237], [314, 213], [314, 231], [314, 69], [314, 283], [314, 31], [314, 143], [314, 129], [314, 225], [314, 243], [314, 206], [314, 48], [314, 313], [314, 196], [314, 34], [314, 299], [315, 314], [316, 315], [319, 4], [319, 264], [319, 271], [320, 319], [321, 306], [321, 5], [321, 245], [323, 271], [323, 4], [323, 264], [324, 0], [325, 321], [325, 23], [325, 106], [325, 27], [325, 8], [325, 17], [325, 160], [325, 122], [325, 90], [325, 323], [325, 309]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f_3dcf9b97b1c5d69ccd59d180de83033718cc3b2064c9c1e1f91608bdd820595f.jsonl.gz", "strip_func_name": "sub_49D12F", "query": "\n\n\n__int64 __fastcall sub_49D12F(__int64 a1, __int64 a2, unsigned int a3)\n{\n__int64 result; // rax\n__int64 v4; // [rsp+28h] [rbp-50h]\n_BYTE *v5; // [rsp+30h] [rbp-48h]\n__int64 v6; // [rsp+38h] [rbp-40h]\n__int64 v7; // [rsp+48h] [rbp-30h]\nunsigned int i; // [rsp+5Ch] [rbp-1Ch]\nunsigned int v9; // [rsp+60h] [rbp-18h]\nunsigned int v10; // [rsp+64h] [rbp-14h]\nunsigned int v11; // [rsp+68h] [rbp-10h]\nint v12; // [rsp+6Ch] [rbp-Ch]\n\nv12 = 0;\nv11 = 0;\nif ( !a1 )\nreturn 4294967194LL;\nv7 = *(_QWORD *)(a1 + 320);\nif ( !v7 )\nreturn 4294967194LL;\nif ( !*(_QWORD *)v7 )\nreturn 4294967196LL;\nif ( !a3 )\nreturn 0LL;\n*(_QWORD *)(v7 + 32) = a2;\n*(_DWORD *)(v7 + 40) = a3;\nif ( (unsigned __int64)a3 > *(_QWORD *)(v7 + 192) && !*(_DWORD *)(v7 + 312) )\n*(_DWORD *)(v7 + 40) = *(_QWORD *)(v7 + 192);\nif ( a3 > *(_QWORD *)(v7 + 184) + (unsigned __int64)*(unsigned int *)(v7 + 16) && *(_DWORD *)(v7 + 312) )\n*(_DWORD *)(v7 + 40) = *(_DWORD *)(v7 + 16) + *(_QWORD *)(v7 + 184);\nwhile ( *(_DWORD *)(v7 + 40) )\n{\nif ( !*(_DWORD *)(v7 + 16) && *(_QWORD *)(v7 + 184) )\n{\nv10 = 0x4000;\nif ( *(_QWORD *)(v7 + 184) < 0x4000uLL )\nv10 = *(_QWORD *)(v7 + 184);\nif ( !v10 )\nreturn 0LL;\nif ( sub_47AF9F(v7 + 200, *(_QWORD *)(v7 + 288), *(_QWORD *)(v7 + 304) + *(_QWORD *)(v7 + 120), 0) )\nreturn 0xFFFFFFFFLL;\nif ( (*(__int64 (__fastcall **)(_QWORD, _QWORD, _QWORD, _QWORD))(v7 + 208))(\n*(_QWORD *)(v7 + 256),\n*(_QWORD *)(v7 + 288),\n*(_QWORD *)v7,\nv10) != v10 )\nreturn 0xFFFFFFFFLL;\n*(_QWORD *)(v7 + 120) += v10;\n*(_QWORD *)(v7 + 184) -= v10;\n*(_QWORD *)(v7 + 8) = *(_QWORD *)v7;\n*(_DWORD *)(v7 + 16) = v10;\n}\nif ( *(_QWORD *)(v7 + 296) && !*(_DWORD *)(v7 + 312) )\n{\nif ( *(_QWORD *)(v7 + 296) != 12LL )\n{\nv6 = *(_QWORD *)(v7 + 48);\nv5 = *(_BYTE **)(v7 + 32);\nv12 = sub_47C25E(v7 + 8, 2);\nif ( v12 >= 0 && *(_QWORD *)(v7 + 56) )\nv12 = -3;\nv4 = *(_QWORD *)(v7 + 48);\n*(_QWORD *)(v7 + 160) += v4 - v6;\n*(_QWORD *)(v7 + 168) = sub_47B7FC(*(_QWORD *)(v7 + 168), v5, (unsigned int)(v4 - v6));\n*(_QWORD *)(v7 + 192) -= v4 - v6;\nv11 += v4 - v6;\nif ( v12 == 1 )\nreturn v11;\nif ( v12 )\nbreak;\n}\n}\nelse\n{\nif ( !*(_DWORD *)(v7 + 16) && !*(_QWORD *)(v7 + 184) )\nreturn v11;\nif ( *(_DWORD *)(v7 + 40) >= *(_DWORD *)(v7 + 16) )\nv9 = *(_DWORD *)(v7 + 16);\nelse\nv9 = *(_DWORD *)(v7 + 40);\nfor ( i = 0; i < v9; ++i )\n*(_BYTE *)(i + *(_QWORD *)(v7 + 32)) = *(_BYTE *)(*(_QWORD *)(v7 + 8) + i);\n*(_QWORD *)(v7 + 160) += v9;\n*(_QWORD *)(v7 + 168) = sub_47B7FC(*(_QWORD *)(v7 + 168), *(_BYTE **)(v7 + 32), v9);\n*(_QWORD *)(v7 + 192) -= v9;\n*(_DWORD *)(v7 + 16) -= v9;\n*(_DWORD *)(v7 + 40) -= v9;\n*(_QWORD *)(v7 + 32) += v9;\n*(_QWORD *)(v7 + 8) += v9;\n*(_QWORD *)(v7 + 48) += v9;\nv11 += v9;\n}\n}\nif ( v12 )\nresult = (unsigned int)v12;\nelse\nresult = v11;\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,v4,v5,v6,v7,v9,v10,v11,v12,sub_49D12F,sub_47AF9F,sub_47C25E,sub_47B7FC,]", "hints": "[]", "response": "{'a3': 'len', 'a1': 'file', 'a2': 'buf', 'v4': 'uTotalOutAfter', 'v5': 'bufBefore', 'v6': 'uTotalOutBefore', 'v7': 'pfile_in_zip_read_info', 'v9': 'uDoCopy', 'v10': 'uReadThis', 'v11': 'iRead', 'v12': 'err', 'sub_49D12F': 'unzReadCurrentFile', 'sub_47AF9F': 'call_zseek64', 'sub_47C25E': 'mz_inflate', 'sub_47B7FC': 'mz_crc32'}"}
[ [ 0.8184546232223511, 0.8162035346031189, 0.8158503770828247, 0.7949497103691101, 0.7706600427627563, 0.7661060690879822, 0.7657219171524048, 0.7570574879646301, 0.7558304667472839, 0.7551523447036743, 0.7531030178070068, 0.752831220626831, 0.7484961748123169, 0.7472704648971558, 0.7455307245254517, 0.742475152015686, 0.742475152015686, 0.7400825619697571, 0.7357054352760315, 0.7357054352760315 ], [ 246983, 34934, 83134, 251513, 68323, 137293, 138767, 26072, 259927, 16569, 160141, 77173, 228307, 239769, 255566, 153511, 99143, 161689, 55531, 59614 ] ]
utf8_to_utf16
f61ed8ef6ab5ad7275499f10ef94c8c2326a67232c2cc9190dbdb630ddbc2c7b
0x09
hfsfuse
NA
size_t utf8_to_utf16(uint16_t *dst, size_t dst_len, const char *src, size_t src_len, int flags, int *errp) { const unsigned char *s; size_t spos, dpos; int error; uint16_t c; #define IS_CONT(c) (((c)&0xc0) == 0x80) error = 0; s = (const unsigned char *)src; spos = dpos = 0; while (spos < src_len) { if (s[spos] < 0x80) { c = s[spos++]; } else if ((flags & UNICODE_UTF8_LATIN1_FALLBACK) && (spos >= src_len || !IS_CONT(s[spos+1])) && s[spos]>=0xa0) { /* not valid UTF-8, assume ISO 8859-1 */ c = s[spos++]; } else if (s[spos] < 0xc0 || s[spos] >= 0xf5) { /* continuation byte without lead byte * or lead byte for codepoint above 0x10ffff */ error++; spos++; continue; } else if (s[spos] < 0xe0) { if (spos >= src_len || !IS_CONT(s[spos+1])) { spos++; error++; continue; } c = ((s[spos] & 0x3f) << 6) | (s[spos+1] & 0x3f); spos += 2; if (c < 0x80) { /* overlong encoding */ error++; continue; } } else if (s[spos] < 0xf0) { if (spos >= src_len-2 || !IS_CONT(s[spos+1]) || !IS_CONT(s[spos+2])) { spos++; error++; continue; } c = ((s[spos] & 0x0f) << 12) | ((s[spos+1] & 0x3f) << 6) | (s[spos+2] & 0x3f); spos += 3; if (c < 0x800 || (c & 0xdf00) == 0xd800 ) { /* overlong encoding or encoded surrogate */ error++; continue; } } else { uint32_t cc; /* UTF-16 surrogate pair */ if (spos >= src_len-3 || !IS_CONT(s[spos+1]) || !IS_CONT(s[spos+2]) || !IS_CONT(s[spos+3])) { spos++; error++; continue; } cc = ((s[spos] & 0x03) << 18) | ((s[spos+1] & 0x3f) << 12) | ((s[spos+2] & 0x3f) << 6) | (s[spos+3] & 0x3f); spos += 4; if (cc < 0x10000) { /* overlong encoding */ error++; continue; } if (dst && dpos < dst_len) dst[dpos] = (0xd800 | ((cc-0x10000)>>10)); dpos++; c = 0xdc00 | ((cc-0x10000) & 0x3ff); } if (dst && dpos < dst_len) dst[dpos] = c; dpos++; } if (errp) *errp = error; return dpos; #undef IS_CONT }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_409765", "function_addr": 4233061, "binary_name": "f61ed8ef6ab5ad7275499f10ef94c8c2326a67232c2cc9190dbdb630ddbc2c7b.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_38], rdi"], [3, "mov [rbp+var_40], rsi"], [4, "mov [rbp+var_48], rdx"], [5, "mov [rbp+var_50], rcx"], [6, "mov [rbp+var_54], r8d"], [7, "mov [rbp+var_60], r9"], [8, "mov [rbp+var_14], 0"], [9, "mov rax, [rbp+var_48]"], [10, "mov [rbp+var_20], rax"], [11, "mov [rbp+var_10], 0"], [12, "mov rax, [rbp+var_10]"], [13, "mov [rbp+var_8], rax"], [14, "jmp loc_409B84"], [15, "mov rdx, [rbp+var_20]"], [16, "mov rax, [rbp+var_8]"], [17, "add rax, rdx"], [18, "movzx eax, byte ptr [rax]"], [19, "test al, al"], [20, "js short loc_4097D9"], [21, "mov rax, [rbp+var_8]"], [22, "lea rdx, [rax+1]"], [23, "mov [rbp+var_8], rdx"], [24, "mov rdx, [rbp+var_20]"], [25, "add rax, rdx"], [26, "movzx eax, byte ptr [rax]"], [27, "movzx eax, al"], [28, "mov [rbp+var_16], ax"], [29, "jmp loc_409B58"], [30, "mov eax, [rbp+var_54]"], [31, "and eax, 3"], [32, "test eax, eax"], [33, "jz short loc_409842"], [34, "mov rax, [rbp+var_8]"], [35, "cmp rax, [rbp+var_50]"], [36, "jnb short loc_40980E"], [37, "mov rax, [rbp+var_8]"], [38, "lea rdx, [rax+1]"], [39, "mov rax, [rbp+var_20]"], [40, "add rax, rdx"], [41, "movzx eax, byte ptr [rax]"], [42, "movzx eax, al"], [43, "and eax, 0C0h"], [44, "cmp eax, 80h"], [45, "jz short loc_409842"], [46, "mov rdx, [rbp+var_20]"], [47, "mov rax, [rbp+var_8]"], [48, "add rax, rdx"], [49, "movzx eax, byte ptr [rax]"], [50, "cmp al, 9Fh"], [51, "jbe short loc_409842"], [52, "mov rax, [rbp+var_8]"], [53, "lea rdx, [rax+1]"], [54, "mov [rbp+var_8], rdx"], [55, "mov rdx, [rbp+var_20]"], [56, "add rax, rdx"], [57, "movzx eax, byte ptr [rax]"], [58, "movzx eax, al"], [59, "mov [rbp+var_16], ax"], [60, "jmp loc_409B58"], [61, "mov rdx, [rbp+var_20]"], [62, "mov rax, [rbp+var_8]"], [63, "add rax, rdx"], [64, "movzx eax, byte ptr [rax]"], [65, "cmp al, 0BFh"], [66, "jbe short loc_409866"], [67, "mov rdx, [rbp+var_20]"], [68, "mov rax, [rbp+var_8]"], [69, "add rax, rdx"], [70, "movzx eax, byte ptr [rax]"], [71, "cmp al, 0F4h"], [72, "jbe short loc_409874"], [73, "add [rbp+var_14], 1"], [74, "add [rbp+var_8], 1"], [75, "jmp loc_409B84"], [76, "mov rdx, [rbp+var_20]"], [77, "mov rax, [rbp+var_8]"], [78, "add rax, rdx"], [79, "movzx eax, byte ptr [rax]"], [80, "cmp al, 0DFh"], [81, "ja loc_409914"], [82, "mov rax, [rbp+var_8]"], [83, "cmp rax, [rbp+var_50]"], [84, "jnb short loc_4098B5"], [85, "mov rax, [rbp+var_8]"], [86, "lea rdx, [rax+1]"], [87, "mov rax, [rbp+var_20]"], [88, "add rax, rdx"], [89, "movzx eax, byte ptr [rax]"], [90, "movzx eax, al"], [91, "and eax, 0C0h"], [92, "cmp eax, 80h"], [93, "jz short loc_4098C3"], [94, "add [rbp+var_8], 1"], [95, "add [rbp+var_14], 1"], [96, "jmp loc_409B84"], [97, "mov rdx, [rbp+var_20]"], [98, "mov rax, [rbp+var_8]"], [99, "add rax, rdx"], [100, "movzx eax, byte ptr [rax]"], [101, "movzx eax, al"], [102, "shl eax, 6"], [103, "and ax, 0FC0h"], [104, "mov edx, eax"], [105, "mov rax, [rbp+var_8]"], [106, "lea rcx, [rax+1]"], [107, "mov rax, [rbp+var_20]"], [108, "add rax, rcx"], [109, "movzx eax, byte ptr [rax]"], [110, "movzx eax, al"], [111, "and eax, 3Fh"], [112, "or eax, edx"], [113, "mov [rbp+var_16], ax"], [114, "add [rbp+var_8], 2"], [115, "cmp [rbp+var_16], 7Fh"], [116, "ja loc_409B58"], [117, "add [rbp+var_14], 1"], [118, "jmp loc_409B84"], [119, "mov rdx, [rbp+var_20]"], [120, "mov rax, [rbp+var_8]"], [121, "add rax, rdx"], [122, "movzx eax, byte ptr [rax]"], [123, "cmp al, 0EFh"], [124, "ja loc_409A06"], [125, "mov rax, [rbp+var_50]"], [126, "sub rax, 2"], [127, "cmp [rbp+var_8], rax"], [128, "jnb short loc_40997A"], [129, "mov rax, [rbp+var_8]"], [130, "lea rdx, [rax+1]"], [131, "mov rax, [rbp+var_20]"], [132, "add rax, rdx"], [133, "movzx eax, byte ptr [rax]"], [134, "movzx eax, al"], [135, "and eax, 0C0h"], [136, "cmp eax, 80h"], [137, "jnz short loc_40997A"], [138, "mov rax, [rbp+var_8]"], [139, "lea rdx, [rax+2]"], [140, "mov rax, [rbp+var_20]"], [141, "add rax, rdx"], [142, "movzx eax, byte ptr [rax]"], [143, "movzx eax, al"], [144, "and eax, 0C0h"], [145, "cmp eax, 80h"], [146, "jz short loc_409988"], [147, "add [rbp+var_8], 1"], [148, "add [rbp+var_14], 1"], [149, "jmp loc_409B84"], [150, "mov rdx, [rbp+var_20]"], [151, "mov rax, [rbp+var_8]"], [152, "add rax, rdx"], [153, "movzx eax, byte ptr [rax]"], [154, "movzx eax, al"], [155, "shl eax, 0Ch"], [156, "mov ecx, eax"], [157, "mov rax, [rbp+var_8]"], [158, "lea rdx, [rax+1]"], [159, "mov rax, [rbp+var_20]"], [160, "add rax, rdx"], [161, "movzx eax, byte ptr [rax]"], [162, "movzx eax, al"], [163, "shl eax, 6"], [164, "and ax, 0FC0h"], [165, "or ecx, eax"], [166, "mov edx, ecx"], [167, "mov rax, [rbp+var_8]"], [168, "lea rcx, [rax+2]"], [169, "mov rax, [rbp+var_20]"], [170, "add rax, rcx"], [171, "movzx eax, byte ptr [rax]"], [172, "movzx eax, al"], [173, "and eax, 3Fh"], [174, "or eax, edx"], [175, "mov [rbp+var_16], ax"], [176, "add [rbp+var_8], 3"], [177, "cmp [rbp+var_16], 7FFh"], [178, "jbe short loc_4099FD"], [179, "movzx eax, [rbp+var_16]"], [180, "and eax, 0DF00h"], [181, "cmp eax, 0D800h"], [182, "jnz loc_409B58"], [183, "add [rbp+var_14], 1"], [184, "jmp loc_409B84"], [185, "mov rax, [rbp+var_50]"], [186, "sub rax, 3"], [187, "cmp [rbp+var_8], rax"], [188, "jnb short loc_409A77"], [189, "mov rax, [rbp+var_8]"], [190, "lea rdx, [rax+1]"], [191, "mov rax, [rbp+var_20]"], [192, "add rax, rdx"], [193, "movzx eax, byte ptr [rax]"], [194, "movzx eax, al"], [195, "and eax, 0C0h"], [196, "cmp eax, 80h"], [197, "jnz short loc_409A77"], [198, "mov rax, [rbp+var_8]"], [199, "lea rdx, [rax+2]"], [200, "mov rax, [rbp+var_20]"], [201, "add rax, rdx"], [202, "movzx eax, byte ptr [rax]"], [203, "movzx eax, al"], [204, "and eax, 0C0h"], [205, "cmp eax, 80h"], [206, "jnz short loc_409A77"], [207, "mov rax, [rbp+var_8]"], [208, "lea rdx, [rax+3]"], [209, "mov rax, [rbp+var_20]"], [210, "add rax, rdx"], [211, "movzx eax, byte ptr [rax]"], [212, "movzx eax, al"], [213, "and eax, 0C0h"], [214, "cmp eax, 80h"], [215, "jz short loc_409A85"], [216, "add [rbp+var_8], 1"], [217, "add [rbp+var_14], 1"], [218, "jmp loc_409B84"], [219, "mov rdx, [rbp+var_20]"], [220, "mov rax, [rbp+var_8]"], [221, "add rax, rdx"], [222, "movzx eax, byte ptr [rax]"], [223, "movzx eax, al"], [224, "shl eax, 12h"], [225, "and eax, 0C0000h"], [226, "mov edx, eax"], [227, "mov rax, [rbp+var_8]"], [228, "lea rcx, [rax+1]"], [229, "mov rax, [rbp+var_20]"], [230, "add rax, rcx"], [231, "movzx eax, byte ptr [rax]"], [232, "movzx eax, al"], [233, "shl eax, 0Ch"], [234, "and eax, 3F000h"], [235, "or edx, eax"], [236, "mov rax, [rbp+var_8]"], [237, "lea rcx, [rax+2]"], [238, "mov rax, [rbp+var_20]"], [239, "add rax, rcx"], [240, "movzx eax, byte ptr [rax]"], [241, "movzx eax, al"], [242, "shl eax, 6"], [243, "and eax, 0FC0h"], [244, "or edx, eax"], [245, "mov rax, [rbp+var_8]"], [246, "lea rcx, [rax+3]"], [247, "mov rax, [rbp+var_20]"], [248, "add rax, rcx"], [249, "movzx eax, byte ptr [rax]"], [250, "movzx eax, al"], [251, "and eax, 3Fh"], [252, "or eax, edx"], [253, "mov [rbp+var_24], eax"], [254, "add [rbp+var_8], 4"], [255, "cmp [rbp+var_24], 0FFFFh"], [256, "ja short loc_409B0F"], [257, "add [rbp+var_14], 1"], [258, "jmp short loc_409B84"], [259, "cmp [rbp+var_38], 0"], [260, "jz short loc_409B44"], [261, "mov rax, [rbp+var_10]"], [262, "cmp rax, [rbp+var_40]"], [263, "jnb short loc_409B44"], [264, "mov eax, [rbp+var_24]"], [265, "sub eax, 10000h"], [266, "shr eax, 0Ah"], [267, "mov edx, eax"], [268, "mov rax, [rbp+var_10]"], [269, "lea rcx, [rax+rax]"], [270, "mov rax, [rbp+var_38]"], [271, "add rax, rcx"], [272, "or dx, 0D800h"], [273, "mov [rax], dx"], [274, "add [rbp+var_10], 1"], [275, "mov eax, [rbp+var_24]"], [276, "and ax, 3FFh"], [277, "or ax, 0DC00h"], [278, "mov [rbp+var_16], ax"], [279, "cmp [rbp+var_38], 0"], [280, "jz short loc_409B7F"], [281, "mov rax, [rbp+var_10]"], [282, "cmp rax, [rbp+var_40]"], [283, "jnb short loc_409B7F"], [284, "mov rax, [rbp+var_10]"], [285, "lea rdx, [rax+rax]"], [286, "mov rax, [rbp+var_38]"], [287, "add rdx, rax"], [288, "movzx eax, [rbp+var_16]"], [289, "mov [rdx], ax"], [290, "add [rbp+var_10], 1"], [291, "mov rax, [rbp+var_8]"], [292, "cmp rax, [rbp+var_50]"], [293, "jb loc_4097A5"], [294, "cmp [rbp+var_60], 0"], [295, "jz short loc_409BA2"], [296, "mov rax, [rbp+var_60]"], [297, "mov edx, [rbp+var_14]"], [298, "mov [rax], edx"], [299, "mov rax, [rbp+var_10]"], [300, "pop rbp"], [301, "retn"]], "data_dep": [[9, 4], [10, 9], [12, 11], [13, 12], [15, 10], [16, 74], [16, 176], [16, 54], [16, 13], [16, 147], [16, 254], [16, 114], [16, 216], [16, 94], [16, 23], [17, 15], [17, 16], [18, 17], [18, 273], [18, 289], [19, 18], [20, 19], [21, 176], [21, 54], [21, 13], [21, 147], [21, 254], [21, 114], [21, 216], [21, 94], [21, 23], [21, 74], [22, 273], [22, 21], [22, 15], [22, 289], [23, 22], [24, 10], [25, 24], [25, 21], [26, 25], [26, 289], [26, 273], [27, 26], [28, 27], [30, 6], [31, 30], [32, 31], [33, 32], [34, 147], [34, 254], [34, 114], [34, 216], [34, 94], [34, 23], [34, 74], [34, 176], [34, 54], [34, 13], [35, 34], [35, 5], [36, 35], [37, 147], [37, 254], [37, 114], [37, 216], [37, 94], [37, 23], [37, 74], [37, 176], [37, 54], [37, 13], [38, 273], [38, 15], [38, 289], [38, 37], [39, 10], [40, 39], [40, 38], [41, 289], [41, 40], [41, 273], [42, 41], [43, 42], [44, 43], [45, 44], [46, 10], [47, 23], [47, 13], [47, 74], [47, 176], [47, 54], [47, 147], [47, 254], [47, 114], [47, 216], [47, 94], [48, 47], [48, 46], [49, 273], [49, 48], [49, 289], [50, 49], [51, 50], [52, 23], [52, 13], [52, 74], [52, 176], [52, 54], [52, 147], [52, 254], [52, 114], [52, 216], [52, 94], [53, 52], [53, 289], [53, 46], [53, 273], [54, 53], [55, 10], [56, 52], [56, 55], [57, 273], [57, 56], [57, 289], [58, 57], [59, 58], [61, 10], [62, 74], [62, 176], [62, 54], [62, 147], [62, 254], [62, 114], [62, 216], [62, 94], [62, 23], [62, 13], [63, 61], [63, 62], [64, 289], [64, 63], [64, 273], [65, 64], [66, 65], [67, 10], [68, 13], [68, 74], [68, 176], [68, 54], [68, 147], [68, 254], [68, 114], [68, 216], [68, 94], [68, 23], [69, 67], [69, 68], [70, 273], [70, 289], [70, 69], [71, 70], [72, 71], [73, 217], [73, 73], [73, 257], [73, 95], [73, 117], [73, 183], [73, 148], [73, 8], [74, 23], [74, 13], [74, 74], [74, 176], [74, 54], [74, 147], [74, 254], [74, 114], [74, 216], [74, 94], [76, 10], [77, 94], [77, 74], [77, 176], [77, 23], [77, 13], [77, 254], [77, 216], [77, 54], [77, 147], [77, 114], [78, 77], [78, 76], [79, 289], [79, 78], [79, 273], [80, 79], [81, 80], [82, 23], [82, 13], [82, 74], [82, 176], [82, 54], [82, 147], [82, 254], [82, 114], [82, 216], [82, 94], [83, 5], [83, 82], [84, 83], [85, 176], [85, 23], [85, 13], [85, 74], [85, 54], [85, 147], [85, 254], [85, 114], [85, 216], [85, 94], [86, 76], [86, 85], [86, 289], [86, 273], [87, 10], [88, 86], [88, 87], [89, 273], [89, 289], [89, 88], [90, 89], [91, 90], [92, 91], [93, 92], [94, 254], [94, 114], [94, 216], [94, 94], [94, 23], [94, 13], [94, 74], [94, 176], [94, 54], [94, 147], [95, 148], [95, 8], [95, 217], [95, 73], [95, 257], [95, 95], [95, 117], [95, 183], [97, 10], [98, 176], [98, 23], [98, 13], [98, 254], [98, 216], [98, 54], [98, 147], [98, 114], [98, 94], [98, 74], [99, 98], [99, 97], [100, 273], [100, 99], [100, 289], [101, 100], [102, 101], [103, 102], [104, 103], [105, 54], [105, 147], [105, 254], [105, 114], [105, 216], [105, 94], [105, 176], [105, 23], [105, 13], [105, 74], [106, 269], [106, 246], [106, 273], [106, 106], [106, 105], [106, 168], [106, 289], [107, 10], [108, 107], [108, 106], [109, 289], [109, 273], [109, 108], [110, 109], [111, 110], [112, 111], [112, 104], [113, 112], [114, 254], [114, 114], [114, 216], [114, 54], [114, 147], [114, 94], [114, 74], [114, 176], [114, 23], [114, 13], [115, 113], [116, 115], [117, 148], [117, 8], [117, 217], [117, 73], [117, 183], [117, 257], [117, 95], [117, 117], [119, 10], [120, 176], [120, 23], [120, 13], [120, 74], [120, 54], [120, 147], [120, 254], [120, 114], [120, 216], [120, 94], [121, 119], [121, 120], [122, 289], [122, 121], [122, 273], [123, 122], [124, 123], [125, 5], [126, 125], [127, 54], [127, 147], [127, 114], [127, 216], [127, 126], [127, 94], [127, 74], [127, 176], [127, 23], [127, 13], [127, 254], [128, 127], [129, 94], [129, 74], [129, 176], [129, 23], [129, 13], [129, 254], [129, 114], [129, 216], [129, 54], [129, 147], [130, 273], [130, 119], [130, 289], [130, 129], [131, 10], [132, 131], [132, 130], [133, 273], [133, 132], [133, 289], [134, 133], [135, 134], [136, 135], [137, 136], [138, 216], [138, 54], [138, 147], [138, 114], [138, 94], [138, 74], [138, 176], [138, 23], [138, 13], [138, 254], [139, 130], [139, 273], [139, 138], [139, 289], [140, 10], [141, 140], [141, 139], [142, 289], [142, 273], [142, 141], [143, 142], [144, 143], [145, 144], [146, 145], [147, 176], [147, 23], [147, 13], [147, 147], [147, 254], [147, 114], [147, 216], [147, 54], [147, 94], [147, 74], [148, 257], [148, 117], [148, 148], [148, 8], [148, 217], [148, 73], [148, 95], [148, 183], [150, 10], [151, 94], [151, 74], [151, 176], [151, 23], [151, 13], [151, 147], [151, 254], [151, 114], [151, 216], [151, 54], [152, 151], [152, 150], [153, 289], [153, 152], [153, 273], [154, 153], [155, 154], [156, 155], [157, 216], [157, 54], [157, 94], [157, 74], [157, 176], [157, 23], [157, 13], [157, 147], [157, 254], [157, 114], [158, 289], [158, 157], [158, 273], [158, 150], [159, 10], [160, 159], [160, 158], [161, 289], [161, 273], [161, 160], [162, 161], [163, 162], [164, 163], [165, 156], [165, 164], [166, 165], [167, 94], [167, 74], [167, 176], [167, 23], [167, 13], [167, 147], [167, 254], [167, 114], [167, 216], [167, 54], [168, 165], [168, 289], [168, 167], [168, 273], [169, 10], [170, 169], [170, 168], [171, 273], [171, 170], [171, 289], [172, 171], [173, 172], [174, 166], [174, 173], [175, 174], [176, 114], [176, 216], [176, 54], [176, 94], [176, 74], [176, 176], [176, 23], [176, 13], [176, 147], [176, 254], [177, 175], [178, 177], [179, 175], [180, 179], [181, 180], [182, 181], [183, 117], [183, 148], [183, 8], [183, 217], [183, 73], [183, 95], [183, 183], [183, 257], [185, 5], [186, 185], [187, 114], [187, 216], [187, 54], [187, 94], [187, 74], [187, 186], [187, 176], [187, 23], [187, 13], [187, 147], [187, 254], [188, 187], [189, 94], [189, 74], [189, 176], [189, 23], [189, 13], [189, 147], [189, 254], [189, 114], [189, 216], [189, 54], [190, 119], [190, 189], [190, 289], [190, 273], [191, 10], [192, 191], [192, 190], [193, 273], [193, 192], [193, 289], [194, 193], [195, 194], [196, 195], [197, 196], [198, 114], [198, 216], [198, 54], [198, 94], [198, 74], [198, 176], [198, 23], [198, 13], [198, 147], [198, 254], [199, 190], [199, 273], [199, 198], [199, 289], [200, 10], [201, 199], [201, 200], [202, 273], [202, 201], [202, 289], [203, 202], [204, 203], [205, 204], [206, 205], [207, 74], [207, 176], [207, 23], [207, 54], [207, 13], [207, 147], [207, 254], [207, 114], [207, 216], [207, 94], [208, 289], [208, 199], [208, 273], [208, 207], [209, 10], [210, 209], [210, 208], [211, 289], [211, 210], [211, 273], [212, 211], [213, 212], [214, 213], [215, 214], [216, 94], [216, 74], [216, 176], [216, 23], [216, 13], [216, 147], [216, 254], [216, 114], [216, 216], [216, 54], [217, 217], [217, 73], [217, 95], [217, 183], [217, 257], [217, 117], [217, 148], [217, 8], [219, 10], [220, 147], [220, 254], [220, 114], [220, 216], [220, 54], [220, 94], [220, 74], [220, 176], [220, 23], [220, 13], [221, 219], [221, 220], [222, 289], [222, 273], [222, 221], [223, 222], [224, 223], [225, 224], [226, 225], [227, 94], [227, 74], [227, 176], [227, 23], [227, 54], [227, 13], [227, 147], [227, 254], [227, 114], [227, 216], [228, 168], [228, 289], [228, 246], [228, 106], [228, 227], [228, 269], [228, 273], [229, 10], [230, 229], [230, 228], [231, 273], [231, 230], [231, 289], [232, 231], [233, 232], [234, 233], [235, 226], [235, 234], [236, 114], [236, 216], [236, 54], [236, 94], [236, 74], [236, 176], [236, 23], [236, 13], [236, 147], [236, 254], [237, 273], [237, 236], [237, 289], [237, 228], [238, 10], [239, 238], [239, 237], [240, 273], [240, 239], [240, 289], [241, 240], [242, 241], [243, 242], [244, 243], [244, 235], [245, 74], [245, 176], [245, 54], [245, 13], [245, 147], [245, 254], [245, 114], [245, 216], [245, 94], [245, 23], [246, 289], [246, 237], [246, 273], [246, 245], [247, 10], [248, 247], [248, 246], [249, 289], [249, 273], [249, 248], [250, 249], [251, 250], [252, 251], [252, 244], [253, 252], [254, 23], [254, 94], [254, 74], [254, 176], [254, 54], [254, 13], [254, 147], [254, 254], [254, 114], [254, 216], [255, 253], [256, 255], [257, 257], [257, 117], [257, 217], [257, 73], [257, 148], [257, 8], [257, 95], [257, 183], [259, 2], [260, 259], [261, 11], [261, 290], [262, 261], [262, 3], [263, 262], [264, 253], [265, 264], [266, 265], [267, 266], [268, 290], [268, 11], [269, 273], [269, 268], [269, 289], [269, 246], [270, 2], [271, 270], [271, 269], [272, 267], [273, 272], [273, 271], [274, 290], [274, 11], [275, 253], [276, 275], [277, 276], [278, 277], [279, 2], [280, 279], [281, 274], [281, 11], [281, 290], [282, 3], [282, 281], [283, 282], [284, 11], [284, 274], [284, 290], [285, 272], [285, 244], [285, 104], [285, 24], [285, 289], [285, 284], [285, 55], [285, 166], [285, 273], [286, 2], [287, 285], [287, 286], [288, 28], [288, 113], [288, 59], [288, 175], [288, 278], [289, 287], [289, 288], [290, 274], [290, 290], [290, 11], [291, 54], [291, 13], [291, 147], [291, 254], [291, 114], [291, 216], [291, 94], [291, 23], [291, 74], [291, 176], [292, 5], [292, 291], [293, 292], [294, 7], [295, 294], [296, 7], [297, 217], [297, 73], [297, 148], [297, 8], [297, 95], [297, 183], [297, 257], [297, 117], [298, 297], [298, 296], [299, 11], [299, 290], [300, 0], [301, 299]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/f61ed8ef6ab5ad7275499f10ef94c8c2326a67232c2cc9190dbdb630ddbc2c7b_f61ed8ef6ab5ad7275499f10ef94c8c2326a67232c2cc9190dbdb630ddbc2c7b.jsonl.gz", "strip_func_name": "sub_409765", "query": "\n\n\nunsigned __int64 __fastcall sub_409765(__int64 a1, unsigned __int64 a2, __int64 a3, unsigned __int64 a4, char a5, _DWORD *a6)\n{\nunsigned __int64 v6; // rax\nunsigned __int64 v7; // rax\nunsigned int v9; // [rsp+3Ch] [rbp-24h]\nunsigned __int16 v10; // [rsp+4Ah] [rbp-16h]\nint v11; // [rsp+4Ch] [rbp-14h]\nunsigned __int64 v12; // [rsp+50h] [rbp-10h]\nunsigned __int64 v13; // [rsp+58h] [rbp-8h]\n\nv11 = 0;\nv12 = 0LL;\nv13 = 0LL;\nwhile ( v13 < a4 )\n{\nif ( *(char *)(a3 + v13) >= 0 )\n{\nv6 = v13++;\nv10 = *(unsigned __int8 *)(a3 + v6);\ngoto LABEL_37;\n}\nif ( (a5 & 3) != 0 && (v13 >= a4 || (*(_BYTE *)(v13 + 1 + a3) & 0xC0) != 128) && *(_BYTE *)(a3 + v13) > 0x9Fu )\n{\nv7 = v13++;\nv10 = *(unsigned __int8 *)(a3 + v7);\ngoto LABEL_37;\n}\nif ( *(_BYTE *)(a3 + v13) > 0xBFu && *(_BYTE *)(a3 + v13) <= 0xF4u )\n{\nif ( *(_BYTE *)(a3 + v13) > 0xDFu )\n{\nif ( *(_BYTE *)(a3 + v13) > 0xEFu )\n{\nif ( v13 < a4 - 3\n&& (*(_BYTE *)(v13 + 1 + a3) & 0xC0) == 128\n&& (*(_BYTE *)(v13 + 2 + a3) & 0xC0) == 128\n&& (*(_BYTE *)(v13 + 3 + a3) & 0xC0) == 128 )\n{\nv9 = (*(unsigned __int8 *)(v13 + 2 + a3) << 6) & 0xFC0 | (*(unsigned __int8 *)(v13 + 1 + a3) << 12) & 0x3F000 | (*(unsigned __int8 *)(a3 + v13) << 18) & 0xC0000 | *(_BYTE *)(v13 + 3 + a3) & 0x3F;\nv13 += 4LL;\nif ( v9 > 0xFFFF )\n{\nif ( a1 && v12 < a2 )\n*(_WORD *)(2 * v12 + a1) = ((v9 - 0x10000) >> 10) | 0xD800;\n++v12;\nv10 = v9 & 0x3FF | 0xDC00;\nLABEL_37:\nif ( a1 && v12 < a2 )\n*(_WORD *)(a1 + 2 * v12) = v10;\n++v12;\n}\nelse\n{\n++v11;\n}\n}\nelse\n{\n++v13;\n++v11;\n}\n}\nelse if ( v13 < a4 - 2 && (*(_BYTE *)(v13 + 1 + a3) & 0xC0) == 128 && (*(_BYTE *)(v13 + 2 + a3) & 0xC0) == 128 )\n{\nv10 = (*(unsigned __int8 *)(v13 + 1 + a3) << 6) & 0xFC0 | (*(unsigned __int8 *)(a3 + v13) << 12) | *(_BYTE *)(v13 + 2 + a3) & 0x3F;\nv13 += 3LL;\nif ( v10 > 0x7FFu && (v10 & 0xDF00) != 55296 )\ngoto LABEL_37;\n++v11;\n}\nelse\n{\n++v13;\n++v11;\n}\n}\nelse if ( v13 < a4 && (*(_BYTE *)(v13 + 1 + a3) & 0xC0) == 128 )\n{\nv10 = (*(unsigned __int8 *)(a3 + v13) << 6) & 0xFC0 | *(_BYTE *)(v13 + 1 + a3) & 0x3F;\nv13 += 2LL;\nif ( v10 > 0x7Fu )\ngoto LABEL_37;\n++v11;\n}\nelse\n{\n++v13;\n++v11;\n}\n}\nelse\n{\n++v11;\n++v13;\n}\n}\nif ( a6 )\n*a6 = v11;\nreturn v12;\n}\n\n\n\nQ:[a3,a4,a1,a2,a5,a6,v9,v10,v11,v12,v13,sub_409765,]", "hints": "[]", "response": "{'a3': 'src', 'a4': 'src_len', 'a1': 'dst', 'a2': 'dst_len', 'a5': 'flags', 'a6': 'errp', 'v9': 'cc', 'v10': 'c', 'v11': 'error', 'v12': 'dpos', 'v13': 'spos', 'sub_409765': 'utf8_to_utf16'}"}
[ [ 0.736554741859436, 0.7216984033584595, 0.7082322835922241, 0.7081046104431152, 0.7060797810554504, 0.7043324112892151, 0.7027061581611633, 0.6973254680633545, 0.6897745132446289, 0.6829317808151245, 0.6804940700531006, 0.6798242330551147, 0.6777547597885132, 0.6762441396713257, 0.676200270652771, 0.6720564365386963, 0.6677162051200867, 0.6658815145492554, 0.6648074388504028, 0.6640563011169434 ], [ 102038, 135746, 183627, 190123, 264647, 158675, 148110, 19819, 83902, 184887, 156235, 172860, 172438, 252712, 60838, 160032, 164285, 115262, 112335, 72682 ] ]
load_file
43c07aedb00eaf1f1b0c736cfcb29cace5e62b9f47e7269b70299d636b07d54f
begoon
i8080-core
NA
void load_file(const char* name, unsigned char* load_to) { FILE* f = fopen(name, "r+b"); int sz; if (!f) { fprintf(stderr, "Unable to open file \"%s\"\n", name); exit(1); } sz = 0; while (!feof(f)) { int const read = fread((void *)load_to, 1, 1024, f); if (read == 0) break; sz += read; load_to += read; } printf("\n*********************************\n"); printf("File \"%s\" loaded, size %d\n", name, sz); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40710E", "function_addr": 4223246, "binary_name": "43c07aedb00eaf1f1b0c736cfcb29cace5e62b9f47e7269b70299d636b07d54f.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 30h"], [3, "mov [rbp+filename], rdi"], [4, "mov [rbp+ptr], rsi"], [5, "mov rax, [rbp+filename]"], [6, "mov esi, offset modes"], [7, "mov rdi, rax"], [8, "call _fopen"], [9, "mov [rbp+stream], rax"], [10, "cmp [rbp+stream], 0"], [11, "jnz short loc_407161"], [12, "mov rax, cs:stderr"], [13, "mov rdx, [rbp+filename]"], [14, "mov esi, offset format"], [15, "mov rdi, rax"], [16, "mov eax, 0"], [17, "call _fprintf"], [18, "mov edi, 1"], [19, "call _exit"], [20, "mov [rbp+var_4], 0"], [21, "jmp short loc_40719F"], [22, "mov rdx, [rbp+stream]"], [23, "mov rax, [rbp+ptr]"], [24, "mov rcx, rdx"], [25, "mov edx, 400h"], [26, "mov esi, 1"], [27, "mov rdi, rax"], [28, "call _fread"], [29, "mov [rbp+var_14], eax"], [30, "cmp [rbp+var_14], 0"], [31, "jz short loc_4071B1"], [32, "mov eax, [rbp+var_14]"], [33, "add [rbp+var_4], eax"], [34, "mov eax, [rbp+var_14]"], [35, "cdqe"], [36, "add [rbp+ptr], rax"], [37, "mov rax, [rbp+stream]"], [38, "mov rdi, rax"], [39, "call _feof"], [40, "test eax, eax"], [41, "jz short loc_40716A"], [42, "jmp short loc_4071B2"], [43, "nop"], [44, "mov edi, offset s"], [45, "call _puts"], [46, "mov edx, [rbp+var_4]"], [47, "mov rax, [rbp+filename]"], [48, "mov rsi, rax"], [49, "mov edi, offset aFileSLoadedSiz"], [50, "mov eax, 0"], [51, "call _printf"], [52, "nop"], [53, "leave"], [54, "retn"]], "data_dep": [[5, 3], [7, 5], [9, 8], [10, 9], [11, 10], [13, 3], [15, 12], [22, 9], [23, 4], [23, 36], [24, 22], [27, 23], [29, 28], [30, 29], [31, 30], [32, 29], [33, 20], [33, 32], [33, 33], [34, 29], [36, 4], [36, 34], [36, 36], [37, 9], [38, 37], [40, 39], [41, 40], [46, 33], [46, 20], [47, 3], [48, 47], [54, 51]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/43c07aedb00eaf1f1b0c736cfcb29cace5e62b9f47e7269b70299d636b07d54f_43c07aedb00eaf1f1b0c736cfcb29cace5e62b9f47e7269b70299d636b07d54f.jsonl.gz", "strip_func_name": "sub_40710E", "query": "\n\n\nint __fastcall sub_40710E(const char *a1, char *a2)\n{\nint v4; // [rsp+1Ch] [rbp-14h]\nFILE *stream; // [rsp+20h] [rbp-10h]\nunsigned int v6; // [rsp+2Ch] [rbp-4h]\n\nstream = fopen(a1, \"r+b\");\nif ( !stream )\n{\nfprintf(stderr, \"Unable to open file \\\"%s\\\"\\n\", a1);\nexit(1);\n}\nv6 = 0;\nwhile ( !feof(stream) )\n{\nv4 = fread(a2, 1uLL, 0x400uLL, stream);\nif ( !v4 )\nbreak;\nv6 += v4;\na2 += v4;\n}\nputs(\"\\n*********************************\");\nreturn printf(\"File \\\"%s\\\" loaded, size %d\\n\", a1, v6);\n}\n\n\n\nQ:[a1,a2,v4,stream,v6,sub_40710E,]", "hints": "[]", "response": "{'a1': 'name', 'a2': 'load_to', 'v4': 'read', 'stream': 'f', 'v6': 'sz', 'sub_40710E': 'load_file'}"}
[ [ 0.8338678479194641, 0.7911597490310669, 0.7800928354263306, 0.7720048427581787, 0.7623245120048523, 0.762025773525238, 0.7613424062728882, 0.7611676454544067, 0.754075288772583, 0.7468896508216858, 0.7440983653068542, 0.7427850365638733, 0.7412405610084534, 0.7401643991470337, 0.7338928580284119, 0.7284931540489197, 0.7235372066497803, 0.7225151062011719, 0.7218667268753052, 0.7203863263130188 ], [ 139246, 149064, 120535, 138300, 31376, 198470, 152479, 78937, 240205, 34840, 50935, 202128, 167629, 226905, 221022, 247259, 195359, 214024, 164371, 225045 ] ]
bits_ref
db0ab7a0b8684e1cc9de62f82fa3c990f35ec686b14bca7a654d303686f98cbc
thanks4opensource
regbits
NA
__attribute__((noinline)) void bits_ref( const enum SERIAL_CONFIG *bit , const uint32_t *value) { SERIAL2->config.word = 0; switch (*bit) { case MODE: SERIAL2->config.mode = *value; SERIAL2->config.mode = *value; break; case POLARITY: SERIAL2->config.polarity = *value; SERIAL2->config.polarity = *value; break; case ENDIAN: SERIAL2->config.endian = *value; SERIAL2->config.endian = *value; break; default: break; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401E22", "function_addr": 4202018, "binary_name": "db0ab7a0b8684e1cc9de62f82fa3c990f35ec686b14bca7a654d303686f98cbc.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_8], rdi"], [3, "mov [rbp+var_10], rsi"], [4, "mov eax, 7002C0h"], [5, "mov dword ptr [rax+4], 0"], [6, "mov rax, [rbp+var_8]"], [7, "mov eax, [rax]"], [8, "cmp eax, 4"], [9, "jz short loc_401EA7"], [10, "cmp eax, 4"], [11, "ja loc_401F3B"], [12, "test eax, eax"], [13, "jz short loc_401E60"], [14, "cmp eax, 3"], [15, "jz loc_401EF1"], [16, "jmp loc_401F3B"], [17, "mov rax, [rbp+var_10]"], [18, "mov eax, [rax]"], [19, "mov edx, 7002C0h"], [20, "and eax, 1"], [21, "movzx eax, al"], [22, "and eax, 1"], [23, "mov ecx, eax"], [24, "mov eax, [rdx+4]"], [25, "and eax, 0FFFFFFFEh"], [26, "or eax, ecx"], [27, "mov [rdx+4], eax"], [28, "mov rax, [rbp+var_10]"], [29, "mov eax, [rax]"], [30, "mov edx, 7002C0h"], [31, "and eax, 1"], [32, "movzx eax, al"], [33, "and eax, 1"], [34, "mov ecx, eax"], [35, "mov eax, [rdx+4]"], [36, "and eax, 0FFFFFFFEh"], [37, "or eax, ecx"], [38, "mov [rdx+4], eax"], [39, "jmp loc_401F3C"], [40, "mov rax, [rbp+var_10]"], [41, "mov eax, [rax]"], [42, "mov edx, 7002C0h"], [43, "and eax, 1"], [44, "movzx eax, al"], [45, "and eax, 1"], [46, "shl eax, 6"], [47, "mov ecx, eax"], [48, "mov eax, [rdx+4]"], [49, "and eax, 0FFFFFFBFh"], [50, "or eax, ecx"], [51, "mov [rdx+4], eax"], [52, "mov rax, [rbp+var_10]"], [53, "mov eax, [rax]"], [54, "mov edx, 7002C0h"], [55, "and eax, 1"], [56, "movzx eax, al"], [57, "and eax, 1"], [58, "shl eax, 6"], [59, "mov ecx, eax"], [60, "mov eax, [rdx+4]"], [61, "and eax, 0FFFFFFBFh"], [62, "or eax, ecx"], [63, "mov [rdx+4], eax"], [64, "jmp short loc_401F3C"], [65, "mov rax, [rbp+var_10]"], [66, "mov eax, [rax]"], [67, "mov edx, 7002C0h"], [68, "and eax, 1"], [69, "movzx eax, al"], [70, "and eax, 1"], [71, "shl eax, 5"], [72, "mov ecx, eax"], [73, "mov eax, [rdx+4]"], [74, "and eax, 0FFFFFFDFh"], [75, "or eax, ecx"], [76, "mov [rdx+4], eax"], [77, "mov rax, [rbp+var_10]"], [78, "mov eax, [rax]"], [79, "mov edx, 7002C0h"], [80, "and eax, 1"], [81, "movzx eax, al"], [82, "and eax, 1"], [83, "shl eax, 5"], [84, "mov ecx, eax"], [85, "mov eax, [rdx+4]"], [86, "and eax, 0FFFFFFDFh"], [87, "or eax, ecx"], [88, "mov [rdx+4], eax"], [89, "jmp short loc_401F3C"], [90, "nop"], [91, "nop"], [92, "pop rbp"], [93, "retn"]], "data_dep": [[5, 4], [6, 2], [7, 5], [7, 6], [8, 7], [9, 8], [10, 7], [11, 10], [12, 7], [13, 12], [14, 12], [15, 14], [17, 3], [18, 17], [18, 5], [18, 27], [18, 38], [20, 18], [21, 20], [22, 21], [23, 22], [24, 19], [24, 5], [24, 27], [24, 38], [25, 24], [26, 23], [26, 25], [27, 26], [27, 19], [28, 3], [29, 27], [29, 28], [31, 29], [32, 31], [33, 32], [34, 33], [35, 30], [35, 27], [36, 35], [37, 34], [37, 36], [38, 37], [38, 30], [40, 3], [41, 40], [41, 51], [41, 5], [41, 63], [43, 41], [44, 43], [45, 44], [46, 45], [47, 46], [48, 63], [48, 42], [48, 51], [48, 5], [49, 48], [50, 47], [50, 49], [51, 50], [51, 42], [52, 3], [53, 52], [53, 51], [55, 53], [56, 55], [57, 56], [58, 57], [59, 58], [60, 54], [60, 51], [61, 60], [62, 59], [62, 61], [63, 54], [63, 62], [65, 3], [66, 5], [66, 88], [66, 65], [66, 76], [68, 66], [69, 68], [70, 69], [71, 70], [72, 71], [73, 67], [73, 76], [73, 5], [73, 88], [74, 73], [75, 72], [75, 74], [76, 67], [76, 75], [77, 3], [78, 77], [78, 76], [80, 78], [81, 80], [82, 81], [83, 82], [84, 83], [85, 79], [85, 76], [86, 85], [87, 84], [87, 86], [88, 79], [88, 87], [92, 0], [93, 62], [93, 37], [93, 12], [93, 87], [93, 7]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/db0ab7a0b8684e1cc9de62f82fa3c990f35ec686b14bca7a654d303686f98cbc_db0ab7a0b8684e1cc9de62f82fa3c990f35ec686b14bca7a654d303686f98cbc.jsonl.gz", "strip_func_name": "sub_401E22", "query": "\n\n\n__int64 __fastcall sub_401E22(unsigned int *a1, _DWORD *a2)\n{\n__int64 result; // rax\nint v3; // ecx\nint v4; // ecx\nint v5; // ecx\n\nMEMORY[0x7002C4] = 0;\nresult = *a1;\nif ( (_DWORD)result == 4 )\n{\nMEMORY[0x7002C4] = ((*a2 & 1) << 6) | MEMORY[0x7002C4] & 0xFFFFFFBF;\nv4 = (*a2 & 1) << 6;\nresult = v4 | MEMORY[0x7002C4] & 0xFFFFFFBF;\nMEMORY[0x7002C4] = v4 | MEMORY[0x7002C4] & 0xFFFFFFBF;\n}\nelse if ( (unsigned int)result <= 4 )\n{\nif ( (_DWORD)result )\n{\nif ( (_DWORD)result == 3 )\n{\nMEMORY[0x7002C4] = (32 * (*a2 & 1)) | MEMORY[0x7002C4] & 0xFFFFFFDF;\nv5 = 32 * (*a2 & 1);\nresult = v5 | MEMORY[0x7002C4] & 0xFFFFFFDF;\nMEMORY[0x7002C4] = v5 | MEMORY[0x7002C4] & 0xFFFFFFDF;\n}\n}\nelse\n{\nMEMORY[0x7002C4] = *a2 & 1 | MEMORY[0x7002C4] & 0xFFFFFFFE;\nv3 = *a2 & 1;\nresult = v3 | MEMORY[0x7002C4] & 0xFFFFFFFE;\nMEMORY[0x7002C4] = v3 | MEMORY[0x7002C4] & 0xFFFFFFFE;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_401E22,]", "hints": "[]", "response": "{'a1': 'bit', 'a2': 'value', 'sub_401E22': 'bits_ref'}"}
[ [ 0.8786479830741882, 0.8339424133300781, 0.8244296312332153, 0.8223997354507446, 0.8210666179656982, 0.8198036551475525, 0.8167089223861694, 0.8134979605674744, 0.8118414282798767, 0.7951127290725708, 0.7753199338912964, 0.7513419389724731, 0.7471001148223877, 0.7394897937774658, 0.7339826226234436, 0.7307848930358887, 0.7306936979293823, 0.7302358150482178, 0.7275220155715942, 0.7270539999008179 ], [ 81495, 233797, 110923, 140283, 113048, 183825, 82522, 249384, 26766, 221567, 195244, 249857, 146422, 45963, 41791, 258436, 155598, 10799, 79424, 238206 ] ]
dial
0fbc58241bca249679cdd25995b125d62bcff539de5a54707f26ed6c17c31db6
kieselsteini
cgo
NA
int dial(const char *host, const char *port, const char *selector) { struct addrinfo hints; struct addrinfo *res, *r; int srv = -1, l; char request[512]; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; if (getaddrinfo(host, port, &hints, &res) != 0) { fprintf(stderr, "error: cannot resolve hostname '%s:%s': %s\n", host, port, strerror(errno)); return -1; } for (r = res; r; r = r->ai_next) { srv = socket(r->ai_family, r->ai_socktype, r->ai_protocol); if (srv == -1) continue; if (connect(srv, r->ai_addr, r->ai_addrlen) == 0) break; close(srv); } freeaddrinfo(res); if (! r) { fprintf(stderr, "error: cannot connect to host '%s:%s'\n", host, port); return -1; } snprintf(request, sizeof(request), "%s\r\n", selector); l = strlen(request); if (write(srv, request, l) != l) { fprintf(stderr, "error: cannot complete request\n"); close(srv); return -1; } return srv; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4019F0", "function_addr": 4200944, "binary_name": "0fbc58241bca249679cdd25995b125d62bcff539de5a54707f26ed6c17c31db6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 270h"], [3, "mov [rbp+name], rdi"], [4, "mov [rbp+service], rsi"], [5, "mov [rbp+var_268], rdx"], [6, "mov [rbp+fd], 0FFFFFFFFh"], [7, "lea rax, [rbp+s]"], [8, "mov edx, 30h "], [9, "mov esi, 0"], [10, "mov rdi, rax"], [11, "call _memset"], [12, "mov [rbp+var_3C], 0"], [13, "mov [rbp+var_38], 1"], [14, "lea rcx, [rbp+pai]"], [15, "lea rdx, [rbp+s]"], [16, "mov rsi, [rbp+service]"], [17, "mov rax, [rbp+name]"], [18, "mov rdi, rax"], [19, "call _getaddrinfo"], [20, "test eax, eax"], [21, "jz short loc_401AA2"], [22, "call ___errno_location"], [23, "mov eax, [rax]"], [24, "mov edi, eax"], [25, "call _strerror"], [26, "mov rsi, rax"], [27, "mov rax, cs:stderr"], [28, "mov rcx, [rbp+service]"], [29, "mov rdx, [rbp+name]"], [30, "mov r8, rsi"], [31, "mov esi, offset aErrorCannotRes"], [32, "mov rdi, rax"], [33, "mov eax, 0"], [34, "call _fprintf"], [35, "mov eax, 0FFFFFFFFh"], [36, "jmp locret_401BEB"], [37, "mov rax, [rbp+pai]"], [38, "mov [rbp+var_8], rax"], [39, "jmp short loc_401B0C"], [40, "mov rax, [rbp+var_8]"], [41, "mov edx, [rax+0Ch]"], [42, "mov rax, [rbp+var_8]"], [43, "mov ecx, [rax+8]"], [44, "mov rax, [rbp+var_8]"], [45, "mov eax, [rax+4]"], [46, "mov esi, ecx"], [47, "mov edi, eax"], [48, "call _socket"], [49, "mov [rbp+fd], eax"], [50, "cmp [rbp+fd], 0FFFFFFFFh"], [51, "jz short loc_401AFF"], [52, "mov rax, [rbp+var_8]"], [53, "mov edx, [rax+10h]"], [54, "mov rax, [rbp+var_8]"], [55, "mov rcx, [rax+18h]"], [56, "mov eax, [rbp+fd]"], [57, "mov rsi, rcx"], [58, "mov edi, eax"], [59, "call _connect"], [60, "test eax, eax"], [61, "jz short loc_401B15"], [62, "mov eax, [rbp+fd]"], [63, "mov edi, eax"], [64, "call _close"], [65, "jmp short loc_401B00"], [66, "nop"], [67, "mov rax, [rbp+var_8]"], [68, "mov rax, [rax+28h]"], [69, "mov [rbp+var_8], rax"], [70, "cmp [rbp+var_8], 0"], [71, "jnz short loc_401AAC"], [72, "jmp short loc_401B16"], [73, "nop"], [74, "mov rax, [rbp+pai]"], [75, "mov rdi, rax"], [76, "call _freeaddrinfo"], [77, "cmp [rbp+var_8], 0"], [78, "jnz short loc_401B5A"], [79, "mov rax, cs:stderr"], [80, "mov rcx, [rbp+service]"], [81, "mov rdx, [rbp+name]"], [82, "mov esi, offset aErrorCannotCon"], [83, "mov rdi, rax"], [84, "mov eax, 0"], [85, "call _fprintf"], [86, "mov eax, 0FFFFFFFFh"], [87, "jmp locret_401BEB"], [88, "mov rdx, [rbp+var_268]"], [89, "lea rax, [rbp+buf]"], [90, "mov rcx, rdx"], [91, "mov edx, offset aS_0"], [92, "mov esi, 200h"], [93, "mov rdi, rax"], [94, "mov eax, 0"], [95, "call _snprintf"], [96, "lea rax, [rbp+buf]"], [97, "mov rdi, rax"], [98, "call _strlen"], [99, "mov [rbp+var_10], eax"], [100, "mov eax, [rbp+var_10]"], [101, "movsxd rdx, eax"], [102, "lea rcx, [rbp+buf]"], [103, "mov eax, [rbp+fd]"], [104, "mov rsi, rcx"], [105, "mov edi, eax"], [106, "call _write"], [107, "mov edx, [rbp+var_10]"], [108, "movsxd rdx, edx"], [109, "cmp rax, rdx"], [110, "jz short loc_401BE8"], [111, "mov rax, cs:stderr"], [112, "mov rcx, rax"], [113, "mov edx, 1Fh"], [114, "mov esi, 1"], [115, "mov edi, offset aErrorCannotCom"], [116, "call _fwrite"], [117, "mov eax, [rbp+fd]"], [118, "mov edi, eax"], [119, "call _close"], [120, "mov eax, 0FFFFFFFFh"], [121, "jmp short locret_401BEB"], [122, "mov eax, [rbp+fd]"], [123, "leave"], [124, "retn"]], "data_dep": [[10, 7], [15, 8], [16, 4], [17, 3], [18, 17], [20, 19], [21, 20], [23, 22], [24, 23], [26, 25], [28, 4], [29, 3], [30, 26], [32, 27], [38, 37], [40, 38], [40, 69], [41, 40], [42, 38], [42, 69], [43, 42], [44, 38], [44, 69], [45, 44], [46, 43], [47, 45], [49, 48], [50, 49], [51, 50], [52, 69], [52, 38], [53, 52], [54, 69], [54, 38], [55, 54], [56, 49], [57, 55], [58, 56], [60, 59], [61, 60], [62, 49], [63, 62], [67, 38], [67, 69], [68, 67], [69, 68], [70, 38], [70, 69], [71, 70], [75, 74], [77, 69], [77, 38], [78, 77], [80, 4], [81, 3], [83, 79], [88, 5], [89, 76], [90, 88], [93, 89], [96, 95], [97, 96], [99, 98], [100, 99], [101, 100], [102, 90], [103, 49], [103, 6], [104, 102], [105, 103], [107, 99], [108, 107], [109, 106], [109, 108], [110, 109], [112, 111], [117, 6], [117, 49], [118, 117], [122, 49], [122, 6], [124, 120], [124, 122], [124, 35], [124, 86]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/0fbc58241bca249679cdd25995b125d62bcff539de5a54707f26ed6c17c31db6_0fbc58241bca249679cdd25995b125d62bcff539de5a54707f26ed6c17c31db6.jsonl.gz", "strip_func_name": "sub_4019F0", "query": "\n\n\n__int64 __fastcall sub_4019F0(const char *a1, const char *a2, const char *a3)\n{\nint *v3; // rax\nchar *v4; // rax\n__int64 result; // rax\nssize_t v6; // rax\nchar buf[520]; // [rsp+20h] [rbp-250h] BYREF\nstruct addrinfo *pai; // [rsp+228h] [rbp-48h] BYREF\nstruct addrinfo s; // [rsp+230h] [rbp-40h] BYREF\nint v11; // [rsp+260h] [rbp-10h]\nint fd; // [rsp+264h] [rbp-Ch]\nstruct addrinfo *i; // [rsp+268h] [rbp-8h]\n\nfd = -1;\nmemset(&s, 0, sizeof(s));\ns.ai_family = 0;\ns.ai_socktype = 1;\nif ( getaddrinfo(a1, a2, &s, &pai) )\n{\nv3 = __errno_location();\nv4 = strerror(*v3);\nfprintf(stderr, \"error: cannot resolve hostname '%s:%s': %s\\n\", a1, a2, v4);\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\nfor ( i = pai; i; i = i->ai_next )\n{\nfd = socket(i->ai_family, i->ai_socktype, i->ai_protocol);\nif ( fd != -1 )\n{\nif ( !connect(fd, i->ai_addr, i->ai_addrlen) )\nbreak;\nclose(fd);\n}\n}\nfreeaddrinfo(pai);\nif ( i )\n{\nsnprintf(buf, 0x200uLL, \"%s\\r\\n\", a3);\nv11 = strlen(buf);\nv6 = write(fd, buf, v11);\nif ( v6 == v11 )\n{\nresult = (unsigned int)fd;\n}\nelse\n{\nfwrite(\"error: cannot complete request\\n\", 1uLL, 0x1FuLL, stderr);\nclose(fd);\nresult = 0xFFFFFFFFLL;\n}\n}\nelse\n{\nfprintf(stderr, \"error: cannot connect to host '%s:%s'\\n\", a1, a2);\nresult = 0xFFFFFFFFLL;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,buf,pai,s,v11,fd,i,sub_4019F0,]", "hints": "[]", "response": "{'a3': 'selector', 'a1': 'host', 'a2': 'port', 'buf': 'request', 'pai': 'res', 's': 'hints', 'v11': 'l', 'fd': 'srv', 'i': 'r', 'sub_4019F0': 'dial'}"}
[ [ 0.8005456328392029, 0.7765570878982544, 0.771251916885376, 0.767074465751648, 0.7436594367027283, 0.7396881580352783, 0.7375365495681763, 0.7335714101791382, 0.7301290035247803, 0.7266127467155457, 0.726161003112793, 0.7252570390701294, 0.7242791652679443, 0.7203155755996704, 0.7167350053787231, 0.7136854529380798, 0.7116262912750244, 0.7072082757949829, 0.7017155885696411, 0.700934648513794 ], [ 103130, 126284, 187950, 158749, 199460, 8434, 134335, 224877, 160722, 27675, 14528, 157840, 18986, 105102, 212227, 20199, 153475, 14296, 64964, 164432 ] ]
bits_val
db0ab7a0b8684e1cc9de62f82fa3c990f35ec686b14bca7a654d303686f98cbc
thanks4opensource
regbits
NA
__attribute__((noinline)) void bits_val( const enum SERIAL_CONFIG bit , const uint32_t value) { SERIAL2->config.word = 0; switch (bit) { case MODE: SERIAL2->config.mode = value; SERIAL2->config.mode = value; break; case POLARITY: SERIAL2->config.polarity = value; SERIAL2->config.polarity = value; break; case ENDIAN: SERIAL2->config.endian = value; SERIAL2->config.endian = value; break; default: break; } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401C7F", "function_addr": 4201599, "binary_name": "db0ab7a0b8684e1cc9de62f82fa3c990f35ec686b14bca7a654d303686f98cbc.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_4], edi"], [3, "mov [rbp+var_8], esi"], [4, "mov eax, 7002C0h"], [5, "mov dword ptr [rax+4], 0"], [6, "cmp [rbp+var_4], 4"], [7, "jz short loc_401CFB"], [8, "cmp [rbp+var_4], 4"], [9, "ja loc_401D83"], [10, "cmp [rbp+var_4], 0"], [11, "jz short loc_401CBA"], [12, "cmp [rbp+var_4], 3"], [13, "jz loc_401D3F"], [14, "jmp loc_401D83"], [15, "mov edx, 7002C0h"], [16, "mov eax, [rbp+var_8]"], [17, "and eax, 1"], [18, "movzx eax, al"], [19, "and eax, 1"], [20, "mov ecx, eax"], [21, "mov eax, [rdx+4]"], [22, "and eax, 0FFFFFFFEh"], [23, "or eax, ecx"], [24, "mov [rdx+4], eax"], [25, "mov edx, 7002C0h"], [26, "mov eax, [rbp+var_8]"], [27, "and eax, 1"], [28, "movzx eax, al"], [29, "and eax, 1"], [30, "mov ecx, eax"], [31, "mov eax, [rdx+4]"], [32, "and eax, 0FFFFFFFEh"], [33, "or eax, ecx"], [34, "mov [rdx+4], eax"], [35, "jmp loc_401D84"], [36, "mov edx, 7002C0h"], [37, "mov eax, [rbp+var_8]"], [38, "and eax, 1"], [39, "movzx eax, al"], [40, "and eax, 1"], [41, "shl eax, 6"], [42, "mov ecx, eax"], [43, "mov eax, [rdx+4]"], [44, "and eax, 0FFFFFFBFh"], [45, "or eax, ecx"], [46, "mov [rdx+4], eax"], [47, "mov edx, 7002C0h"], [48, "mov eax, [rbp+var_8]"], [49, "and eax, 1"], [50, "movzx eax, al"], [51, "and eax, 1"], [52, "shl eax, 6"], [53, "mov ecx, eax"], [54, "mov eax, [rdx+4]"], [55, "and eax, 0FFFFFFBFh"], [56, "or eax, ecx"], [57, "mov [rdx+4], eax"], [58, "jmp short loc_401D84"], [59, "mov edx, 7002C0h"], [60, "mov eax, [rbp+var_8]"], [61, "and eax, 1"], [62, "movzx eax, al"], [63, "and eax, 1"], [64, "shl eax, 5"], [65, "mov ecx, eax"], [66, "mov eax, [rdx+4]"], [67, "and eax, 0FFFFFFDFh"], [68, "or eax, ecx"], [69, "mov [rdx+4], eax"], [70, "mov edx, 7002C0h"], [71, "mov eax, [rbp+var_8]"], [72, "and eax, 1"], [73, "movzx eax, al"], [74, "and eax, 1"], [75, "shl eax, 5"], [76, "mov ecx, eax"], [77, "mov eax, [rdx+4]"], [78, "and eax, 0FFFFFFDFh"], [79, "or eax, ecx"], [80, "mov [rdx+4], eax"], [81, "jmp short loc_401D84"], [82, "nop"], [83, "nop"], [84, "pop rbp"], [85, "retn"]], "data_dep": [[5, 4], [6, 2], [7, 6], [8, 2], [9, 8], [10, 2], [11, 10], [12, 2], [13, 12], [16, 3], [17, 16], [18, 17], [19, 18], [20, 19], [21, 34], [21, 15], [21, 24], [21, 5], [22, 21], [23, 20], [23, 22], [24, 23], [24, 15], [26, 3], [27, 26], [28, 27], [29, 28], [30, 29], [31, 24], [31, 25], [32, 31], [33, 30], [33, 32], [34, 25], [34, 33], [37, 3], [38, 37], [39, 38], [40, 39], [41, 40], [42, 41], [43, 46], [43, 5], [43, 57], [43, 36], [44, 43], [45, 42], [45, 44], [46, 36], [46, 45], [48, 3], [49, 48], [50, 49], [51, 50], [52, 51], [53, 52], [54, 46], [54, 47], [55, 54], [56, 53], [56, 55], [57, 47], [57, 56], [60, 3], [61, 60], [62, 61], [63, 62], [64, 63], [65, 64], [66, 5], [66, 69], [66, 80], [66, 59], [67, 66], [68, 65], [68, 67], [69, 59], [69, 68], [71, 3], [72, 71], [73, 72], [74, 73], [75, 74], [76, 75], [77, 69], [77, 70], [78, 77], [79, 76], [79, 78], [80, 70], [80, 79], [84, 0], [85, 4], [85, 79], [85, 56], [85, 33]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/db0ab7a0b8684e1cc9de62f82fa3c990f35ec686b14bca7a654d303686f98cbc_db0ab7a0b8684e1cc9de62f82fa3c990f35ec686b14bca7a654d303686f98cbc.jsonl.gz", "strip_func_name": "sub_401C7F", "query": "\n\n\n__int64 __fastcall sub_401C7F(unsigned int a1, char a2)\n{\n__int64 result; // rax\nint v3; // ecx\nint v4; // ecx\nint v5; // ecx\n\nresult = 7340736LL;\nMEMORY[0x7002C4] = 0;\nif ( a1 == 4 )\n{\nMEMORY[0x7002C4] = ((a2 & 1) << 6) | MEMORY[0x7002C4] & 0xFFFFFFBF;\nv4 = (a2 & 1) << 6;\nresult = v4 | MEMORY[0x7002C4] & 0xFFFFFFBF;\nMEMORY[0x7002C4] = v4 | MEMORY[0x7002C4] & 0xFFFFFFBF;\n}\nelse if ( a1 <= 4 )\n{\nif ( a1 )\n{\nif ( a1 == 3 )\n{\nMEMORY[0x7002C4] = (32 * (a2 & 1)) | MEMORY[0x7002C4] & 0xFFFFFFDF;\nv5 = 32 * (a2 & 1);\nresult = v5 | MEMORY[0x7002C4] & 0xFFFFFFDF;\nMEMORY[0x7002C4] = v5 | MEMORY[0x7002C4] & 0xFFFFFFDF;\n}\n}\nelse\n{\nMEMORY[0x7002C4] = a2 & 1 | MEMORY[0x7002C4] & 0xFFFFFFFE;\nv3 = a2 & 1;\nresult = v3 | MEMORY[0x7002C4] & 0xFFFFFFFE;\nMEMORY[0x7002C4] = v3 | MEMORY[0x7002C4] & 0xFFFFFFFE;\n}\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,sub_401C7F,]", "hints": "[]", "response": "{'a1': 'bit', 'a2': 'value', 'sub_401C7F': 'bits_val'}"}
[ [ 0.8119586706161499, 0.7707862257957458, 0.7673341631889343, 0.7545182704925537, 0.7351499795913696, 0.7350441813468933, 0.7314135432243347, 0.7282418608665466, 0.726844310760498, 0.726237416267395, 0.7187343239784241, 0.7130535840988159, 0.7117708325386047, 0.707912802696228, 0.7072937488555908, 0.7063334584236145, 0.7058924436569214, 0.7037513256072998, 0.7037267684936523, 0.702411949634552 ], [ 124655, 23170, 143900, 201852, 211743, 69415, 230963, 239095, 110483, 10061, 215142, 165483, 39050, 138706, 258718, 217683, 123390, 215897, 206844, 108175 ] ]
parse_string
f1453469e52c8b05368fa3f43fd36f30545becdf49a46b3747cb8d6df8025528
aliyun
iotkit-embedded
NA
static int parse_string(lite_cjson_t *const item, parse_buffer *const input_buffer) { const unsigned char *input_pointer = buffer_at_offset(input_buffer) + 1; const unsigned char *input_end = buffer_at_offset(input_buffer) + 1; /* unsigned char *output_pointer = NULL; */ /* unsigned char *output = NULL; */ /* not a string */ if (buffer_at_offset(input_buffer)[0] != '\"') { /* printf("not a string"); */ goto fail; } { /* calculate approximate size of the output (overestimate) */ /* int allocation_length = 0; */ int skipped_bytes = 0; while (((int)(input_end - input_buffer->content) < input_buffer->length) && (*input_end != '\"')) { /* is escape sequence */ if (input_end[0] == '\\') { if ((int)(input_end + 1 - input_buffer->content) >= input_buffer->length) { /* prevent buffer overflow when last input character is a backslash */ goto fail; } skipped_bytes++; input_end++; } input_end++; } if (((int)(input_end - input_buffer->content) >= input_buffer->length) || (*input_end != '\"')) { /* printf("end error\n"); */ goto fail; /* string ended unexpectedly */ } #if 0 /* This is at most how much we need for the output */ allocation_length = (int)(input_end - buffer_at_offset(input_buffer)) - skipped_bytes; output = (unsigned char *)input_buffer->hooks.allocate(allocation_length + sizeof("")); if (output == NULL) { goto fail; /* allocation failure */ } #endif } #if 0 output_pointer = output; /* loop through the string literal */ while (input_pointer < input_end) { if (*input_pointer != '\\') { *output_pointer++ = *input_pointer++; } /* escape sequence */ else { unsigned char sequence_length = 2; if ((input_end - input_pointer) < 1) { goto fail; } switch (input_pointer[1]) { case 'b': *output_pointer++ = '\b'; break; case 'f': *output_pointer++ = '\f'; break; case 'n': *output_pointer++ = '\n'; break; case 'r': *output_pointer++ = '\r'; break; case 't': *output_pointer++ = '\t'; break; case '\"': case '\\': case '/': *output_pointer++ = input_pointer[1]; break; /* UTF-16 literal */ case 'u': sequence_length = utf16_literal_to_utf8(input_pointer, input_end, &output_pointer); if (sequence_length == 0) { /* failed to convert UTF16-literal to UTF-8 */ goto fail; } break; default: goto fail; } input_pointer += sequence_length; } } /* zero terminate the output */ *output_pointer = '\0'; #endif item->type = cJSON_String; item->value = (char *)input_pointer; item->value_length = input_end - input_pointer; input_buffer->offset = (int)(input_end - input_buffer->content); input_buffer->offset++; return 0; fail: #if 0 if (output != NULL) { input_buffer->hooks.deallocate(output); } #endif if (input_pointer != NULL) { input_buffer->offset = (int)(input_pointer - input_buffer->content); } return -1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_419E70", "function_addr": 4300400, "binary_name": "f1453469e52c8b05368fa3f43fd36f30545becdf49a46b3747cb8d6df8025528.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov [rbp+var_28], rdi"], [3, "mov [rbp+var_30], rsi"], [4, "mov rax, [rbp+var_30]"], [5, "mov rdx, [rax]"], [6, "mov rax, [rbp+var_30]"], [7, "mov eax, [rax+0Ch]"], [8, "cdqe"], [9, "add rax, 1"], [10, "add rax, rdx"], [11, "mov [rbp+var_18], rax"], [12, "mov rax, [rbp+var_30]"], [13, "mov rdx, [rax]"], [14, "mov rax, [rbp+var_30]"], [15, "mov eax, [rax+0Ch]"], [16, "cdqe"], [17, "add rax, 1"], [18, "add rax, rdx"], [19, "mov [rbp+var_8], rax"], [20, "mov rax, [rbp+var_30]"], [21, "mov rdx, [rax]"], [22, "mov rax, [rbp+var_30]"], [23, "mov eax, [rax+0Ch]"], [24, "cdqe"], [25, "add rax, rdx"], [26, "movzx eax, byte ptr [rax]"], [27, "cmp al, 22h "], [28, "jnz loc_419FBA"], [29, "mov [rbp+var_C], 0"], [30, "jmp short loc_419F18"], [31, "mov rax, [rbp+var_8]"], [32, "movzx eax, byte ptr [rax]"], [33, "cmp al, 5Ch "], [34, "jnz short loc_419F13"], [35, "mov rax, [rbp+var_8]"], [36, "lea rdx, [rax+1]"], [37, "mov rax, [rbp+var_30]"], [38, "mov rcx, [rax]"], [39, "mov rax, rdx"], [40, "sub rax, rcx"], [41, "mov edx, eax"], [42, "mov rax, [rbp+var_30]"], [43, "mov eax, [rax+8]"], [44, "cmp edx, eax"], [45, "jge loc_419FBD"], [46, "add [rbp+var_C], 1"], [47, "add [rbp+var_8], 1"], [48, "add [rbp+var_8], 1"], [49, "mov rax, [rbp+var_30]"], [50, "mov rdx, [rax]"], [51, "mov rax, [rbp+var_8]"], [52, "sub rax, rdx"], [53, "mov edx, eax"], [54, "mov rax, [rbp+var_30]"], [55, "mov eax, [rax+8]"], [56, "cmp edx, eax"], [57, "jge short loc_419F3E"], [58, "mov rax, [rbp+var_8]"], [59, "movzx eax, byte ptr [rax]"], [60, "cmp al, 22h "], [61, "jnz short loc_419ED9"], [62, "mov rax, [rbp+var_30]"], [63, "mov rdx, [rax]"], [64, "mov rax, [rbp+var_8]"], [65, "sub rax, rdx"], [66, "mov edx, eax"], [67, "mov rax, [rbp+var_30]"], [68, "mov eax, [rax+8]"], [69, "cmp edx, eax"], [70, "jge short loc_419FC0"], [71, "mov rax, [rbp+var_8]"], [72, "movzx eax, byte ptr [rax]"], [73, "cmp al, 22h "], [74, "jnz short loc_419FC0"], [75, "mov rax, [rbp+var_28]"], [76, "mov dword ptr [rax], 10h"], [77, "mov rax, [rbp+var_28]"], [78, "mov rdx, [rbp+var_18]"], [79, "mov [rax+8], rdx"], [80, "mov rax, [rbp+var_8]"], [81, "sub rax, [rbp+var_18]"], [82, "mov edx, eax"], [83, "mov rax, [rbp+var_28]"], [84, "mov [rax+10h], edx"], [85, "mov rax, [rbp+var_30]"], [86, "mov rdx, [rax]"], [87, "mov rax, [rbp+var_8]"], [88, "sub rax, rdx"], [89, "mov edx, eax"], [90, "mov rax, [rbp+var_30]"], [91, "mov [rax+0Ch], edx"], [92, "mov rax, [rbp+var_30]"], [93, "mov eax, [rax+0Ch]"], [94, "lea edx, [rax+1]"], [95, "mov rax, [rbp+var_30]"], [96, "mov [rax+0Ch], edx"], [97, "mov eax, 0"], [98, "jmp short loc_419FE4"], [99, "nop"], [100, "jmp short loc_419FC1"], [101, "nop"], [102, "jmp short loc_419FC1"], [103, "nop"], [104, "cmp [rbp+var_18], 0"], [105, "jz short loc_419FDF"], [106, "mov rax, [rbp+var_30]"], [107, "mov rdx, [rax]"], [108, "mov rax, [rbp+var_18]"], [109, "sub rax, rdx"], [110, "mov edx, eax"], [111, "mov rax, [rbp+var_30]"], [112, "mov [rax+0Ch], edx"], [113, "mov eax, 0FFFFFFFFh"], [114, "pop rbp"], [115, "retn"]], "data_dep": [[4, 3], [5, 4], [6, 3], [7, 6], [9, 7], [10, 5], [10, 9], [11, 10], [12, 3], [13, 12], [14, 3], [15, 14], [17, 15], [18, 17], [18, 13], [19, 18], [20, 3], [21, 20], [22, 3], [23, 22], [25, 23], [25, 21], [26, 25], [27, 26], [28, 27], [31, 19], [31, 48], [32, 31], [33, 32], [34, 33], [35, 19], [35, 48], [36, 53], [36, 35], [37, 3], [38, 37], [39, 36], [40, 38], [40, 39], [41, 40], [42, 3], [43, 42], [44, 41], [44, 43], [45, 44], [46, 29], [46, 46], [47, 48], [47, 19], [48, 47], [48, 19], [48, 48], [49, 3], [50, 49], [51, 19], [51, 48], [52, 51], [52, 50], [53, 52], [54, 3], [55, 54], [56, 53], [56, 55], [57, 56], [58, 19], [58, 48], [59, 58], [60, 59], [61, 60], [62, 3], [63, 62], [64, 48], [64, 19], [65, 63], [65, 64], [66, 65], [67, 3], [68, 67], [69, 66], [69, 68], [70, 69], [71, 19], [71, 48], [72, 71], [73, 72], [74, 73], [75, 2], [76, 75], [77, 2], [78, 11], [79, 78], [79, 77], [80, 19], [80, 48], [81, 80], [81, 11], [82, 81], [83, 2], [84, 83], [84, 82], [85, 3], [86, 76], [86, 85], [86, 84], [87, 48], [87, 19], [88, 86], [88, 87], [89, 88], [90, 3], [91, 89], [91, 90], [92, 3], [93, 92], [93, 91], [94, 89], [94, 91], [94, 93], [95, 3], [96, 95], [96, 94], [104, 11], [105, 104], [106, 3], [107, 106], [108, 11], [109, 108], [109, 107], [110, 109], [111, 3], [112, 111], [112, 110], [114, 0], [115, 113], [115, 97]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/f1453469e52c8b05368fa3f43fd36f30545becdf49a46b3747cb8d6df8025528_f1453469e52c8b05368fa3f43fd36f30545becdf49a46b3747cb8d6df8025528.jsonl.gz", "strip_func_name": "sub_419E70", "query": "\n\n\n__int64 __fastcall sub_419E70(__int64 a1, __int64 a2)\n{\n__int64 result; // rax\n__int64 v3; // [rsp+18h] [rbp-18h]\nint v4; // [rsp+24h] [rbp-Ch]\n_BYTE *v5; // [rsp+28h] [rbp-8h]\n\nv3 = *(_QWORD *)a2 + *(int *)(a2 + 12) + 1LL;\nv5 = (_BYTE *)v3;\nif ( *(_BYTE *)(*(_QWORD *)a2 + *(int *)(a2 + 12)) != 34 )\ngoto LABEL_12;\nv4 = 0;\nwhile ( (signed int)((_DWORD)v5 - *(_QWORD *)a2) < *(_DWORD *)(a2 + 8) && *v5 != 34 )\n{\nif ( *v5 == 92 )\n{\nif ( (signed int)((_DWORD)v5 + 1 - *(_QWORD *)a2) >= *(_DWORD *)(a2 + 8) )\ngoto LABEL_12;\n++v4;\n++v5;\n}\n++v5;\n}\nif ( (signed int)((_DWORD)v5 - *(_QWORD *)a2) < *(_DWORD *)(a2 + 8) && *v5 == 34 )\n{\n*(_DWORD *)a1 = 16;\n*(_QWORD *)(a1 + 8) = v3;\n*(_DWORD *)(a1 + 16) = (_DWORD)v5 - v3;\n*(_DWORD *)(a2 + 12) = (_DWORD)v5 - *(_DWORD *)a2;\n++*(_DWORD *)(a2 + 12);\nresult = 0LL;\n}\nelse\n{\nLABEL_12:\nif ( v3 )\n*(_DWORD *)(a2 + 12) = v3 - *(_DWORD *)a2;\nresult = 0xFFFFFFFFLL;\n}\nreturn result;\n}\n\n\n\nQ:[a1,a2,v3,v4,v5,sub_419E70,]", "hints": "[]", "response": "{'a1': 'item', 'a2': 'input_buffer', 'v3': 'input_pointer', 'v4': 'skipped_bytes', 'v5': 'input_end', 'sub_419E70': 'parse_string_0'}"}
[ [ 0.7526399493217468, 0.724602997303009, 0.7191512584686279, 0.7165697813034058, 0.7152129411697388, 0.7146848440170288, 0.7019572854042053, 0.7017509937286377, 0.6996710300445557, 0.6980679035186768, 0.6960443258285522, 0.6958772540092468, 0.6904230117797852, 0.6854487657546997, 0.6853024959564209, 0.6826997995376587, 0.6810387372970581, 0.6792861223220825, 0.6777184009552002, 0.6763275861740112 ], [ 2079, 69872, 2221, 18661, 115693, 7722, 217223, 36474, 247532, 72157, 159149, 89416, 8218, 224066, 199730, 7091, 69721, 168476, 8488, 212842 ] ]
strbuf_appendf
7fc81bc5e05805462160f0f7e72ba32357f81d09a102ced059628d2f6c88ce53
kgabis
ape
NA
bool strbuf_appendf(strbuf_t *buf, const char *fmt, ...) { if (buf->failed) { return false; } va_list args; va_start(args, fmt); int to_write = vsnprintf(NULL, 0, fmt, args); va_end(args); if (to_write == 0) { return true; } size_t required_capacity = buf->len + to_write + 1; if (required_capacity > buf->capacity) { bool ok = strbuf_grow(buf, required_capacity * 2); if (!ok) { return false; } } va_start(args, fmt); int written = vsprintf(buf->data + buf->len, fmt, args); (void)written; va_end(args); if (written != to_write) { return false; } buf->len = buf->len + to_write; buf->data[buf->len] = '\0'; return true; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_405174", "function_addr": 4215156, "binary_name": "7fc81bc5e05805462160f0f7e72ba32357f81d09a102ced059628d2f6c88ce53.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0F0h"], [3, "mov [rbp+var_E8], rdi"], [4, "mov [rbp+format], rsi"], [5, "mov [rbp+var_A0], rdx"], [6, "mov [rbp+var_98], rcx"], [7, "mov [rbp+var_90], r8"], [8, "mov [rbp+var_88], r9"], [9, "test al, al"], [10, "jz short loc_4051CD"], [11, "movaps [rbp+var_80], xmm0"], [12, "movaps [rbp+var_70], xmm1"], [13, "movaps [rbp+var_60], xmm2"], [14, "movaps [rbp+var_50], xmm3"], [15, "movaps [rbp+var_40], xmm4"], [16, "movaps [rbp+var_30], xmm5"], [17, "movaps [rbp+var_20], xmm6"], [18, "movaps [rbp+var_10], xmm7"], [19, "mov rax, [rbp+var_E8]"], [20, "movzx eax, byte ptr [rax+8]"], [21, "test al, al"], [22, "jz short loc_4051E6"], [23, "mov eax, 0"], [24, "jmp locret_40537C"], [25, "mov [rbp+arg], 10h"], [26, "mov [rbp+var_DC], 30h "], [27, "lea rax, [rbp+arg_0]"], [28, "mov [rbp+var_D8], rax"], [29, "lea rax, [rbp+var_B0]"], [30, "mov [rbp+var_D0], rax"], [31, "lea rdx, [rbp+arg]"], [32, "mov rax, [rbp+format]"], [33, "mov rcx, rdx"], [34, "mov rdx, rax"], [35, "mov esi, 0"], [36, "mov edi, 0"], [37, "call _vsnprintf"], [38, "mov [rbp+var_B4], eax"], [39, "cmp [rbp+var_B4], 0"], [40, "jnz short loc_40524F"], [41, "mov eax, 1"], [42, "jmp locret_40537C"], [43, "mov rax, [rbp+var_E8]"], [44, "mov rdx, [rax+20h]"], [45, "mov eax, [rbp+var_B4]"], [46, "cdqe"], [47, "add rax, rdx"], [48, "add rax, 1"], [49, "mov [rbp+var_C0], rax"], [50, "mov rax, [rbp+var_E8]"], [51, "mov rax, [rax+18h]"], [52, "cmp [rbp+var_C0], rax"], [53, "jbe short loc_4052BF"], [54, "mov rax, [rbp+var_C0]"], [55, "lea rdx, [rax+rax]"], [56, "mov rax, [rbp+var_E8]"], [57, "mov rsi, rdx"], [58, "mov rdi, rax"], [59, "call sub_40542F"], [60, "mov [rbp+var_C1], al"], [61, "movzx eax, [rbp+var_C1]"], [62, "xor eax, 1"], [63, "test al, al"], [64, "jz short loc_4052BF"], [65, "mov eax, 0"], [66, "jmp locret_40537C"], [67, "mov [rbp+arg], 10h"], [68, "mov [rbp+var_DC], 30h "], [69, "lea rax, [rbp+arg_0]"], [70, "mov [rbp+var_D8], rax"], [71, "lea rax, [rbp+var_B0]"], [72, "mov [rbp+var_D0], rax"], [73, "mov rax, [rbp+var_E8]"], [74, "mov rdx, [rax+10h]"], [75, "mov rax, [rbp+var_E8]"], [76, "mov rax, [rax+20h]"], [77, "lea rcx, [rdx+rax]"], [78, "lea rdx, [rbp+arg]"], [79, "mov rax, [rbp+format]"], [80, "mov rsi, rax"], [81, "mov rdi, rcx"], [82, "call _vsprintf"], [83, "mov [rbp+var_C8], eax"], [84, "mov eax, [rbp+var_C8]"], [85, "cmp eax, [rbp+var_B4]"], [86, "jz short loc_40533A"], [87, "mov eax, 0"], [88, "jmp short locret_40537C"], [89, "mov rax, [rbp+var_E8]"], [90, "mov rdx, [rax+20h]"], [91, "mov eax, [rbp+var_B4]"], [92, "cdqe"], [93, "add rdx, rax"], [94, "mov rax, [rbp+var_E8]"], [95, "mov [rax+20h], rdx"], [96, "mov rax, [rbp+var_E8]"], [97, "mov rdx, [rax+10h]"], [98, "mov rax, [rbp+var_E8]"], [99, "mov rax, [rax+20h]"], [100, "add rax, rdx"], [101, "mov byte ptr [rax], 0"], [102, "mov eax, 1"], [103, "leave"], [104, "retn"]], "data_dep": [[10, 9], [19, 3], [20, 19], [21, 20], [22, 21], [27, 21], [28, 27], [29, 27], [30, 29], [31, 25], [32, 4], [33, 31], [34, 32], [38, 37], [39, 38], [40, 39], [43, 3], [44, 43], [45, 38], [47, 45], [47, 44], [48, 47], [49, 48], [50, 3], [51, 50], [52, 49], [52, 51], [53, 52], [54, 49], [55, 54], [55, 44], [56, 3], [57, 55], [58, 56], [60, 59], [61, 60], [62, 61], [63, 62], [64, 63], [69, 51], [69, 63], [70, 69], [71, 69], [72, 71], [73, 3], [74, 73], [75, 3], [76, 75], [77, 76], [77, 33], [78, 74], [78, 67], [79, 4], [80, 79], [81, 77], [83, 82], [84, 83], [85, 84], [85, 38], [86, 85], [89, 3], [90, 89], [91, 38], [93, 90], [93, 91], [94, 3], [95, 93], [95, 94], [96, 3], [97, 95], [97, 96], [98, 3], [99, 95], [99, 98], [100, 97], [100, 99], [101, 100], [104, 23], [104, 87], [104, 41], [104, 102], [104, 65]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/7fc81bc5e05805462160f0f7e72ba32357f81d09a102ced059628d2f6c88ce53_7fc81bc5e05805462160f0f7e72ba32357f81d09a102ced059628d2f6c88ce53.jsonl.gz", "strip_func_name": "sub_405174", "query": "\n\n\n__int64 sub_405174(__int64 a1, const char *a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, ...)\n{\ngcc_va_list arg; // [rsp+10h] [rbp-E0h] BYREF\nint v8; // [rsp+28h] [rbp-C8h]\nchar v9; // [rsp+2Fh] [rbp-C1h]\nunsigned __int64 v10; // [rsp+30h] [rbp-C0h]\nint v11; // [rsp+3Ch] [rbp-B4h]\n__int64 v12; // [rsp+50h] [rbp-A0h]\n__int64 v13; // [rsp+58h] [rbp-98h]\n__int64 v14; // [rsp+60h] [rbp-90h]\n__int64 v15; // [rsp+68h] [rbp-88h]\n\nv12 = a3;\nv13 = a4;\nv14 = a5;\nv15 = a6;\nif ( *(_BYTE *)(a1 + 8) )\nreturn 0LL;\narg[0].gp_offset = 16;\nva_start(arg, a6);\nv11 = vsnprintf(0LL, 0LL, a2, arg);\nif ( !v11 )\nreturn 1LL;\nv10 = *(_QWORD *)(a1 + 32) + v11 + 1LL;\nif ( v10 > *(_QWORD *)(a1 + 24) )\n{\nv9 = sub_40542F(a1, 2 * v10);\nif ( v9 != 1 )\nreturn 0LL;\n}\narg[0].gp_offset = 16;\nva_end(arg);\nva_start(arg, a6);\nv8 = vsprintf((char *)(*(_QWORD *)(a1 + 16) + *(_QWORD *)(a1 + 32)), a2, arg);\nif ( v8 != v11 )\nreturn 0LL;\n*(_QWORD *)(a1 + 32) += v11;\n*(_BYTE *)(*(_QWORD *)(a1 + 16) + *(_QWORD *)(a1 + 32)) = 0;\nreturn 1LL;\n}\n\n\n\nQ:[a1,a2,arg,v8,v10,v11,sub_405174,sub_40542F,]", "hints": "[]", "response": "{'a1': 'buf', 'a2': 'fmt', 'arg': 'args', 'v8': 'written', 'v10': 'required_capacity', 'v11': 'to_write', 'sub_405174': 'strbuf_appendf', 'sub_40542F': 'strbuf_grow'}"}
[ [ 0.7245916128158569, 0.6815364956855774, 0.661339521408081, 0.6608321666717529, 0.6600004434585571, 0.6566764116287231, 0.6520603895187378, 0.6506757736206055, 0.6479989886283875, 0.6473520994186401, 0.6471695303916931, 0.6465649008750916, 0.6456682682037354, 0.6414361000061035, 0.6256577372550964, 0.6197088956832886, 0.6187705397605896, 0.6184009313583374, 0.6072097420692444, 0.6064859628677368 ], [ 137965, 184025, 72507, 117546, 190878, 121403, 8835, 52293, 101892, 105721, 93912, 236547, 129697, 15957, 28456, 190324, 231875, 84714, 202852, 84086 ] ]
recv_fd
89443bdfefd0d94018baec5d954a9a6aeca19ff5ba8e5f19dfc1e207d11131c6
Tachone
Tachftp
NA
int recv_fd(const int sock_fd) { int ret; struct msghdr msg; char recvchar; struct iovec vec; int recv_fd; char cmsgbuf[CMSG_SPACE(sizeof(recv_fd))]; struct cmsghdr *p_cmsg; int *p_fd; vec.iov_base = &recvchar; vec.iov_len = sizeof(recvchar); msg.msg_name = NULL; msg.msg_namelen = 0; msg.msg_iov = &vec; msg.msg_iovlen = 1; msg.msg_control = cmsgbuf; msg.msg_controllen = sizeof(cmsgbuf); msg.msg_flags = 0; p_fd = (int*)CMSG_DATA(CMSG_FIRSTHDR(&msg)); *p_fd = -1; ret = recvmsg(sock_fd, &msg, 0); if (ret != 1) ERR_EXIT("recvmsg"); p_cmsg = CMSG_FIRSTHDR(&msg); if (p_cmsg == NULL) ERR_EXIT("no passed fd"); p_fd = (int*)CMSG_DATA(p_cmsg); recv_fd = *p_fd; if (recv_fd == -1) ERR_EXIT("no passed fd"); return recv_fd; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_403942", "function_addr": 4208962, "binary_name": "89443bdfefd0d94018baec5d954a9a6aeca19ff5ba8e5f19dfc1e207d11131c6.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0B0h"], [3, "mov [rbp+fd], edi"], [4, "lea rax, [rbp+var_61]"], [5, "mov [rbp+var_80], rax"], [6, "mov [rbp+var_78], 1"], [7, "mov [rbp+message.msg_name], 0"], [8, "mov [rbp+message.msg_namelen], 0"], [9, "lea rax, [rbp+var_80]"], [10, "mov [rbp+message.msg_iov], rax"], [11, "mov [rbp+message.msg_iovlen], 1"], [12, "lea rax, [rbp+var_A0]"], [13, "mov [rbp+message.msg_control], rax"], [14, "mov [rbp+message.msg_controllen], 18h"], [15, "mov [rbp+message.msg_flags], 0"], [16, "mov rax, [rbp+message.msg_controllen]"], [17, "cmp rax, 0Fh"], [18, "jbe short loc_4039AC"], [19, "mov rax, [rbp+message.msg_control]"], [20, "jmp short loc_4039B1"], [21, "mov eax, 0"], [22, "add rax, 10h"], [23, "mov [rbp+var_8], rax"], [24, "mov rax, [rbp+var_8]"], [25, "mov dword ptr [rax], 0FFFFFFFFh"], [26, "lea rcx, [rbp+message]"], [27, "mov eax, [rbp+fd]"], [28, "mov edx, 0"], [29, "mov rsi, rcx"], [30, "mov edi, eax"], [31, "call _recvmsg"], [32, "mov [rbp+var_C], eax"], [33, "cmp [rbp+var_C], 1"], [34, "jz short loc_4039F9"], [35, "mov edi, offset aRecvmsg_0"], [36, "call _perror"], [37, "mov edi, 1"], [38, "call _exit"], [39, "mov rax, [rbp+message.msg_controllen]"], [40, "cmp rax, 0Fh"], [41, "jbe short loc_403A09"], [42, "mov rax, [rbp+message.msg_control]"], [43, "jmp short loc_403A0E"], [44, "mov eax, 0"], [45, "mov [rbp+var_18], rax"], [46, "cmp [rbp+var_18], 0"], [47, "jnz short loc_403A2D"], [48, "mov edi, offset aNoPassedFd"], [49, "call _perror"], [50, "mov edi, 1"], [51, "call _exit"], [52, "mov rax, [rbp+var_18]"], [53, "add rax, 10h"], [54, "mov [rbp+var_8], rax"], [55, "mov rax, [rbp+var_8]"], [56, "mov eax, [rax]"], [57, "mov [rbp+var_1C], eax"], [58, "cmp [rbp+var_1C], 0FFFFFFFFh"], [59, "jnz short loc_403A5C"], [60, "mov edi, offset aNoPassedFd"], [61, "call _perror"], [62, "mov edi, 1"], [63, "call _exit"], [64, "mov eax, [rbp+var_1C]"], [65, "leave"], [66, "retn"]], "data_dep": [[5, 4], [9, 5], [9, 4], [10, 9], [12, 9], [13, 12], [16, 14], [17, 16], [18, 17], [19, 13], [22, 19], [22, 21], [23, 22], [24, 23], [25, 24], [27, 3], [29, 26], [30, 27], [32, 31], [33, 32], [34, 33], [39, 14], [40, 39], [41, 40], [42, 13], [45, 42], [45, 44], [46, 45], [47, 46], [52, 45], [53, 52], [54, 53], [55, 54], [56, 25], [56, 55], [57, 56], [58, 57], [59, 58], [64, 57], [66, 64]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/89443bdfefd0d94018baec5d954a9a6aeca19ff5ba8e5f19dfc1e207d11131c6_89443bdfefd0d94018baec5d954a9a6aeca19ff5ba8e5f19dfc1e207d11131c6.jsonl.gz", "strip_func_name": "sub_403942", "query": "\n\n\n__int64 __fastcall sub_403942(int a1)\n{\n_DWORD *v1; // rax\nchar v3; // [rsp+10h] [rbp-A0h] BYREF\nint v4; // [rsp+20h] [rbp-90h] BYREF\n__int64 v5[3]; // [rsp+30h] [rbp-80h] BYREF\nchar v6; // [rsp+4Fh] [rbp-61h] BYREF\nstruct msghdr message; // [rsp+50h] [rbp-60h] BYREF\nunsigned int v8; // [rsp+94h] [rbp-1Ch]\n_DWORD *v9; // [rsp+98h] [rbp-18h]\nint v10; // [rsp+A4h] [rbp-Ch]\nint *v11; // [rsp+A8h] [rbp-8h]\n\nv5[0] = (__int64)&v6;\nv5[1] = 1LL;\nmessage.msg_name = 0LL;\nmessage.msg_namelen = 0;\nmessage.msg_iov = (iovec *)v5;\nmessage.msg_iovlen = 1LL;\nmessage.msg_control = &v3;\nmessage.msg_controllen = 24LL;\nmessage.msg_flags = 0;\nv11 = &v4;\nv4 = -1;\nv10 = recvmsg(a1, &message, 0);\nif ( v10 != 1 )\n{\nperror(\"recvmsg\");\nexit(1);\n}\nif ( message.msg_controllen <= 0xF )\nv1 = 0LL;\nelse\nv1 = message.msg_control;\nv9 = v1;\nif ( !v1 )\n{\nperror(\"no passed fd\");\nexit(1);\n}\nv11 = v9 + 4;\nv8 = v9[4];\nif ( v8 == -1 )\n{\nperror(\"no passed fd\");\nexit(1);\n}\nreturn v8;\n}\n\n\n\nQ:[a1,v3,v5,v6,message,v9,v11,sub_403942,]", "hints": "[]", "response": "{'a1': 'sock_fd', 'v3': 'cmsgbuf', 'v5': 'vec', 'v6': 'recvchar', 'message': 'msg', 'v9': 'p_cmsg', 'v11': 'p_fd', 'sub_403942': 'recv_fd'}"}
[ [ 0.8035526275634766, 0.7758790850639343, 0.7103190422058105, 0.6998275518417358, 0.6993834376335144, 0.6987189054489136, 0.6878138780593872, 0.6814306378364563, 0.666581392288208, 0.6663301587104797, 0.665317714214325, 0.6645965576171875, 0.6644270420074463, 0.6634647846221924, 0.6632583737373352, 0.6622083187103271, 0.6582471132278442, 0.6576937437057495, 0.6544332504272461, 0.65360027551651 ], [ 74657, 225373, 188107, 12830, 241610, 66931, 58492, 13670, 157297, 104779, 13877, 110140, 79999, 259441, 96659, 154031, 186557, 127122, 202391, 150512 ] ]
parse_time
54c09fcd7f9bb3dbf7a245bfbce5b9b2d9856ccd6bbf8a35b8bc1982b50a0706
wbx-github
openadk
NA
static time_t parse_time(char *s) { struct tm tm; int day = atoi(s); int hour = 0; while (*s && *s != '.') { s++; } if (*s) { s++; hour = atoi(s); } tm.tm_year = day / 10000 - 1900; tm.tm_mon = (day % 10000) / 100 - 1; tm.tm_mday = day % 100; tm.tm_hour = hour / 10000; tm.tm_min = (hour % 10000) / 100; tm.tm_sec = hour % 100; tm.tm_isdst = -1; return mktime(&tm); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4011CE", "function_addr": 4198862, "binary_name": "54c09fcd7f9bb3dbf7a245bfbce5b9b2d9856ccd6bbf8a35b8bc1982b50a0706.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov [rbp+nptr], rdi"], [4, "mov rax, [rbp+nptr]"], [5, "mov rdi, rax"], [6, "call _atoi"], [7, "mov [rbp+var_8], eax"], [8, "mov [rbp+var_4], 0"], [9, "jmp short loc_4011F7"], [10, "add [rbp+nptr], 1"], [11, "mov rax, [rbp+nptr]"], [12, "movzx eax, byte ptr [rax]"], [13, "test al, al"], [14, "jz short loc_40120D"], [15, "mov rax, [rbp+nptr]"], [16, "movzx eax, byte ptr [rax]"], [17, "cmp al, 2Eh "], [18, "jnz short loc_4011F2"], [19, "mov rax, [rbp+nptr]"], [20, "movzx eax, byte ptr [rax]"], [21, "test al, al"], [22, "jz short loc_40122C"], [23, "add [rbp+nptr], 1"], [24, "mov rax, [rbp+nptr]"], [25, "mov rdi, rax"], [26, "call _atoi"], [27, "mov [rbp+var_4], eax"], [28, "mov eax, [rbp+var_8]"], [29, "movsxd rdx, eax"], [30, "imul rdx, 68DB8BADh"], [31, "shr rdx, 20h"], [32, "sar edx, 0Ch"], [33, "sar eax, 1Fh"], [34, "mov ecx, eax"], [35, "mov eax, edx"], [36, "sub eax, ecx"], [37, "sub eax, 76Ch"], [38, "mov [rbp+tp.tm_year], eax"], [39, "mov edx, [rbp+var_8]"], [40, "movsxd rax, edx"], [41, "imul rax, 68DB8BADh"], [42, "shr rax, 20h"], [43, "sar eax, 0Ch"], [44, "mov ecx, edx"], [45, "sar ecx, 1Fh"], [46, "sub eax, ecx"], [47, "imul ecx, eax, 2710h"], [48, "mov eax, edx"], [49, "sub eax, ecx"], [50, "movsxd rdx, eax"], [51, "imul rdx, 51EB851Fh"], [52, "shr rdx, 20h"], [53, "sar edx, 5"], [54, "sar eax, 1Fh"], [55, "mov ecx, eax"], [56, "mov eax, edx"], [57, "sub eax, ecx"], [58, "sub eax, 1"], [59, "mov [rbp+tp.tm_mon], eax"], [60, "mov edx, [rbp+var_8]"], [61, "movsxd rax, edx"], [62, "imul rax, 51EB851Fh"], [63, "shr rax, 20h"], [64, "sar eax, 5"], [65, "mov ecx, edx"], [66, "sar ecx, 1Fh"], [67, "sub eax, ecx"], [68, "imul ecx, eax, 64h "], [69, "mov eax, edx"], [70, "sub eax, ecx"], [71, "mov [rbp+tp.tm_mday], eax"], [72, "mov eax, [rbp+var_4]"], [73, "movsxd rdx, eax"], [74, "imul rdx, 68DB8BADh"], [75, "shr rdx, 20h"], [76, "sar edx, 0Ch"], [77, "sar eax, 1Fh"], [78, "mov ecx, eax"], [79, "mov eax, edx"], [80, "sub eax, ecx"], [81, "mov [rbp+tp.tm_hour], eax"], [82, "mov edx, [rbp+var_4]"], [83, "movsxd rax, edx"], [84, "imul rax, 68DB8BADh"], [85, "shr rax, 20h"], [86, "sar eax, 0Ch"], [87, "mov ecx, edx"], [88, "sar ecx, 1Fh"], [89, "sub eax, ecx"], [90, "imul ecx, eax, 2710h"], [91, "mov eax, edx"], [92, "sub eax, ecx"], [93, "movsxd rdx, eax"], [94, "imul rdx, 51EB851Fh"], [95, "shr rdx, 20h"], [96, "sar edx, 5"], [97, "sar eax, 1Fh"], [98, "mov ecx, eax"], [99, "mov eax, edx"], [100, "sub eax, ecx"], [101, "mov [rbp+tp.tm_min], eax"], [102, "mov edx, [rbp+var_4]"], [103, "movsxd rax, edx"], [104, "imul rax, 51EB851Fh"], [105, "shr rax, 20h"], [106, "sar eax, 5"], [107, "mov ecx, edx"], [108, "sar ecx, 1Fh"], [109, "sub eax, ecx"], [110, "imul ecx, eax, 64h "], [111, "mov eax, edx"], [112, "sub eax, ecx"], [113, "mov [rbp+tp.tm_sec], eax"], [114, "mov [rbp+tp.tm_isdst], 0FFFFFFFFh"], [115, "lea rax, [rbp+tp]"], [116, "mov rdi, rax"], [117, "call _mktime"], [118, "leave"], [119, "retn"]], "data_dep": [[4, 3], [5, 4], [7, 6], [10, 10], [10, 3], [11, 10], [11, 3], [12, 11], [13, 12], [14, 13], [15, 10], [15, 3], [16, 15], [17, 16], [18, 17], [19, 10], [19, 3], [20, 19], [21, 20], [22, 21], [23, 10], [23, 3], [24, 23], [25, 24], [27, 26], [28, 7], [29, 28], [30, 29], [31, 30], [32, 31], [33, 28], [34, 33], [35, 32], [36, 34], [36, 35], [37, 36], [38, 37], [39, 7], [40, 39], [41, 40], [42, 41], [43, 42], [44, 39], [45, 44], [46, 43], [46, 45], [47, 45], [47, 46], [48, 39], [49, 48], [49, 47], [50, 49], [51, 50], [52, 51], [53, 52], [54, 49], [55, 54], [56, 53], [57, 56], [57, 55], [58, 57], [59, 58], [60, 7], [61, 60], [62, 61], [63, 62], [64, 63], [65, 60], [66, 65], [67, 64], [67, 66], [68, 66], [68, 67], [69, 60], [70, 68], [70, 69], [71, 70], [72, 27], [72, 8], [73, 72], [74, 73], [75, 74], [76, 75], [77, 72], [78, 77], [79, 76], [80, 78], [80, 79], [81, 80], [82, 8], [82, 27], [83, 82], [84, 83], [85, 84], [86, 85], [87, 82], [88, 87], [89, 86], [89, 88], [90, 88], [90, 89], [91, 82], [92, 90], [92, 91], [93, 92], [94, 93], [95, 94], [96, 95], [97, 92], [98, 97], [99, 96], [100, 98], [100, 99], [101, 100], [102, 27], [102, 8], [103, 102], [104, 103], [105, 104], [106, 105], [107, 102], [108, 107], [109, 106], [109, 108], [110, 109], [110, 108], [111, 102], [112, 111], [112, 110], [113, 112], [115, 112], [116, 115], [119, 117]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/54c09fcd7f9bb3dbf7a245bfbce5b9b2d9856ccd6bbf8a35b8bc1982b50a0706_54c09fcd7f9bb3dbf7a245bfbce5b9b2d9856ccd6bbf8a35b8bc1982b50a0706.jsonl.gz", "strip_func_name": "sub_4011CE", "query": "\n\n\ntime_t __fastcall sub_4011CE(const char *a1)\n{\nchar *nptr; // [rsp+8h] [rbp-48h]\nstruct tm tp; // [rsp+10h] [rbp-40h] BYREF\nint v4; // [rsp+48h] [rbp-8h]\nint v5; // [rsp+4Ch] [rbp-4h]\n\nnptr = (char *)a1;\nv4 = atoi(a1);\nv5 = 0;\nwhile ( *nptr && *nptr != 46 )\n++nptr;\nif ( *nptr )\nv5 = atoi(nptr + 1);\ntp.tm_year = v4 / 10000 - 1900;\ntp.tm_mon = v4 % 10000 / 100 - 1;\ntp.tm_mday = v4 % 100;\ntp.tm_hour = v5 / 10000;\ntp.tm_min = v5 % 10000 / 100;\ntp.tm_sec = v5 % 100;\ntp.tm_isdst = -1;\nreturn mktime(&tp);\n}\n\n\n\nQ:[a1,nptr,tp,v4,v5,sub_4011CE,]", "hints": "[]", "response": "{'a1': 's', 'nptr': 'sa', 'tp': 'tm', 'v4': 'day', 'v5': 'hour', 'sub_4011CE': 'parse_time'}"}
[ [ 0.726015567779541, 0.6749773621559143, 0.6715866327285767, 0.6647464632987976, 0.6626218557357788, 0.6618120074272156, 0.6603556871414185, 0.6588722467422485, 0.6571544408798218, 0.6552035212516785, 0.6530157327651978, 0.647201657295227, 0.6457662582397461, 0.644192636013031, 0.6432939171791077, 0.6423729062080383, 0.641576886177063, 0.6408275365829468, 0.6393609642982483, 0.6387524604797363 ], [ 170757, 194312, 81205, 80181, 107739, 159808, 256430, 98304, 71230, 231223, 241516, 56983, 261986, 6076, 216954, 34763, 227936, 184333, 145485, 47377 ] ]
loadFile
e5369f8ea3aa9bc9d207427d8242ac333f2507a768b52b1cb96b47a0e805e321
syoyo
tinyobjloader-c
NA
static void loadFile(void *ctx, const char * filename, const int is_mtl, const char *obj_filename, char ** buffer, size_t * len) { *buffer = NULL; long string_size = 0, read_size = 0; FILE * handler = fopen(filename, "r"); if (handler) { fseek(handler, 0, SEEK_END); string_size = ftell(handler); rewind(handler); *buffer = (char *) malloc(sizeof(char) * (string_size + 1)); read_size = fread(*buffer, sizeof(char), (size_t) string_size, handler); (*buffer)[string_size] = '\0'; if (string_size != read_size) { free(buffer); *buffer = NULL; } fclose(handler); } *len = read_size; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40B888", "function_addr": 4241544, "binary_name": "e5369f8ea3aa9bc9d207427d8242ac333f2507a768b52b1cb96b47a0e805e321.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+filename], rsi"], [5, "mov [rbp+var_34], edx"], [6, "mov [rbp+var_40], rcx"], [7, "mov [rbp+ptr], r8"], [8, "mov [rbp+var_50], r9"], [9, "mov rax, [rbp+ptr]"], [10, "mov qword ptr [rax], 0"], [11, "mov [rbp+n], 0"], [12, "mov [rbp+var_8], 0"], [13, "mov rax, [rbp+filename]"], [14, "mov esi, offset aR"], [15, "mov rdi, rax"], [16, "call _fopen"], [17, "mov [rbp+stream], rax"], [18, "cmp [rbp+stream], 0"], [19, "jz loc_40B98C"], [20, "mov rax, [rbp+stream]"], [21, "mov edx, 2"], [22, "mov esi, 0"], [23, "mov rdi, rax"], [24, "call _fseek"], [25, "mov rax, [rbp+stream]"], [26, "mov rdi, rax"], [27, "call _ftell"], [28, "mov [rbp+n], rax"], [29, "mov rax, [rbp+stream]"], [30, "mov rdi, rax"], [31, "call _rewind"], [32, "mov rax, [rbp+n]"], [33, "add rax, 1"], [34, "mov rdi, rax"], [35, "call _malloc"], [36, "mov rdx, rax"], [37, "mov rax, [rbp+ptr]"], [38, "mov [rax], rdx"], [39, "mov rdx, [rbp+n]"], [40, "mov rax, [rbp+ptr]"], [41, "mov rax, [rax]"], [42, "mov rcx, [rbp+stream]"], [43, "mov esi, 1"], [44, "mov rdi, rax"], [45, "call _fread"], [46, "mov [rbp+var_8], rax"], [47, "mov rax, [rbp+ptr]"], [48, "mov rdx, [rax]"], [49, "mov rax, [rbp+n]"], [50, "add rax, rdx"], [51, "mov byte ptr [rax], 0"], [52, "mov rax, [rbp+n]"], [53, "cmp rax, [rbp+var_8]"], [54, "jz short loc_40B980"], [55, "mov rax, [rbp+ptr]"], [56, "mov rdi, rax"], [57, "call _free"], [58, "mov rax, [rbp+ptr]"], [59, "mov qword ptr [rax], 0"], [60, "mov rax, [rbp+stream]"], [61, "mov rdi, rax"], [62, "call _fclose"], [63, "mov rdx, [rbp+var_8]"], [64, "mov rax, [rbp+var_50]"], [65, "mov [rax], rdx"], [66, "nop"], [67, "leave"], [68, "retn"]], "data_dep": [[9, 7], [10, 9], [13, 4], [15, 13], [17, 16], [18, 17], [19, 18], [20, 17], [23, 20], [25, 17], [26, 25], [28, 27], [29, 17], [30, 29], [32, 28], [33, 32], [34, 33], [36, 35], [37, 7], [38, 37], [38, 36], [39, 28], [40, 7], [41, 40], [41, 38], [42, 17], [44, 41], [46, 45], [47, 7], [48, 38], [48, 47], [49, 28], [50, 49], [50, 48], [51, 50], [52, 28], [53, 46], [53, 52], [54, 53], [55, 7], [56, 55], [58, 7], [59, 58], [60, 17], [61, 60], [63, 46], [63, 12], [64, 8], [65, 64], [65, 63], [68, 64]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/e5369f8ea3aa9bc9d207427d8242ac333f2507a768b52b1cb96b47a0e805e321_e5369f8ea3aa9bc9d207427d8242ac333f2507a768b52b1cb96b47a0e805e321.jsonl.gz", "strip_func_name": "sub_40B888", "query": "\n\n\nsize_t *__fastcall sub_40B888(__int64 a1, const char *a2, __int64 a3, __int64 a4, void **a5, size_t *a6)\n{\nsize_t *result; // rax\nFILE *stream; // [rsp+38h] [rbp-18h]\n__int64 n; // [rsp+40h] [rbp-10h]\nsize_t v11; // [rsp+48h] [rbp-8h]\n\n*a5 = 0LL;\nv11 = 0LL;\nstream = fopen(a2, \"r\");\nif ( stream )\n{\nfseek(stream, 0LL, 2);\nn = ftell(stream);\nrewind(stream);\n*a5 = malloc(n + 1);\nv11 = fread(*a5, 1uLL, n, stream);\n*((_BYTE *)*a5 + n) = 0;\nif ( n != v11 )\n{\nfree(a5);\n*a5 = 0LL;\n}\nfclose(stream);\n}\nresult = a6;\n*a6 = v11;\nreturn result;\n}\n\n\n\nQ:[a2,a5,a6,a1,a3,a4,stream,n,v11,sub_40B888,]", "hints": "[]", "response": "{'a2': 'filename', 'a5': 'buffer', 'a6': 'len', 'a1': 'ctx', 'a3': 'is_mtl', 'a4': 'obj_filename', 'stream': 'handler', 'n': 'string_size', 'v11': 'read_size', 'sub_40B888': 'loadFile'}"}
[ [ 0.7544634342193604, 0.7544634342193604, 0.7470028400421143, 0.7460793256759644, 0.7385178804397583, 0.7350265979766846, 0.7264049649238586, 0.7257006168365479, 0.7251467108726501, 0.7238631844520569, 0.7210032343864441, 0.7200369834899902, 0.7192973494529724, 0.7185028791427612, 0.7177104353904724, 0.7107315063476562, 0.7101235389709473, 0.7089395523071289, 0.7087868452072144, 0.7078191041946411 ], [ 43914, 184225, 229418, 7321, 103747, 185158, 251875, 90645, 171136, 112641, 234169, 210546, 32027, 154396, 170514, 234516, 253120, 205766, 39504, 251941 ] ]
sockaddr_cmp
bbf4fd34a1479faeba7f018ea496cd01e0b532574e364040d6ff27ec9550ed62
ncopa
pingu
NA
int sockaddr_cmp(union sockaddr_any *a, union sockaddr_any *b) { if (a->sa.sa_family != b->sa.sa_family) return a->sa.sa_family - b->sa.sa_family; switch (a->sa.sa_family) { case AF_INET: return a->sin.sin_addr.s_addr - b->sin.sin_addr.s_addr; break; case AF_INET6: return memcmp((char *) &a->sin6.sin6_addr, (char *) &b->sin6.sin6_addr, sizeof(a->sin6.sin6_addr)); break; } return -1; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_409439", "function_addr": 4232249, "binary_name": "bbf4fd34a1479faeba7f018ea496cd01e0b532574e364040d6ff27ec9550ed62.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, "movzx edx, word ptr [rax]"], [7, "mov rax, [rbp+var_10]"], [8, "movzx eax, word ptr [rax]"], [9, "cmp dx, ax"], [10, "jz short loc_409476"], [11, "mov rax, [rbp+var_8]"], [12, "movzx eax, word ptr [rax]"], [13, "movzx edx, ax"], [14, "mov rax, [rbp+var_10]"], [15, "movzx eax, word ptr [rax]"], [16, "movzx ecx, ax"], [17, "mov eax, edx"], [18, "sub eax, ecx"], [19, "jmp short locret_4094C7"], [20, "mov rax, [rbp+var_8]"], [21, "movzx eax, word ptr [rax]"], [22, "movzx eax, ax"], [23, "cmp eax, 2"], [24, "jz short loc_40948C"], [25, "cmp eax, 0Ah"], [26, "jz short loc_4094A0"], [27, "jmp short loc_4094C2"], [28, "mov rax, [rbp+var_8]"], [29, "mov edx, [rax+4]"], [30, "mov rax, [rbp+var_10]"], [31, "mov ecx, [rax+4]"], [32, "mov eax, edx"], [33, "sub eax, ecx"], [34, "jmp short locret_4094C7"], [35, "mov rax, [rbp+var_10]"], [36, "lea rcx, [rax+8]"], [37, "mov rax, [rbp+var_8]"], [38, "add rax, 8"], [39, "mov edx, 10h"], [40, "mov rsi, rcx"], [41, "mov rdi, rax"], [42, "call _memcmp"], [43, "jmp short locret_4094C7"], [44, "mov eax, 0FFFFFFFFh"], [45, "leave"], [46, "retn"]], "data_dep": [[5, 3], [6, 5], [7, 4], [8, 7], [9, 8], [9, 6], [10, 9], [11, 3], [12, 11], [13, 12], [14, 4], [15, 14], [16, 15], [17, 13], [18, 17], [18, 16], [20, 3], [21, 20], [22, 21], [23, 22], [24, 23], [25, 22], [26, 25], [28, 3], [29, 28], [30, 4], [31, 30], [32, 29], [33, 32], [33, 31], [35, 4], [36, 35], [37, 3], [38, 37], [40, 36], [41, 38], [46, 33], [46, 42], [46, 44], [46, 18]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/bbf4fd34a1479faeba7f018ea496cd01e0b532574e364040d6ff27ec9550ed62_bbf4fd34a1479faeba7f018ea496cd01e0b532574e364040d6ff27ec9550ed62.jsonl.gz", "strip_func_name": "sub_409439", "query": "\n\n\nint __fastcall sub_409439(unsigned __int16 *a1, unsigned __int16 *a2)\n{\nint v3; // eax\n\nif ( *a1 != *a2 )\nreturn *a1 - *a2;\nv3 = *a1;\nif ( v3 == 2 )\nreturn *((_DWORD *)a1 + 1) - *((_DWORD *)a2 + 1);\nif ( v3 == 10 )\nreturn memcmp(a1 + 4, a2 + 4, 0x10uLL);\nreturn -1;\n}\n\n\n\nQ:[a1,a2,sub_409439,]", "hints": "[]", "response": "{'a1': 'a', 'a2': 'b', 'sub_409439': 'sockaddr_cmp'}"}
[ [ 0.7800619006156921, 0.7612389326095581, 0.7531535625457764, 0.7447426319122314, 0.7370462417602539, 0.7334592342376709, 0.7317464351654053, 0.7210641503334045, 0.7175730466842651, 0.7020413279533386, 0.6978104114532471, 0.6963699460029602, 0.6955296993255615, 0.6951414942741394, 0.6897578835487366, 0.6881541013717651, 0.6835294961929321, 0.6823911070823669, 0.679466962814331, 0.6776249408721924 ], [ 84656, 250256, 168837, 109285, 8651, 110445, 219756, 132471, 116593, 149366, 172587, 221708, 18774, 163484, 190828, 72153, 260796, 34506, 179831, 252359 ] ]
buf_add_buf
7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807
arendst
Tasmota
NA
static size_t buf_add_buf(buf_impl* attr, buf_impl* attr2) { if (attr->len + attr2->len <= attr->size) { for (int32_t i = 0; i < attr2->len; i++) { attr->bufptr[attr->len++] = attr2->bufptr[i]; } } return attr->len; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_415956", "function_addr": 4282710, "binary_name": "7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.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 rax, [rbp+var_18]"], [5, "mov edx, [rax+4]"], [6, "mov rax, [rbp+var_20]"], [7, "mov eax, [rax+4]"], [8, "add edx, eax"], [9, "mov rax, [rbp+var_18]"], [10, "mov eax, [rax]"], [11, "cmp edx, eax"], [12, "jg short loc_4159CA"], [13, "mov [rbp+var_4], 0"], [14, "jmp short loc_4159BE"], [15, "mov rax, [rbp+var_20]"], [16, "mov rdx, [rax+8]"], [17, "mov eax, [rbp+var_4]"], [18, "cdqe"], [19, "lea rsi, [rdx+rax]"], [20, "mov rax, [rbp+var_18]"], [21, "mov rdi, [rax+8]"], [22, "mov rax, [rbp+var_18]"], [23, "mov eax, [rax+4]"], [24, "lea ecx, [rax+1]"], [25, "mov rdx, [rbp+var_18]"], [26, "mov [rdx+4], ecx"], [27, "cdqe"], [28, "lea rdx, [rdi+rax]"], [29, "movzx eax, byte ptr [rsi]"], [30, "mov [rdx], al"], [31, "add [rbp+var_4], 1"], [32, "mov rax, [rbp+var_20]"], [33, "mov eax, [rax+4]"], [34, "cmp [rbp+var_4], eax"], [35, "jl short loc_415985"], [36, "mov rax, [rbp+var_18]"], [37, "mov eax, [rax+4]"], [38, "cdqe"], [39, "pop rbp"], [40, "retn"]], "data_dep": [[4, 2], [5, 4], [6, 3], [7, 6], [8, 5], [8, 7], [9, 2], [10, 9], [11, 8], [11, 10], [12, 11], [15, 3], [16, 26], [16, 15], [16, 30], [17, 13], [17, 31], [19, 30], [19, 17], [19, 26], [19, 19], [20, 2], [21, 30], [21, 20], [21, 26], [22, 2], [23, 22], [23, 30], [23, 26], [24, 30], [24, 23], [24, 26], [24, 24], [25, 2], [26, 24], [26, 25], [28, 23], [28, 26], [28, 25], [29, 26], [29, 19], [30, 29], [30, 28], [31, 13], [31, 31], [32, 3], [33, 30], [33, 26], [33, 32], [34, 13], [34, 31], [34, 33], [35, 34], [36, 2], [37, 30], [37, 36], [37, 26], [39, 0], [40, 37]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807_7c16ecc1f4177280f9c554334c74c60179f6cbd74ce0674df9f0cc7c89723807.jsonl.gz", "strip_func_name": "sub_415956", "query": "\n\n\n__int64 __fastcall sub_415956(__int64 a1, __int64 a2)\n{\n_BYTE *v2; // rsi\n__int64 v3; // rdi\nint v4; // eax\nint i; // [rsp+1Ch] [rbp-4h]\n\nif ( *(_DWORD *)(a2 + 4) + *(_DWORD *)(a1 + 4) <= *(_DWORD *)a1 )\n{\nfor ( i = 0; i < *(_DWORD *)(a2 + 4); ++i )\n{\nv2 = (_BYTE *)(*(_QWORD *)(a2 + 8) + i);\nv3 = *(_QWORD *)(a1 + 8);\nv4 = *(_DWORD *)(a1 + 4);\n*(_DWORD *)(a1 + 4) = v4 + 1;\n*(_BYTE *)(v3 + v4) = *v2;\n}\n}\nreturn *(int *)(a1 + 4);\n}\n\n\n\nQ:[a1,a2,sub_415956,]", "hints": "[]", "response": "{'a1': 'attr', 'a2': 'attr2', 'sub_415956': 'buf_add_buf'}"}
[ [ 0.7629624009132385, 0.7195950746536255, 0.717769205570221, 0.7118589878082275, 0.7043824195861816, 0.7041071057319641, 0.6880021095275879, 0.6819888949394226, 0.6789693832397461, 0.6760205626487732, 0.6745748519897461, 0.6741955280303955, 0.673007607460022, 0.6680595874786377, 0.6680004596710205, 0.6644495725631714, 0.66159588098526, 0.6615198254585266, 0.6609030961990356, 0.6582770347595215 ], [ 110066, 90312, 260944, 189399, 213371, 9895, 255038, 2015, 209009, 239151, 185946, 263280, 138551, 144205, 55469, 3237, 70232, 97458, 226915, 30219 ] ]
hexdump
89002890075f892e5768e6b3d4f847f19edd2d2eb1a80a739172920be0165437
mikeryan
sm5emu
NA
static void hexdump(u8 *ptr, unsigned len, int bytes) { int i; for (i = 0; i < len; ++i) { if (bytes) printf("%02x ", ptr[i]); else printf("%x ", ptr[i] & 0xf); if ((i & 15) == 15) printf("\n"); } }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40126B", "function_addr": 4199019, "binary_name": "89002890075f892e5768e6b3d4f847f19edd2d2eb1a80a739172920be0165437.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_20], edx"], [6, "mov [rbp+var_4], 0"], [7, "jmp short loc_4012F2"], [8, "cmp [rbp+var_20], 0"], [9, "jz short loc_4012B2"], [10, "mov eax, [rbp+var_4]"], [11, "movsxd rdx, eax"], [12, "mov rax, [rbp+var_18]"], [13, "add rax, rdx"], [14, "movzx eax, byte ptr [rax]"], [15, "movzx eax, al"], [16, "mov esi, eax"], [17, "mov edi, offset format"], [18, "mov eax, 0"], [19, "call _printf"], [20, "jmp short loc_4012D9"], [21, "mov eax, [rbp+var_4]"], [22, "movsxd rdx, eax"], [23, "mov rax, [rbp+var_18]"], [24, "add rax, rdx"], [25, "movzx eax, byte ptr [rax]"], [26, "movzx eax, al"], [27, "and eax, 0Fh"], [28, "mov esi, eax"], [29, "mov edi, offset asc_40200A"], [30, "mov eax, 0"], [31, "call _printf"], [32, "mov eax, [rbp+var_4]"], [33, "and eax, 0Fh"], [34, "cmp eax, 0Fh"], [35, "jnz short loc_4012EE"], [36, "mov edi, 0Ah"], [37, "call _putchar"], [38, "add [rbp+var_4], 1"], [39, "mov eax, [rbp+var_4]"], [40, "cmp [rbp+var_1C], eax"], [41, "ja short loc_401286"], [42, "nop"], [43, "nop"], [44, "leave"], [45, "retn"]], "data_dep": [[8, 5], [9, 8], [10, 6], [10, 38], [11, 10], [12, 3], [13, 11], [13, 12], [14, 13], [15, 14], [16, 15], [21, 6], [21, 38], [22, 21], [23, 3], [24, 23], [24, 22], [25, 24], [26, 25], [27, 26], [28, 27], [32, 6], [32, 38], [33, 32], [34, 33], [35, 34], [38, 38], [38, 6], [39, 38], [39, 6], [40, 4], [40, 39], [41, 40], [45, 39]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/89002890075f892e5768e6b3d4f847f19edd2d2eb1a80a739172920be0165437_89002890075f892e5768e6b3d4f847f19edd2d2eb1a80a739172920be0165437.jsonl.gz", "strip_func_name": "sub_40126B", "query": "\n\n\n__int64 __fastcall sub_40126B(__int64 a1, unsigned int a2, int a3)\n{\n__int64 result; // rax\nunsigned int i; // [rsp+1Ch] [rbp-4h]\n\nfor ( i = 0; ; ++i )\n{\nresult = i;\nif ( a2 <= i )\nbreak;\nif ( a3 )\nprintf(\"%02x \", *(unsigned __int8 *)((int)i + a1));\nelse\nprintf(\"%x \", *(_BYTE *)((int)i + a1) & 0xF);\nif ( (i & 0xF) == 15 )\nputchar(10);\n}\nreturn result;\n}\n\n\n\nQ:[a3,a1,a2,sub_40126B,]", "hints": "[]", "response": "{'a3': 'bytes', 'a1': 'ptr', 'a2': 'len', 'sub_40126B': 'hexdump'}"}
[ [ 0.8155463933944702, 0.7923779487609863, 0.7803827524185181, 0.7754051685333252, 0.7698441743850708, 0.7679725885391235, 0.7679668068885803, 0.7604392766952515, 0.7596131563186646, 0.7580567002296448, 0.7547574043273926, 0.754412829875946, 0.7527351379394531, 0.7434908151626587, 0.7434072494506836, 0.7417052984237671, 0.7402964234352112, 0.7402357459068298, 0.7395238876342773, 0.7394556999206543 ], [ 247527, 107328, 150771, 194792, 203560, 55843, 163998, 28617, 38310, 248061, 46352, 179254, 144978, 111216, 256814, 12439, 252792, 5980, 207464, 47779 ] ]
test
fc25a184c7d1fff5cbc58f50c7b88f668e3dcdd5b77742e5ce2144bc4a342dc4
radareorg
sdb
NA
static int test(TestFcn tf) { const char *name = NULL; int ret = tf (&name); printf ("%s %s\n", ret? OK:ER, name); success += ret; return ret; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4013FC", "function_addr": 4199420, "binary_name": "fc25a184c7d1fff5cbc58f50c7b88f668e3dcdd5b77742e5ce2144bc4a342dc4.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov [rbp+var_10], 0"], [5, "lea rax, [rbp+var_10]"], [6, "mov rdx, [rbp+var_18]"], [7, "mov rdi, rax"], [8, "call rdx"], [9, "mov [rbp+var_4], eax"], [10, "mov rax, [rbp+var_10]"], [11, "cmp [rbp+var_4], 0"], [12, "jz short loc_401431"], [13, "mov ecx, offset a32mok0m"], [14, "jmp short loc_401436"], [15, "mov ecx, offset a31mer0m"], [16, "mov rdx, rax"], [17, "mov rsi, rcx"], [18, "mov edi, offset aSS_0"], [19, "mov eax, 0"], [20, "call _printf"], [21, "mov edx, cs:dword_4192B0"], [22, "mov eax, [rbp+var_4]"], [23, "add eax, edx"], [24, "mov cs:dword_4192B0, eax"], [25, "mov eax, [rbp+var_4]"], [26, "leave"], [27, "retn"]], "data_dep": [[5, 4], [6, 3], [7, 5], [8, 6], [9, 8], [10, 4], [11, 9], [12, 11], [16, 10], [17, 13], [17, 15], [22, 9], [23, 22], [23, 21], [24, 23], [25, 9], [27, 25]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/fc25a184c7d1fff5cbc58f50c7b88f668e3dcdd5b77742e5ce2144bc4a342dc4_fc25a184c7d1fff5cbc58f50c7b88f668e3dcdd5b77742e5ce2144bc4a342dc4.jsonl.gz", "strip_func_name": "sub_4013FC", "query": "\n\n\n__int64 __fastcall sub_4013FC(__int64 (__fastcall *a1)(const char **))\n{\nconst char *v1; // rcx\nconst char *v3; // [rsp+10h] [rbp-10h] BYREF\nunsigned int v4; // [rsp+1Ch] [rbp-4h]\n\nv3 = 0LL;\nv4 = a1(&v3);\nif ( v4 )\nv1 = \"\\x1B[32mOK\\x1B[0m\";\nelse\nv1 = \"\\x1B[31mER\\x1B[0m\";\nprintf(\"%s %s\\n\", v1, v3);\ndword_4192B0 += v4;\nreturn v4;\n}\n\n\n\nQ:[a1,v3,sub_4013FC,]", "hints": "[]", "response": "{'a1': 'tf_0', 'v3': 'name', 'sub_4013FC': 'test'}"}
[ [ 0.7271133065223694, 0.7217880487442017, 0.7126812934875488, 0.7067084312438965, 0.7038576602935791, 0.7000906467437744, 0.6988580822944641, 0.6928250789642334, 0.6924670338630676, 0.69096440076828, 0.6906589269638062, 0.6905028223991394, 0.6861178278923035, 0.6853215098381042, 0.6853083372116089, 0.6838228702545166, 0.6837862730026245, 0.6830438375473022, 0.6829665899276733, 0.6812171936035156 ], [ 228448, 80725, 197432, 2803, 82541, 40473, 241047, 212430, 99286, 133424, 11591, 146068, 194381, 65147, 227528, 49855, 242520, 135277, 59881, 174299 ] ]
PrintHelp
7a3f18b0d2aa28007ee2b9512a0f8bdd916cf16869aa8a5902f94a0c68aa5205
Telecominfraproject
OpenCellular
NA
void PrintHelp(const char *progname) { const Param *p; printf("\nUsage:\n" " %s [--all]\n" " Prints all parameters with descriptions and current values.\n" " If --all is specified, prints even normally hidden fields.\n" " %s [param1 [param2 [...]]]\n" " Prints the current value(s) of the parameter(s).\n" " %s [param1=value1] [param2=value2 [...]]]\n" " Sets the parameter(s) to the specified value(s).\n" " %s [param1?value1] [param2?value2 [...]]]\n" " Checks if the parameter(s) all contain the specified value(s).\n" "Stops at the first error." "\n" "Valid parameters:\n", progname, progname, progname, progname); for (p = sys_param_list; p->name; p++) printf(" %-22s %s\n", p->name, p->desc); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_40241D", "function_addr": 4203549, "binary_name": "7a3f18b0d2aa28007ee2b9512a0f8bdd916cf16869aa8a5902f94a0c68aa5205.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 20h"], [3, "mov [rbp+var_18], rdi"], [4, "mov rsi, [rbp+var_18]"], [5, "mov rcx, [rbp+var_18]"], [6, "mov rdx, [rbp+var_18]"], [7, "mov rax, [rbp+var_18]"], [8, "mov r8, rsi"], [9, "mov rsi, rax"], [10, "lea rdi, format"], [11, "mov eax, 0"], [12, "call _printf"], [13, "lea rax, off_40C520"], [14, "mov [rbp+var_8], rax"], [15, "jmp short loc_402485"], [16, "mov rax, [rbp+var_8]"], [17, "mov rdx, [rax+10h]"], [18, "mov rax, [rbp+var_8]"], [19, "mov rax, [rax]"], [20, "mov rsi, rax"], [21, "lea rdi, a22sS"], [22, "mov eax, 0"], [23, "call _printf"], [24, "add [rbp+var_8], 20h "], [25, "mov rax, [rbp+var_8]"], [26, "mov rax, [rax]"], [27, "test rax, rax"], [28, "jnz short loc_40245D"], [29, "nop"], [30, "nop"], [31, "leave"], [32, "retn"]], "data_dep": [[4, 3], [5, 3], [6, 3], [7, 3], [8, 4], [9, 7], [13, 12], [14, 13], [16, 24], [16, 14], [17, 16], [18, 14], [18, 24], [19, 18], [20, 19], [21, 10], [21, 21], [24, 14], [24, 24], [25, 24], [25, 14], [26, 25], [27, 26], [28, 27], [32, 27]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/7a3f18b0d2aa28007ee2b9512a0f8bdd916cf16869aa8a5902f94a0c68aa5205_7a3f18b0d2aa28007ee2b9512a0f8bdd916cf16869aa8a5902f94a0c68aa5205.jsonl.gz", "strip_func_name": "sub_40241D", "query": "\n\n\nconst char *__fastcall sub_40241D(const char *a1)\n{\nconst char *result; // rax\nconst char **i; // [rsp+18h] [rbp-8h]\n\nprintf(\n\"\\n\"\n\"Usage:\\n\"\n\" %s [--all]\\n\"\n\" Prints all parameters with descriptions and current values.\\n\"\n\" If --all is specified, prints even normally hidden fields.\\n\"\n\" %s [param1 [param2 [...]]]\\n\"\n\" Prints the current value(s) of the parameter(s).\\n\"\n\" %s [param1=value1] [param2=value2 [...]]]\\n\"\n\" Sets the parameter(s) to the specified value(s).\\n\"\n\" %s [param1?value1] [param2?value2 [...]]]\\n\"\n\" Checks if the parameter(s) all contain the specified value(s).\\n\"\n\"Stops at the first error.\\n\"\n\"Valid parameters:\\n\",\na1,\na1,\na1,\na1);\nfor ( i = (const char **)&off_40C520; ; i += 4 )\n{\nresult = *i;\nif ( !*i )\nbreak;\nprintf(\" %-22s %s\\n\", *i, i[2]);\n}\nreturn result;\n}\n\n\n\nQ:[a1,i,sub_40241D,]", "hints": "[]", "response": "{'a1': 'progname', 'i': 'p', 'sub_40241D': 'PrintHelp'}"}
[ [ 0.8194106221199036, 0.8141716718673706, 0.8138430118560791, 0.8067415356636047, 0.7855120897293091, 0.7819483280181885, 0.7759703993797302, 0.7736908793449402, 0.7733026146888733, 0.7680507302284241, 0.7668889760971069, 0.7629944086074829, 0.7599136829376221, 0.7552626132965088, 0.7534601092338562, 0.7512928247451782, 0.7504369616508484, 0.7456744909286499, 0.7428784966468811, 0.7413954138755798 ], [ 100092, 63013, 111784, 216146, 209578, 85179, 113483, 202409, 190260, 222636, 224384, 42838, 190248, 245376, 257294, 110818, 246630, 229347, 8590, 244298 ] ]
open_tty
06cdb20ff651312d644a0d760352ed69a462dac4f82fc95a3ddd6fbf721f4018
RIOT-OS
Tutorials
NA
int open_tty(void) { int r, fd; struct termios term_setting; fd = open("/dev/tty", O_RDWR); if (fd < 0) { return -1; } r = tcgetattr(fd, &term_setting); if (r != 0) { return -2; } old_term_setting = term_setting; term_setting.c_oflag |= (ONLRET); term_setting.c_iflag |= (/*IGNBRK |*/ BRKINT | IGNPAR); term_setting.c_iflag &= ~(ISTRIP); term_setting.c_lflag &= ~(ICANON |/* ISIG |*/ ECHO); term_setting.c_lflag |= (ISIG); term_setting.c_cflag |= CREAD; term_setting.c_cc[VMIN] = 1; term_setting.c_cc[VTIME] = 1; r = tcsetattr(fd, TCSANOW, &term_setting); if (r != 0) { return -3; } return fd; }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_401453", "function_addr": 4199507, "binary_name": "06cdb20ff651312d644a0d760352ed69a462dac4f82fc95a3ddd6fbf721f4018.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 50h"], [3, "mov esi, 2"], [4, "mov edi, offset file"], [5, "mov eax, 0"], [6, "call _open"], [7, "mov [rbp+fd], eax"], [8, "cmp [rbp+fd], 0"], [9, "jns short loc_401482"], [10, "mov eax, 0FFFFFFFFh"], [11, "jmp locret_40155F"], [12, "lea rdx, [rbp+termios_p]"], [13, "mov eax, [rbp+fd]"], [14, "mov rsi, rdx"], [15, "mov edi, eax"], [16, "call _tcgetattr"], [17, "mov [rbp+var_8], eax"], [18, "cmp [rbp+var_8], 0"], [19, "jz short loc_4014A6"], [20, "mov eax, 0FFFFFFFEh"], [21, "jmp locret_40155F"], [22, "mov rax, qword ptr [rbp+termios_p.c_iflag]"], [23, "mov rdx, qword ptr [rbp+termios_p.c_cflag]"], [24, "mov qword ptr cs:termios_p.c_iflag, rax"], [25, "mov qword ptr cs:termios_p.c_cflag, rdx"], [26, "mov rax, qword ptr [rbp+termios_p.c_line]"], [27, "mov rdx, qword ptr [rbp+termios_p.c_cc+7]"], [28, "mov qword ptr cs:termios_p.c_line, rax"], [29, "mov qword ptr cs:termios_p.c_cc+7, rdx"], [30, "mov rax, qword ptr [rbp+termios_p.c_cc+0Fh]"], [31, "mov rdx, qword ptr [rbp+termios_p.c_cc+17h]"], [32, "mov qword ptr cs:termios_p.c_cc+0Fh, rax"], [33, "mov qword ptr cs:termios_p.c_cc+17h, rdx"], [34, "mov rax, qword ptr [rbp+termios_p.c_cc+1Fh]"], [35, "mov qword ptr cs:termios_p.c_cc+1Fh, rax"], [36, "mov eax, [rbp+termios_p.c_ospeed]"], [37, "mov cs:termios_p.c_ospeed, eax"], [38, "mov eax, [rbp+termios_p.c_oflag]"], [39, "or eax, 20h"], [40, "mov [rbp+termios_p.c_oflag], eax"], [41, "mov eax, [rbp+termios_p.c_iflag]"], [42, "or eax, 6"], [43, "mov [rbp+termios_p.c_iflag], eax"], [44, "mov eax, [rbp+termios_p.c_iflag]"], [45, "and eax, 0FFFFFFDFh"], [46, "mov [rbp+termios_p.c_iflag], eax"], [47, "mov eax, [rbp+termios_p.c_lflag]"], [48, "and eax, 0FFFFFFF5h"], [49, "mov [rbp+termios_p.c_lflag], eax"], [50, "mov eax, [rbp+termios_p.c_lflag]"], [51, "or eax, 1"], [52, "mov [rbp+termios_p.c_lflag], eax"], [53, "mov eax, [rbp+termios_p.c_cflag]"], [54, "or al, 80h"], [55, "mov [rbp+termios_p.c_cflag], eax"], [56, "mov [rbp+termios_p.c_cc+6], 1"], [57, "mov [rbp+termios_p.c_cc+5], 1"], [58, "lea rdx, [rbp+termios_p]"], [59, "mov eax, [rbp+fd]"], [60, "mov esi, 0"], [61, "mov edi, eax"], [62, "call _tcsetattr"], [63, "mov [rbp+var_8], eax"], [64, "cmp [rbp+var_8], 0"], [65, "jz short loc_40155C"], [66, "mov eax, 0FFFFFFFDh"], [67, "jmp short locret_40155F"], [68, "mov eax, [rbp+fd]"], [69, "leave"], [70, "retn"]], "data_dep": [[7, 6], [8, 7], [9, 8], [13, 7], [14, 12], [15, 13], [17, 16], [18, 17], [19, 18], [24, 22], [25, 23], [28, 26], [29, 27], [32, 30], [33, 31], [35, 34], [37, 36], [39, 38], [40, 39], [42, 41], [43, 42], [44, 43], [45, 44], [46, 45], [48, 47], [49, 48], [50, 49], [51, 50], [52, 51], [54, 53], [55, 54], [58, 31], [59, 7], [61, 59], [63, 62], [64, 63], [65, 64], [68, 7], [70, 66], [70, 20], [70, 68], [70, 10]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/06cdb20ff651312d644a0d760352ed69a462dac4f82fc95a3ddd6fbf721f4018_06cdb20ff651312d644a0d760352ed69a462dac4f82fc95a3ddd6fbf721f4018.jsonl.gz", "strip_func_name": "sub_401453", "query": "\n\n\n__int64 sub_401453()\n{\n__int64 result; // rax\ntcflag_t v1; // eax\nstruct termios termios_p; // [rsp+0h] [rbp-50h] BYREF\nint v3; // [rsp+48h] [rbp-8h]\nint fd; // [rsp+4Ch] [rbp-4h]\n\nfd = open(\"/dev/tty\", 2);\nif ( fd < 0 )\nreturn 0xFFFFFFFFLL;\nv3 = tcgetattr(fd, &termios_p);\nif ( v3 )\nreturn 4294967294LL;\n::termios_p = termios_p;\ntermios_p.c_oflag |= 0x20u;\ntermios_p.c_iflag |= 6u;\ntermios_p.c_iflag &= 0xFFFFFFDF;\ntermios_p.c_lflag &= 0xFFFFFFF5;\ntermios_p.c_lflag |= 1u;\nv1 = termios_p.c_cflag;\nLOBYTE(v1) = LOBYTE(termios_p.c_cflag) | 0x80;\ntermios_p.c_cflag = v1;\ntermios_p.c_cc[6] = 1;\ntermios_p.c_cc[5] = 1;\nv3 = tcsetattr(fd, 0, &termios_p);\nif ( v3 )\nresult = 4294967293LL;\nelse\nresult = (unsigned int)fd;\nreturn result;\n}\n\n\n\nQ:[termios_p,v3,sub_401453,]", "hints": "[]", "response": "{'termios_p': 'term_setting', 'v3': 'r', 'sub_401453': 'open_tty'}"}
[ [ 0.8041892051696777, 0.7959465980529785, 0.795137882232666, 0.7634046077728271, 0.7630047798156738, 0.7200444936752319, 0.7116701006889343, 0.7099676728248596, 0.7075649499893188, 0.7049882411956787, 0.7031400799751282, 0.701877772808075, 0.7012220621109009, 0.698158323764801, 0.6977517604827881, 0.6951030492782593, 0.6933389902114868, 0.6899615526199341, 0.6890467405319214, 0.6875232458114624 ], [ 236226, 102206, 128147, 132769, 139328, 85166, 115822, 115511, 48579, 203564, 261402, 54294, 172236, 183469, 204595, 176966, 113377, 197501, 130386, 175997 ] ]
print_error
2f9a70287dba42e5f72b74bacaaa190f03def97bf7d7c0c64d2141f0330e0567
solusipse
fiche
NA
static void print_error(const char *format, ...) { va_list args; va_start(args, format); printf("[Fiche][ERROR] "); vprintf(format, args); printf("\n"); va_end(args); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4016E7", "function_addr": 4200167, "binary_name": "2f9a70287dba42e5f72b74bacaaa190f03def97bf7d7c0c64d2141f0330e0567.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "sub rsp, 0E0h"], [3, "mov [rbp+format], rdi"], [4, "mov [rbp+var_A8], 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_401740"], [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+arg], 8"], [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, "mov edi, offset format"], [26, "mov eax, 0"], [27, "call _printf"], [28, "lea rdx, [rbp+arg]"], [29, "mov rax, [rbp+format]"], [30, "mov rsi, rdx"], [31, "mov rdi, rax"], [32, "call _vprintf"], [33, "mov edi, 0Ah"], [34, "call _putchar"], [35, "nop"], [36, "leave"], [37, "retn"]], "data_dep": [[10, 9], [21, 9], [22, 21], [23, 21], [24, 23], [28, 19], [29, 3], [30, 28], [31, 29], [37, 34]]}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/2f9a70287dba42e5f72b74bacaaa190f03def97bf7d7c0c64d2141f0330e0567_2f9a70287dba42e5f72b74bacaaa190f03def97bf7d7c0c64d2141f0330e0567.jsonl.gz", "strip_func_name": "sub_4016E7", "query": "\n\n\nint sub_4016E7(const char *a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, ...)\n{\ngcc_va_list arg; // [rsp+18h] [rbp-C8h] BYREF\n__int64 v8; // [rsp+38h] [rbp-A8h]\n__int64 v9; // [rsp+40h] [rbp-A0h]\n__int64 v10; // [rsp+48h] [rbp-98h]\n__int64 v11; // [rsp+50h] [rbp-90h]\n__int64 v12; // [rsp+58h] [rbp-88h]\n\nva_start(arg, a6);\nv8 = a2;\nv9 = a3;\nv10 = a4;\nv11 = a5;\nv12 = a6;\narg[0].gp_offset = 8;\nprintf(\"[Fiche][ERROR] \");\nvprintf(a1, arg);\nreturn putchar(10);\n}\n\n\n\nQ:[a1,arg,sub_4016E7,]", "hints": "[]", "response": "{'a1': 'format', 'arg': 'args', 'sub_4016E7': 'print_error'}"}
[ [ 0.8564982414245605, 0.8338680863380432, 0.8327841758728027, 0.8219227194786072, 0.7935329079627991, 0.7753013968467712, 0.7541650533676147, 0.7430553436279297, 0.7426952719688416, 0.7404950857162476, 0.7402572631835938, 0.7401015758514404, 0.7387446165084839, 0.731945276260376, 0.7279362678527832, 0.7268096208572388, 0.721663236618042, 0.719942569732666, 0.7185575366020203, 0.717124342918396 ], [ 157197, 121817, 112999, 119662, 27220, 82297, 75465, 25873, 185272, 251996, 203786, 259568, 38930, 221992, 127455, 232672, 20164, 34324, 195261, 260964 ] ]
print_usage
553729f4c947d4d4c3afd9d8eaa9ccae80448ebe65b3b7bc0b043221da35682c
noporpoise
jelly-hash
NA
void print_usage() { printf("usage: speedtest [Options] <num_ops>\n" " Test hash table speed. Table capacity is: b*2^l. Memory is: (k-l+%i)*capacity.\n" " Rehash limit is: %i\n" " -k <k> Element size\n" " -l <l> Bits for bucket addressing\n" " -b <b> Number of elements per bucket\n" " -t <t> Number of threads to use\n", JH_NRBITS+1, (1<<JH_NRBITS)-1); exit(EXIT_FAILURE); }
{"metadata": {"project_name": "lmpa-bins-ret", "function_name": "sub_4028DC", "function_addr": 4204764, "binary_name": "553729f4c947d4d4c3afd9d8eaa9ccae80448ebe65b3b7bc0b043221da35682c.elf_extract.pkl\n"}, "code": [[0, "push rbp"], [1, "mov rbp, rsp"], [2, "mov edx, 0Fh"], [3, "mov esi, 5"], [4, "mov edi, offset aUsageSpeedtest"], [5, "mov eax, 0"], [6, "call _printf"], [7, "mov edi, 1"], [8, "call _exit"]], "data_dep": []}
{"prompt": "Help user generate meaningful names for variables and functions in the following code snippet.", "prog_name": "gh-dataset-dirty/bins/553729f4c947d4d4c3afd9d8eaa9ccae80448ebe65b3b7bc0b043221da35682c_553729f4c947d4d4c3afd9d8eaa9ccae80448ebe65b3b7bc0b043221da35682c.jsonl.gz", "strip_func_name": "sub_4028DC", "query": "\n\n\nvoid __noreturn sub_4028DC()\n{\nprintf(\n\"usage: speedtest [Options] <num_ops>\\n\"\n\" Test hash table speed. Table capacity is: b*2^l. Memory is: (k-l+%i)*capacity.\\n\"\n\" Rehash limit is: %i\\n\"\n\" -k <k> Element size\\n\"\n\" -l <l> Bits for bucket addressing\\n\"\n\" -b <b> Number of elements per bucket\\n\"\n\" -t <t> Number of threads to use\\n\",\n5LL,\n15LL);\nexit(1);\n}\n\n\n\nQ:[sub_4028DC,]", "hints": "[]", "response": "{'sub_4028DC': 'print_usage'}"}
[ [ 0.8176283240318298, 0.8166227340698242, 0.8103118538856506, 0.7982912063598633, 0.7979710102081299, 0.7956708669662476, 0.790303647518158, 0.7895575761795044, 0.7864041924476624, 0.7853509187698364, 0.783810019493103, 0.7825475931167603, 0.7823836207389832, 0.781757652759552, 0.780802309513092, 0.7807680368423462, 0.7805773615837097, 0.7805657982826233, 0.7805064916610718, 0.7801367044448853 ], [ 138956, 46413, 238519, 98424, 226026, 109934, 178161, 48138, 46591, 104951, 142344, 212746, 177529, 191921, 181924, 4043, 130918, 27768, 259149, 92544 ] ]

Dataset Card for "lmpa-test-1k"

More Information needed

Downloads last month
61

Collection including PurCL/lmpa-prorec-test-1k