============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined _writeback_v() ;local_10 undefined8 -10 ;local_20 undefined8 -20 ;local_28 undefined8 -28 ;local_30 undefined8 -30 ;local_38 undefined8 -38 PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + local_20+0x8],RDI MOV qword ptr [RBP + local_28+0x8],RSI MOV qword ptr [RBP + local_30+0x8],RDX MOV qword ptr [RBP + local_38+0x8],RCX MOV RAX,qword ptr [RBP + local_38+0x8] MOV qword ptr [RBP + local_10+0x8],RAX MOV RAX,qword ptr [RBP + local_10+0x8] MOV ESI,0x2 MOV RDI,RAX CALL _test_flags ;undefined _test_flags() TEST AL,AL JZ LAB_00295efb MOV RAX,qword ptr [RBP + local_10+0x8] MOV RDI,RAX CALL _issue_write ;undefined _issue_write() LAB_00295efb: MOV EAX,0x1 LEAVE RET ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined _invalidate_v() ;local_10 undefined8 -10 ;local_18 undefined8 -18 ;local_20 undefined8 -20 ;local_28 undefined8 -28 ;local_30 undefined8 -30 ;local_38 undefined8 -38 PUSH RBP Actual src: static bool _writeback_v(struct radix_tree_iterator *it, uint8_t *kb, uint8_t *ke, union radix_value v) { struct block *b = v.ptr; if (_test_flags(b, BF_DIRTY)) _issue_write(b); return true; } Predicted src: static int _init(void) { return 0; } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined op_d060_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],0xb 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... MOVZX EDX,R13W XOR ECX,ECX MOV word ptr [.bss:regs[104]],AX MOVZX EAX,BX ADD EDX,EAX MOV EAX,R13D ADD AX,BX MOV EAX,dword ptr [.bss:regflags] MOV word ptr [R12 + RBP*0x4]=>.bss:regs,DX SETC CL XOR ESI,ESI TEST DX,DX SETZ SIL XOR R13D,EDX XOR EBX,EDX AND EAX,0xffffbffe AND EBX,R13D SHL ESI,0xe AND ECX,0x1 ADD dword ptr [.bss:regs[64]],0x2 MOVSX EBX,BX OR EAX,ESI SHL ECX,0x8 SHR EBX,0x1f OR EAX,EBX POP RBX POP RBP AND AH,0xfe POP R12 POP R13 OR EAX,ECX POP R14 MOV ECX,EAX AND AH,0x7f SHR ECX,0x8 MOV dword ptr [.bss:regflags+4],ECX MOV ECX,EDX AND ECX,0x8000 OR EAX,ECX MOV dword ptr [.bss:regflags],EAX RET ?? 66h f Actual src: void REGPARAM2 op_d060_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 = 11; /* 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_s16 dst = m68k_dreg(regs, dstreg); ipl_fetch(); regs.irc = get_word_ce020_prefetch_opcode(2); /* OP zero */ uae_u32 newv = ((uae_u16)(dst)) + ((uae_u16)(src)); int flgs = ((uae_s16)(src)) < 0; int flgo = ((uae_s16)(dst)) < 0; int flgn = ((uae_s16)(newv)) < 0; SET_ZFLG(((uae_s16)(newv)) == 0); SET_VFLG((flgs ^ flgn) & (flgo ^ flgn)); SET_CFLG(((uae_u16)(~dst)) < ((uae_u16)(src))); COPY_CARRY(); SET_NFLG(flgn!= 0); m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); m68k_incpci(2); return; } Predicted src: static void C_ccall f(C_word c,C_word *av){ C_word tmp; C_word t0=av[0]; C_word t1=av[1]; C_word t2; C_word *a; if(C_unlikely(!C_unlikely(!C_demand(0,c,2)))){ C_unlikely(!C_demand(0,2)))){ if(4)))){ if(3) { av2=av; } else { av2=av; av2=av2=av2=av2=av2=av2[0)[2[1]; av2[0]=t2[1; av2[1; av2[2[1]=t2[1; av2[2[2[2[2[2[3]; av2[2[2[1]=t2[3; av2[2[2[2[2[3]; av2[2[2[2[2[3]; av2[2[3]; av2[2[2[3]; av2[2[3]; av2[2[2[3]; av2[2[2[3]; av2[2[3]; av2[2[3]; av2[2[2[3]; ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined AuthorityInfoAccess_new() PUSH R12 XOR ESI,ESI PUSH RBX MOV RBX,RDI SUB RSP,0x8 CALL qword ptr [RDI + 0x130] MOV R12,RAX TEST RAX,RAX JZ LAB_00116097 MOV EDI,0x800 CALL .plt:::PORT_NewArena ;undefined PORT_NewArena() MOV qword ptr [R12 + 0x10],RAX TEST RAX,RAX JZ LAB_001160a8 MOV qword ptr [R12 + 0x18],0x0 LAB_00116097: ADD RSP,0x8 MOV RAX,R12 POP RBX POP R12 RET ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_001160a8: MOV RDI,R12 CALL qword ptr [RBX + 0x140] ADD RSP,0x8 XOR EDI,EDI XOR EAX,EAX POP RBX POP R12 JMP qword ptr [.bss:nspr_error_c_api[8]] ?? 66h f Actual src: static PyObject * AuthorityInfoAccess_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { AuthorityInfoAccess *self; TraceObjNewEnter(type); if ((self = (AuthorityInfoAccess *)type->tp_alloc(type, 0)) == NULL) { return NULL; } if ((self->arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE)) == NULL) { type->tp_free(self); return set_nspr_error(NULL); } self->aia = NULL; TraceObjNewLeave(self); return (PyObject *)self; } Predicted src: static void _cb(void *data, void *data) { if (!data) return; if (!data) return; return; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined xfsm_dbus_manager_call_can_restart_sync() PUSH R14 XOR EAX,EAX MOV R14,RDI LEA RDI,[.rodata:DAT_0012e155] ;= 28h ( PUSH R13 MOV R13,RSI PUSH R12 PUSH RBP MOV RBP,RCX PUSH RBX MOV RBX,RDX CALL .plt:::g_variant_new ;undefined g_variant_new() MOV R12,RAX CALL .plt:::g_dbus_proxy_get_type ;undefined g_dbus_proxy_get_type() MOV RDI,R14 MOV RSI,RAX CALL .plt:::g_type_check_instance_cast ;undefined g_type_check_instance_cast() SUB RSP,0x8 MOV R9,RBX XOR ECX,ECX PUSH RBP MOV RDX,R12 MOV RDI,RAX MOV R8D,0xffffffff LEA RSI,[.rodata:s_CanRestart_0012e672] ;= "CanRestart" CALL .plt:::g_dbus_proxy_call_sync ;undefined g_dbus_proxy_call_sync() POP RDX POP RCX MOV RBX,RAX TEST RAX,RAX JZ LAB_0011858d MOV RDI,RAX MOV RDX,R13 LEA RSI,[.rodata:DAT_0012e662] ;= 28h ( XOR EAX,EAX CALL .plt:::g_variant_get ;undefined g_variant_get() MOV RDI,RBX CALL .plt:::g_variant_unref ;undefined g_variant_unref() LAB_0011858d: XOR EAX,EAX TEST RBX,RBX POP RBX POP RBP SETNZ AL POP R12 POP R13 POP R14 RET ?? 66h f Actual src: gboolean xfsm_dbus_manager_call_can_restart_sync ( XfsmDbusManager *proxy, gboolean *out_can_restart, GCancellable *cancellable, GError **error) { GVariant *_ret; _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), "CanRestart", g_variant_new ("()"), G_DBUS_CALL_FLAGS_NONE, -1, cancellable, error); if (_ret == NULL) goto _out; g_variant_get (_ret, "(b)", out_can_restart); g_variant_unref (_ret); _out: return _ret!= NULL; } Predicted src: G_DEFINE_TYPE_WITH_WITH_WITH_WITH_WITH_WITH_WITH_WITH_WITH_WITH_CODE ( const gchar* _tmp0, const gchar* _tmp1_; gchar* _tmp2_; gchar* _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp4_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp6_; _ = _tmp2_; _ = _tmp6_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp6_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; _ = _tmp2_; ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined bio_close() PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x8 CMP byte ptr [RDI + 0x24],0x1 JZ LAB_0010c0e0 LAB_0010c0af: CMP byte ptr [RBP + 0x25],0x0 MOV EDI,dword ptr [RBP + 0x28] JNZ LAB_0010c0d8 CALL .plt:::close ;int close(int __fd) LAB_0010c0bd: MOV RDI,qword ptr [RBP] CALL .plt.got:::free ;void free(void * __ptr) ADD RSP,0x8 MOV RDI,RBP POP RBX POP RBP JMP .plt.got:::free ;void free(void * __ptr) ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_0010c0d8: CALL tcpclose ;undefined tcpclose() JMP LAB_0010c0bd ?? 90h LAB_0010c0e0: CMP byte ptr [RDI + 0x26],0x0 JNZ LAB_0010c0af MOV EBX,dword ptr [RDI + 0xc] TEST EBX,EBX JZ LAB_0010c0af CMP byte ptr [RBP + 0x25],0x0 MOV EDI,dword ptr [RDI + 0x28] MOV RSI,qword ptr [RBP] JZ LAB_0010c120 MOV ECX,dword ptr [RBP + 0x14] MOV EDX,EBX CALL tcptowrite ;undefined tcptowrite() LAB_0010c104: CMP EBX,EAX JLE LAB_0010c110 MOV byte ptr [RBP + 0x26],0x1 TEST EAX,EAX JS LAB_0010c116 LAB_0010c110: CDQE ADD qword ptr [RBP + 0x18],RAX LAB_0010c116: MOV dword ptr [RBP + 0xc],0x0 JMP LAB_0010c0af ?? 90h LAB_0010c120: MOV EDX,EBX CALL .plt:::write ;ssize_t write(int __fd, void * __buf... JMP LAB_0010c104 ?? 0Fh Actual src: void bio_close(bio *b) { if (b->direction==BIO_WRITE) { bio_flush(b); } if (b->type==0) { close(b->fd); } else { tcpclose(b->fd); } free(b->buff); free(b); } Predicted src: static void string(void) { int i; for (i = 0; i < n; i++) for (i = 0; i < n; i++) if (i == 0) { if (i == 0) { if (i < 0) { if (i < 0) { { if (i < 1) { { if (i < 0) { { { if (i = 0; } } if (i < 0) { { } if (i < 0) { { } { } } } } } } } else if (i