============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined parse_trap2_fmt() SUB RSP,0x8 MOV RDI,RSI CALL .plt:::strdup ;char * strdup(char * __s) MOV RDX,qword ptr [->print_format2] ;= 0010f168 MOV qword ptr [RDX]=>.bss:print_format2,RAX ;=?? ADD RSP,0x8 RET ?? 0Fh Actual src: static void parse_trap2_fmt(const char *token, char *line) { print_format2 = strdup(line); } Predicted src: static void print_print_print (const char *name, const char *name, const char *name) { print (name, name); } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;double _nrrdUnaryOpAcos(double __x) ;__x double XMM0_Qa JMP .plt:::acos ?? 66h f Actual src: static double _nrrdUnaryOpAcos(double a) {return acos(a);} Predicted src: double _cffi_d(double x) { return (double) x; } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* wrapNewlineChunksize(libscols_column const*, char const*, void*) * ;************************************************************************************************************************************************************ ;undefined wrapNewlineChunksize(libscols_column * param_1, char * param_2, void * param_3) ;param_1 libscols_co... RDI ;param_2 char * RSI ;param_3 void * RDX JMP .plt:::scols_wrapnl_chunksize ?? 66h f Actual src: size_t wrapNewlineChunksize(const struct libscols_column *column, const char *data, void *userdata) { return scols_wrapnl_chunksize(column, data, userdata); } Predicted src: void * free_free (const char *s, const char *s) { return s; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined op_80e0_21_ff() PUSH R14 PUSH R13 PUSH R12 LEA R12,[.bss:regs] PUSH RBP MOV EBP,EDI AND EDI,0x7 LEA R14,[R12 + RDI*0x4 + 0x20] PUSH RBX SHR EBP,0x9 MOV dword ptr [.bss:OpcodeFamily],0x3c MOV EAX,dword ptr [R14]=>.bss:regs[32] AND EBP,0x7 LEA R13D,[RAX + -0x2] MOV EDI,R13D CALL qword ptr [.bss:x_get_word] MOV dword ptr [R14],R13D=>.bss:regs[32] MOV EDI,0x2 MOV R13D,dword ptr [R12 + RBP*0x4]=>.bss:regs MOV EBX,EAX MOV EAX,dword ptr [.bss:regs[188]] MOV dword ptr [.bss:regs[184]],EAX CALL get_word_ce020_prefetch_opcode ;undefined get_word_ce020_prefetch_op... MOV word ptr [.bss:regs[104]],AX TEST BX,BX JZ LAB_0094fc80 MOVZX ESI,BX MOV EAX,R13D XOR EDX,EDX DIV ESI CMP EAX,0xffff JA LAB_0094fc60 MOV ECX,EAX XOR ESI,ESI SAR CX,0xf MOVSX ECX,CX SHL ECX,0xf TEST AX,AX SETZ SIL MOVZX ECX,CX SHL EDX,0x10 SHL ESI,0xe OR EDX,EAX OR ECX,ESI MOV dword ptr [R12 + RBP*0x4]=>.bss:regs,EDX MOV dword ptr [.bss:regflags],ECX LAB_0094fc35: MOV EAX,dword ptr [.bss:currprefs[64]] ADD dword ptr [.bss:regs[64]],0x2 TEST EAX,EAX JS LAB_0094fc70 IMUL EDI,dword ptr [.bss:cpucycleunit],0x22 POP RBX POP RBP POP R12 POP R13 POP R14 MOVSXD RDI,EDI JMP qword ptr [.bss:x_do_cycles] ?? 66h f ?? 90h LAB_0094fc60: MOV EDI,R13D CALL setdivuflags ;undefined setdivuflags() JMP LAB_0094fc35 ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_0094fc70: POP RBX POP RBP POP R12 POP R13 POP R14 RET ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_0094fc80: MOV ESI,R13D XOR EDI,EDI CALL divbyzero_special ;undefined divbyzero_special() ADD dword ptr [.bss:regs[64]],0x2 POP RBX MOV EDI,0x5 POP RBP POP R12 POP R13 POP R14 JMP Exception_cpu ;undefined Exception_cpu() ?? 66h f Actual src: void REGPARAM2 op_80e0_21_ff(uae_u32 opcode) { int count_cycles = 0; uae_u32 real_opcode = opcode; uae_u32 srcreg = (real_opcode & 7); uae_u32 dstreg = (real_opcode >> 9) & 7; OpcodeFamily = 60; /* ea H:2,T:2,C:0 fea */ uaecptr srca; srca = m68k_areg(regs, srcreg) - 2; uae_s16 src = x_get_word(srca); m68k_areg(regs, srcreg) = srca; uae_s32 dst = m68k_dreg(regs, dstreg); ipl_fetch(); regs.irc = get_word_ce020_prefetch_opcode(2); /* op H:0,T:0,C:20 */ if (src == 0) { divbyzero_special(0, dst); m68k_incpci(2); Exception_cpu(5); return; } uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; if (newv > 0xffff) { setdivuflags((uae_u32)dst, (uae_u16)src); } else { CLEAR_CZNV(); SET_ZFLG(((uae_s16)(newv)) == 0); SET_NFLG(((uae_s16)(newv)) < 0); newv = (newv & 0xffff) | ((uae_u32)rem << 16); m68k_dreg(regs, dstreg) = (newv); } m68k_incpci(2); do_cycles_020_internal(34); return; } Predicted src: static void C_ccall f_8(C_word c,C_word *av){ C_word tmp; C_word t0=av[0]; C_word t1=av[1]; C_word t2; C_word t3; C_word *a; if(C_unlikely(!C_demand(C_calculate_demand(0,c,1)))){ C_save_and_and_reclaim((void *)f_8,c,c,c,c,c,c,c,c,c,c,c,c,av);} a=C_alloc(4); t2=(*a=C_CLOSURE_TYPE|4,a[1]=(C_word)f_8,a[2]=((C_word*)t0)[2],a[3]=((C_word*)t0)[3],a[4]=((C_word*)t0)[4],a[4],a[3]=((C_word*)t0)[4],a[4]=((C_word*)t0)[4],a[4],a[4]=((C_word*)t0)[4],a[4]=((C_word*)t0)[4],a[4]=((C_word*)t0)[4],a[4]=((C_word*)t0)[4],a[4]=((C_word*)t0)[4],a[4],a[4]=((C_word*)t0)[4],a[4],a[4],a[4]=((C_word*)t0)[4],a[4]=((C_word*)t0)[4],a[4],a[4]=((C_word*)t0)[4],a[4]=((C_word*)t0)[4],a[4],a[4],a[4]=((C_word*)t0)[4],a[4],a[4],a[4]=((C_word*)t0)[4]=((C_word*)t0)[4],a[4]=((C_word*)t0)[4],a[4],a[4],a[4]=((C_word*)t0)[4]=((C_word*)t0)[4],a[4],a[4]=((C_word*)t0)[4],a[4]=((C_word*)t0)[4],a[4],a[4],a[4],a[4],a[4],a[4]=((C_word*)t0)[4],a[4]=((C_word*)t0)[4],a[4],a[4]=((C_word*)t0)[4],a[4],a[4],a[4]=((C_word*)t0)[4],a[4],a[4],a[4]=((C_word*)t0)[4],a[4],a[4],a[4],a[4],a[4],a[6],a[4],a[4],a[4],a[4],a[4]=((C_word*)t0)[4],a[5],a[4],a[4],a[4]=((C_word*)t0)[4],a[5],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4]=((C_word*)t0)[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4]=t0)[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4]=((C_word*)t0)[4],a[4],a[4],a[4],a[4],a[4],a[4]=((C_word*)t4],a[4],a[4],a[4],a[4],a[5],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4],a[4], ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined libxmp_get_sample() MOV EAX,dword ptr [RDI + 0x6d0] CMP EAX,ESI JLE LAB_00118910 MOVSXD RSI,ESI MOV RDX,qword ptr [RDI + 0x700] LEA RAX,[RSI*0x8] SUB RAX,RSI LEA R8,[RDX + RAX*0x8] LAB_00118903: MOV RAX,R8 RET ?? 66h f ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00118910: MOV EDX,dword ptr [RDI + 0x2430] XOR R8D,R8D ADD EDX,EAX CMP EDX,ESI JLE LAB_00118903 SUB ESI,EAX MOV RDX,qword ptr [RDI + 0x2440] MOVSXD RSI,ESI LEA RAX,[RSI*0x8] SUB RAX,RSI LEA R8,[RDX + RAX*0x8] MOV RAX,R8 RET ?? 66h f Actual src: struct xmp_sample *libxmp_get_sample(struct context_data *ctx, int smp) { struct smix_data *smix = &ctx->smix; struct module_data *m = &ctx->m; struct xmp_module *mod = &m->mod; struct xmp_sample *xxs; if (smp < mod->smp) { xxs = &mod->xxs[smp]; } else if (smp < mod->smp + smix->smp) { xxs = &smix->xxs[smp - mod->smp]; } else { xxs = NULL; } return xxs; } Predicted src: int get_int32(int32_t *buf, int32_t *buf, int32_t *buf, int32_t *buf, int32_t *buf, int32_t *buf) { int32_t *buf = (int32_t *)buf; int32_t *buf = (int32_t *)buf; int32_t *buf = (int32_t *)buf; for (int32_t i = 0; i < (int32_t *)buf; i++) { *buf = (int32_t *)buf[i]; return (int32_t *)buf[i]; } }