/*Copyright2011NicholasJ.Kain,licensedGNULGPL2.1orlater*/.text.global__uniclone.type__uniclone,%function/*rdi=child_stack,rsi=start,rdx=pthread_struct*/__uniclone:subq$16,%rdi/*growchild_stack*/mov%rsi,8(%rdi)/*pushstartontochild_stackasreturnptr*/mov%rdx,0(%rdi)/*pushpthread_structontochild_stack*/mov%rdx,%r8/*r8=tls*/mov%rdi,%rsi/*rsi=child_stack*/leaq40(%rdx),%r10/*r10=child_id*/movl$56,%eax/*clonesyscallnumber*/movl$0x7d0f00,%edi/*rdi=flags*/mov%r10,%rdx/*rdx=parent_id*/syscall/*clone(flags,child_stack,parent_id,*child_id,tls)*/test%rax,%raxjnz1f/*ifwe're in the parent -> goto 1f */pop%rdi/*restorepthread_structfromchildstack*/1:ret.size__uniclone,.-__uniclone